Writing Systems of Equations as Matrices

Finally, you will learn how to set up a system as a matrix.

Learning Objectives

In this section, you will:

  • Write the augmented matrix of a system of equations.
  • Write the system of equations from an augmented matrix.
  • Perform row operations on a matrix.
  • Solve a system of linear equations using matrices.

Figure 1 German mathematician Carl Friedrich Gauss (1777–1855).


Carl Friedrich Gauss lived during the late 18th century and early 19th century, but he is still considered one of the most prolific mathematicians in history. His contributions to the science of mathematics and physics span fields such as algebra, number theory, analysis, differential geometry, astronomy, and optics, among others. His discoveries regarding matrix theory changed the way mathematicians have worked for the last two centuries.

We first encountered Gaussian elimination in Systems of Linear Equations: Two Variables. In this section, we will revisit this technique for solving systems, this time using matrices.


Writing the Augmented Matrix of a System of Equations

A matrix can serve as a device for representing and solving a system of equations. To express a system in matrix form, we extract the coefficients of the variables and the constants, and these become the entries of the matrix. We use a vertical line to separate the coefficient entries from the constants, essentially replacing the equal signs. When a system is written in this form, we call it an augmented matrix.

For example, consider the following 2×2 system of equations.

3x+4y=7

4x−2y=5

We can write this system as an augmented matrix:

\left[\begin{array}{rr|r}3 & 4 & 7 \\4 & -2 & 5\end{array}\right]

We can also write a matrix containing just the coefficients. This is called the coefficient matrix.

\left[\begin{array}{cc}3 & 4 \\4 & -2\end{array}\right]

A three-by-three system of equations such as

3x−y−z=0

 x+y=5

2x−3z=2

has a coefficient matrix

\left[\begin{array}{rrr}3 & -1 & -1 \\1 & 1 & 0 \\2 & 0 & -3\end{array}\right]

and is represented by the augmented matrix

\left[\begin{array}{rrr|r}3 & -1 & -1 & 0 \\1 & 1 & 0 & 5 \\2 & 0 & -3 & 2\end{array}\right]

Notice that the matrix is written so that the variables line up in their own columns: x-terms go in the first column, y-terms in the second column, and z-terms in the third column. It is very important that each equation is written in standard form ax+by+cz=d so that the variables line up. When there is a missing variable term in an equation, the coefficient is 0.


How To

Given a system of equations, write an augmented matrix.

  1. Write the coefficients of the x-terms as the numbers down the first column.
  2. Write the coefficients of the y-terms as the numbers down the second column.
  3. If there are z-terms, write the coefficients as the numbers down the third column.
  4. Draw a vertical line and write the constants to the right of the line.


Example 1

Writing the Augmented Matrix for a System of Equations

Write the augmented matrix for the given system of equations.

x+2y−z=3

2x−y+2z=6

 x−3y+3z=4

Solution

The augmented matrix displays the coefficients of the variables, and an additional column for the constants.

\left[\begin{array}{rrr|r}1 & 2 & -1 & 3 \\2 & -1 & 2 & 6 \\1 & -3 & 3 & 4\end{array}\right]


Try It #1

Write the augmented matrix of the given system of equations.

4x−3y=11

3x+2y=4


Writing a System of Equations from an Augmented Matrix

We can use augmented matrices to help us solve systems of equations because they simplify operations when the systems are not encumbered by the variables. However, it is important to understand how to move back and forth between formats in order to make finding solutions smoother and more intuitive. Here, we will use the information in an augmented matrix to write the system of equations in standard form.


Example 2

Writing a System of Equations from an Augmented Matrix Form

Find the system of equations from the augmented matrix.

\left[\begin{array}{rrr|r}1 & -3 & -5 & -2 \\2 & -5 & -4 & 5 \\-3 & 5 & 4 & 6\end{array}\right]

Solution

When the columns represent the variables x, y, and z,

\left[\begin{array}{rrr|r}1 & -3 & -5 & -2 \\2 & -5 & -4 & 5 \\-3 & 5 & 4 & 6\end{array}\right] \rightarrow \begin{aligned}&x-3 y-5 z=-2 \\&2 x-5 y-4 z=5 \\&-3 x+5 y+4 z=6\end{aligned}


Try It #2

Write the system of equations from the augmented matrix.

\left[\begin{array}{ccc|c}1 & -1 & 1 & 5 \\2 & -1 & 3 & 1 \\0 & 1 & 1 & -9\end{array}\right]


Source: Rice University, https://openstax.org/books/college-algebra/pages/7-6-solving-systems-with-gaussian-elimination
Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 License.

Last modified: Monday, May 9, 2022, 4:56 PM