Visualizing a System of
Two Linear Equations in Two Unknowns

A system of two linear equations in two unknowns can be written in the form

Ax = b

and can be visualized using the Java applet below. When this page loads the applet is set up to study the system of equations

x1 + 2x2 = 2

x1 - x2 = 4

In this applet the vector x representing values of the two unknowns is marked by a red line and dot and the vector Ax is marked by a blue line and dot. You can see how y depends on x by clicking or dragging on the graph to change the value of x. The vector y will be changed based on the new value of x.

The vector b is marked by a gray box on the graph.

You can solve (or attempt to solve) this system of equations by clicking or dragging the mouse in the graph to move the vector x until the vector Ax lands on the vector b. Once you have found a solution you can mark it by clicking the Mark button. This is useful if there is more than one solution. You can clear the marks by clicking the Clear button.

You can investigate other systems of equations by changing the values of the coefficient matrix A and the constant vector b as described below.

You can change the entries in the matrix A by clicking on each of their values at the right and typing the new value in the popup dialog box.

You can change the value of the vector b by clicking on b1 or b2 at the right of the graph and entering the new value in the popup dialog box.


Investigate each of the following systems of equations using the applet above. Note which of the systems have exactly one solution; which have more than one solution; and which have no solutions. If a system has more than one solution use the Mark button to mark several solutions and describe what the set of solutions looks like.

  1. x1 - x2 = 1

    x1 + x2 = 3

  2. x1 - x2 = 2

    -x1 + x2 = -2

  3. x1 - x2 = 1

    -x1 + x2 = 3

  4. x1 + 0.5 x2 = 2

    2x1 + x2 = 4

  5. x1 + 0.5 x2 = 2

    2x1 + x2 = 2

  6. x1 + 0.5 x2 = 1

    2x1 + x2 = 2