[randRange( 2, 3 ), randRange( 0, 3 )] randRangeNonZero( -6, 6 ) randRangeNonZero( -6, 6 ) randRangeNonZero( -10, 10 ) randRangeNonZero( -10, 10 ) [randRange( 1, 3 ) * randRangeNonZero( -1, 1 ), randRange( 1, 3 ) * randRangeNonZero( -1, 1 )] [{ a: M1, b: Y1 }, { a: M2, b: Y2 }] [0, 1]
(function() { var equations = []; var i = 0; while ( i < 2 ) { if( INDICES[i] === 0 ) { equations.push( "y = " + expr(["+", ["*", AB_VALS[i].a, "x"], AB_VALS[i].b]) ); } if( INDICES[i] === 1 ) { equations.push( "y = " + expr(["+", AB_VALS[i].b, ["*", AB_VALS[i].a, "x"]]) ); } if( INDICES[i] === 2 ) { equations.push( expr(["+", ["*", -AB_VALS[i].a, "x"], "y"]) + " = " + AB_VALS[i].b ); } if( INDICES[i] === 3 ) { equations.push( expr(["+", ["*", -AB_VALS[i].a * MULT[i], "x"], ["*", MULT[i], "y"]]) + " = " + AB_VALS[i].b * MULT[i] ); } i++; } return equations; })() [AB_VALS[0].a > 0 ? "+" : "-", AB_VALS[1].a > 0 ? "+" : "-"] [( AB_VALS[0].a * MULT[0] ) > 0 ? "+" : "-", ( AB_VALS[1].a * MULT[1] ) > 0 ? "+" : "-"]

Determine how many solutions exist for the system of equations.

\color{BLUE}{EQUATIONS[0]}
\color{GREEN}{EQUATIONS[1]}

  • One solution
  • Infinite solutions
  • No solutions

Convert both equations to slope-intercept form:

\color{BLUEGREEN}{EQUATIONS[INDEX]}
\color{BLUEGREEN}{y = expr(["+", ["*", AB_VALS[INDEX].a, "x"], AB_VALS[INDEX].b])} expr(["*", -AB_VALS[INDEX].a, "x"])\color{PINK}{SIGNS_1[INDEX]expr(["*", abs( AB_VALS[INDEX].a ), "x"])} + y = AB_VALS[INDEX].b\color{PINK}{SIGNS_1[INDEX]expr(["*", abs( AB_VALS[INDEX].a ), "x"])}
y = AB_VALS[INDEX].bSIGNS_1[INDEX]expr(["*", abs( AB_VALS[INDEX].a ), "x"])
\color{BLUEGREEN}{y = expr(["+", ["*", AB_VALS[INDEX].a, "x"], AB_VALS[INDEX].b])}
expr(["*", -AB_VALS[INDEX].a * MULT[INDEX], "x"])\color{PINK}{SIGNS_2[INDEX]expr(["*", abs( AB_VALS[INDEX].a * MULT[INDEX] ), "x"])} + expr(["*", MULT[INDEX], "y"]) = AB_VALS[INDEX].b * MULT[INDEX]\color{PINK}{SIGNS_2[INDEX]expr(["*", abs( AB_VALS[INDEX].a * MULT[INDEX] ), "x"])}
expr(["*", MULT[INDEX], "y"]) = AB_VALS[INDEX].b * MULT[INDEX]SIGNS_2[INDEX]expr(["*", abs( AB_VALS[INDEX].a * MULT[INDEX] ), "x"])
y = AB_VALS[INDEX].bSIGNS_1[INDEX]expr(["*", abs( AB_VALS[INDEX].a ), "x"])
\color{BLUEGREEN}{y = expr(["+", ["*", AB_VALS[INDEX].a, "x"], AB_VALS[INDEX].b])}

Just by looking at both equations in slope-intercept form, what can you determine?

\color{BLUE}{y = expr(["+", ["*", AB_VALS[0].a, "x"], AB_VALS[0].b])}
\color{GREEN}{y = expr(["+", ["*", AB_VALS[1].a, "x"], AB_VALS[1].b])}

[{ a: M1, b: Y1 }, { a: M2, b: Y2 }]
One solution

The linear equations have different slopes.

graphInit({ range: [[-10, 10], [-10, 10]], scale: [18, 18], tickStep: 1, labelStep: 1, unityLabels: false, labelFormat: function( s ) { return "\\small{" + s + "}"; }, axisArrows: "<->" }); plot(function( x ) { return ( AB_VALS[0].a * x + AB_VALS[0].b ); }, [-10, 10], { stroke: "BLUE" }); plot(function( x ) { return ( AB_VALS[1].a * x + AB_VALS[1].b ); }, [-10, 10], { stroke: "GREEN" });

When two equations have different slopes, the lines will intersect once with one solution.

[{ a: M1, b: Y1 }, { a: M1, b: Y1 }]
Infinite solutions

Both equations have the same slope and the same y-intercept, which means the lines would completely overlap.

graphInit({ range: [[-10, 10], [-10, 10]], scale: [18, 18], tickStep: 1, labelStep: 1, unityLabels: false, labelFormat: function( s ) { return "\\small{" + s + "}"; }, axisArrows: "<->" }); plot(function( x ) { return ( AB_VALS[0].a * x + AB_VALS[0].b ); }, [-10, 10], { stroke: "BLACK" });

Since any solution of \color{BLUE}{EQUATIONS[0]} is also a solution of \color{GREEN}{EQUATIONS[1]}, there are infinitely many solutions.

[{ a: M1, b: Y1 }, { a: M1, b: Y2 }]
No solutions

Both equations have the same slope with different y-intercepts. This means the equations are parallel.

graphInit({ range: [[-10, 10], [-10, 10]], scale: [18, 18], tickStep: 1, labelStep: 1, unityLabels: false, labelFormat: function( s ) { return "\\small{" + s + "}"; }, axisArrows: "<->" }); plot(function( x ) { return ( AB_VALS[0].a * x + AB_VALS[0].b ); }, [-10, 10], { stroke: "BLUE" }); plot(function( x ) { return ( AB_VALS[1].a * x + AB_VALS[1].b ); }, [-10, 10], { stroke: "GREEN" });

Parallel lines never intersect, thus there are NO SOLUTIONS.