Systems of Linear Equations Example

A system of linear equations asks for values that satisfy every equation at once. Gaussian elimination converts the system to an equivalent triangular form using row swaps, row scaling, and row replacement. This example keeps the same solution set while reducing the equations to a form that can be solved by back-substitution.

Solve the system using Gaussian elimination

Write the coefficients and constants as an augmented matrix. Each elementary row operation preserves the system’s solutions.

{2x+y=5x−y=1\begin{cases}2x+y=5\\x-y=1\end{cases}
Key facts used in this example
Coefficient matrix[[2, 1], [1, −1]]
Augmented column[[2, 1 | 5], [1, −1 | 1]]
Allowed row operationsSwap rows; multiply a row by nonzero scalar; add a row multiple
Target formRow-echelon form, then back-substitute

Step-by-step solution

  1. 1

    Form the augmented matrix

    Place the coefficients of x and y in the first two columns and the right-hand constants after the bar.

    [2151−11]\left[\begin{array}{cc|c}2&1&5\\1&-1&1\end{array}\right]
  2. 2

    Swap rows to use a leading 1

    Apply R₁ ↔ R₂. Row swaps do not change the solution set and make the next arithmetic simpler.

    R1↔R2:quad[1−11215]R_1\leftrightarrow R_2:quad\left[\begin{array}{cc|c}1&-1&1\\2&1&5\end{array}\right]
  3. 3

    Eliminate x from the second row

    Replace row 2 by row 2 minus 2 times row 1. The x coefficient becomes 2 − 2(1) = 0.

    R2←R2−2R1:quad[1−11033]R_2\leftarrow R_2-2R_1:quad\left[\begin{array}{cc|c}1&-1&1\\0&3&3\end{array}\right]
  4. 4

    Solve for y, then back-substitute

    The second row gives 3y = 3, so y = 1. The first row is x − y = 1; substituting y = 1 gives x = 2.

    3y=3⇒y=1,x−y=1⇒x=23y=3\Rightarrow y=1,\qquad x-y=1\Rightarrow x=2

ANSWER

(x, y) = (2, 1)

The unique solution is x = 2 and y = 1. The coefficient matrix has nonzero determinant, so the two equations intersect at one point.

x=2,y=1\boxed{x=2,\quad y=1}

Substitute into both original equations

A solution must satisfy both equations. The ordered pair (2, 1) produces the stated right-hand side in each one.

2(2)+1=5,2−1=12(2)+1=5,\qquad2-1=1