Representing linear systems with matrices

Learn how systems of linear equations can be represented by augmented matrices.
A matrix is a rectangular arrangement of numbers into rows and columns.
Matrices can be used to solve systems of equations. But first, we must learn how to represent systems with matrices.

Representing a linear system with matrices

A system of equations can be represented by an augmented matrix.
In an augmented matrix, each row represents one equation in the system and each column represents a variable or the constant terms.
In this way, we can see that augmented matrices are a shorthand way of writing systems of equations. The organization of the numbers into the matrix makes it unnecessary to write various symbols like x, y, and equals , yet all of the information is still there!

1) Which matrix represents the system?
\begin{aligned} 2x+3y &= 8 \\ 5x+2y &=2 \\\end{aligned}

\begin{aligned} \greenD2x+\purpleC{3}y &= \goldD{8} \\\\ \greenD{5}x+\purpleC{2}y &=\goldD{ 2} \end{aligned}\longrightarrow\left[\begin{array}{rr}{\greenD2} & \purpleC{3} &\goldD{ 8} \\\\ \greenD{5} & \purpleC{2} & \goldD{2} \end{array}\right]
2) Write the following system of equations as an augmented matrix.
\begin{aligned} 7x+4y &= 3 \\ 6x+3y&=5 \\ \end{aligned}

\begin{aligned} \greenD7x+\purpleC{4}y &= \goldD{3} \\\\ \greenD{6}x+\purpleC{3}y &=\goldD{ 5} \end{aligned}\longrightarrow\left[\begin{array}{rrr}{\greenD7} & \purpleC{4} &\goldD{3} \\\\ \greenD{6} & \purpleC{3} &\goldD{5} \end{array}\right]

Let's look at another example

Now that we have the basics, let's take a look at a slightly more complicated example.

Example

Write the following system of equations as an augmented matrix.
\begin{aligned} 3x-2y&= 4 \\ x+5z &= -3 \\ -4x-y+3z &= 0 \end{aligned}

Solution

To make things easier, let's rewrite the system to show each of the coefficients clearly. If a variable term is not written in an equation, it means that the coefficient is 0.
\begin{aligned} \greenD3x&+(\purpleC{-2})y+\goldD{0}z=\blueD {~~~4} \\ \greenD 1x&+\purpleC{~~~~~~0}y+\goldD{5}z = \blueD{-3} \\ \greenD{-4}x&+(\purpleC{-1})y+\goldD3z =\blueD{~~~0} \end{aligned}
This corresponds to the following augmented matrix.
Again, notice how each column corresponds to a variable (start color greenD, x, end color greenD, start color purpleC, y, end color purpleC, start color goldD, z, end color goldD) or the start color blueD, c, o, n, s, t, a, n, t, s, end color blueD. Also notice that the numbers in each row correspond to the coefficients in the same equation.
In general, before converting a system into an augmented matrix, be sure that the variables appear in the same order in each equation, and that the constant terms are isolated on one side.

3) Which matrix represents the system?
\begin{aligned}3w-2x+y+5z&=10 \\w+2y-4z&=5\end{aligned}

Be sure that you have lined up the variables before transferring the coefficients to the matrix.
To make things easier, let's rewrite the system to show each of the coefficients clearly.
\begin{aligned}\greenD3w&+(\purpleC{-2})x+\goldD1y+\blueD{~~~~~~5}z=\tealD{10} \\\greenD1w&+\purpleC{~~~~~~0}x+\goldD2y+(\blueD{-4})z=\tealD{~~5}\end{aligned}
We can now see that this corresponds to the following augmented matrix:
$\left[\begin{array}{rr}{\greenD3} & \purpleC{-2} &\goldD1&~~~\blueD5&\tealD{10} \\ \greenD{1} &\purpleC{0} &\goldD2 &\blueD{-4}&\tealD5 \end{array}\right]$
This is the first option.
Notice that the second option just lines up the coefficients as they are without aligning the variables in columns.
4) Write the following system of equations as an augmented matrix.
\begin{aligned} -a+b-2c&=12\\ 3a+b&=-8 \end{aligned}

Let's rewrite the system to show each of the coefficients clearly.
\begin{aligned} \greenD{-1}&a+\purpleC1b+(\goldD{-2})c=\blueD{12} \\ \greenD3&a+\purpleC{1}b+\goldD{~~~~~~0}c=\blueD{-8} \end{aligned}
We can now see that this corresponds to the following augmented matrix:
$\left[\begin{array}{rr} \greenD{-1} &\purpleC{1} &\goldD{-2} &\blueD{12} \\ {\greenD3} & \purpleC{1} &~~~\goldD0&\blueD{-8} \end{array}\right]$

Challenge problems

5*) Which system is represented by the augmented matrix?
$\left[\begin{array}{rr}{0} & {-3} &-5 &8 \\ {4} & {1} &~~~1&2 \\ {5} & {2} &-1&0 \end{array}\right]$

In an augmented matrix, each row represents one equation in the system and each column represents the coefficients of a variable or the constant terms.
So $\left[\begin{array}{rr}{\greenD0} & \purpleC{-3} &\goldD{-5} &\blueD8 \\ {\greenD4} & \purpleC{1} &~~~\goldD{1}&\blueD2 \\ {\greenD5} & \purpleC{2} &\goldD{-1}&\blueD0 \end{array}\right]$$\quad \longrightarrow\quad$\begin{aligned} \greenD 0x&+(\purpleC{-3})y+(\goldD{-5})z= \blueD8 \\ \greenD4x&+\purpleC{~~~~~~1}y+\goldD{~~~~~~1}z =\blueD 2 \\ \greenD5x&+\purpleC{~~~~~~2}y+(\goldD{-1})z = \blueD0 \end{aligned}
This simplifies to the following system of equations.
\begin{aligned} -3y-5z&= 8 \\ 4x+y+z &= 2 \\ 5x+2y-z &= 0 \end{aligned}
6*) Which matrix represents the system?
\begin{aligned} 3x+2&=12y \\ -8y &= 2x+15 \end{aligned}
$~~~3x+2=12y \quad \longrightarrow \quad 3x-12y=-2$
$-8y=2x+15 \quad \longrightarrow \quad -2x-8y=15$
\begin{aligned} \greenD{3}x&+(\purpleC{-12})y=\goldD{-2} \\ \greenD{-2}x&+(\purpleC{~-8})y =\goldD{15} \end{aligned}
$\left[\begin{array}{rr}{\greenD3} & \purpleC{-12} &\goldD{-2} \\ \greenD{-2} & \purpleC{-8} &\goldD{15} \end{array}\right]$