gizmobench
BrowseDaily

Graph a System of Linear Equations

Compare the two lines for x + y = 3 and x - y = 1, which meet at (2, 1). Change the equations to plot your own two-variable linear system. The graph uses approximate display coordinates while the answer and consistency check use exact fractions.

2 variables, 2 equationsEquation textAnswer first
 x + y =  3 x - y =  1elimination         1 row operation, pivoting on the largest coefficientback-substitution   2 stepsx = 2        y = 1residual            0   0        unique solution
Enter as
Read from the text
x, y in 2 equations
Working
x
2
y
1
Case
Unique

Your equations

One equation per line, 2 to 6 of them, in 2 to 6 unknowns. Variables may sit on both sides, coefficients may be fractions or decimals, and x/2 means half of x.

The check

  • x + y = 3, residual 0
  • x - y = 1, residual 0

Each value is substituted back into the equations as you typed them: every residual is exactly zero, because the arithmetic is done in fractions rather than decimals.

The working

Forward elimination first, largest coefficient leading each column, then back-substitution from the bottom row up. Every multiplier is an exact fraction.

  1. R2 -> R2 - (1)R1 clears x from row 2

Back-substitution

  • From row 2: -2y = -2, so y = 1.
  • From row 1: x + y = 3 with y = 1, so x = 2.

Substitution for two equations

Isolate a variable, replace it in the other equation, then substitute back. These steps use the original equations and exact fractions.

  1. Isolate x in equation 1: x = 3 - y.
  2. Substitute into equation 2: (1)(3 - y) + (-1)y = 1.
  3. Collect terms: (-2)y = -2.
  4. y = 1.
  5. Substitute back: x = 3 + (-1)(1) = 2.

Graph of the two-variable system

Approximate graph, axes from -5 to 5. 2 of 2 equation lines cross this view. Read the exact solution and consistency result above.

Two-variable equation linesxy-55-55x + y = 3x - y = 1Unique solution
  • Line 1: x + y = 3
  • Line 2: x - y = 1

The three answers a linear system can have

Load any of them to see which one you are looking at and why.

  • x + y = 3, x - y = 1two lines that cross once
    x = 2, y = 1
  • x + y = 1, 2x + 2y = 3same line, different constant
    No solution: the equations contradict each other
  • x + y = 3, x + y = 3one equation repeated, rank below the variable count
    x = 3 - y, with y free
Three answers, and the rank tells you which. Count the rows left with a leading coefficient after elimination: that is the rank. Rank equal to the number of unknowns gives one solution. A row that reduces to 0 = something other than zero is a contradiction, so there is no solution at all. Rank below the number of unknowns leaves free variables, and every value of them is a solution, which is why the answer comes back as a formula rather than a number. Telling those apart needs zero to mean zero, so every coefficient here is held as a fraction of two whole numbers and nothing is rounded on the way.

Common questions

What do the lines and dot show?
Each nonzero two-variable equation is a line. The dot marks the unique solution when it is inside the viewport. Exact answers appear above the graph. The list below the graph names the equation for each visible line.
How do parallel or overlapping lines appear?
Distinct parallel lines have no common solution. Identical lines overlap and usually leave infinitely many solutions. A zero-coefficient equation such as 0 = 0 has no line to draw; its effect is included in the exact consistency result.
Why can a line or solution be absent from the graph?
The displayed axes have a finite range. Only lines crossing that range are drawn, and the note gives the visible line count. Moderate unique solutions expand the axes; coordinates over one million use the default view and can be off-screen. Near-coincident lines may look identical, so use the exact result to distinguish them.
Can it graph nonlinear equations or three variables?
The graph is limited to two-variable linear equations. Three or more variables retain exact elimination results but have no graph. Nonlinear terms such as x^2 or xy are rejected.

Gaussian elimination that pivots on the largest available coefficient for numerical stability, with every row operation printed so you can follow it. The solution is substituted back into the equations you typed and the residual is shown, so you can see the arithmetic close. A nonlinear term is refused by name rather than quietly linearised.