Learn

An extremely useful application of matrices is for solving systems of linear equations. Consider the following system of equations in its algebraic form.

a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3\begin{aligned} a_1 x + b_1 y + c_1 z = d_1 \\ a_2 x + b_2 y + c_2 z = d_2 \\ a_3 x + b_3 y + c_3 z = d_3 \end{aligned}

This system of equations can be represented using vectors and their linear combination operations that we discussed in the previous exercise. We combine the coefficients of the same unknown variables, as well as the equation solutions, into vectors. These vectors are then scalar multiplied by their unknown variable and summed.

x[a1a2a3]+y[b1b2b3]+z[c1c2c3]=[d1d2d3]x \begin{bmatrix} a_1 \\ a_2 \\ a_3 \\ \end{bmatrix} + y \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ \end{bmatrix} + z \begin{bmatrix} c_1 \\ c_2 \\ c_3 \\ \end{bmatrix} = \begin{bmatrix} d_1 \\ d_2 \\ d_3 \\ \end{bmatrix}

Our final goal is going to be to represent this system in form Ax = b, using matrices and vectors. As we learned earlier, we can combine vectors to create a matrix, which we’ll do with the coefficient vectors to create matrix A. We can also convert the unknown variables into vector x. We end up with the following Ax = b form:

[a1b1c1a2b2c2a3b3c3][xyz]=[d1d2d3]\begin{bmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \\ \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ \end{bmatrix} = \begin{bmatrix} d_1 \\ d_2 \\ d_3 \\ \end{bmatrix}

Click below if you would like to see how these two expressions are equivalent:

[a1b1c1a2b2c2a3b3c3][xyz]=x[a1a2a3]+y[b1b2b3]+z[c1c2c3]\begin{bmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \\ \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ \end{bmatrix} = x \begin{bmatrix} a_1 \\ a_2 \\ a_3 \\ \end{bmatrix} + y \begin{bmatrix} b_1 \\ b_2 \\ b_3 \\ \end{bmatrix} + z \begin{bmatrix} c_1 \\ c_2 \\ c_3 \\ \end{bmatrix}

We can also write Ax = b in the following form:

Ax=b[Ab]Ax = b \rightarrow \begin{bmatrix} A \bigm| b \end{bmatrix}

This means we can write our Ax = b equation above as:

[a1b1c1a2b2c2a3b3c3][xyz]=[d1d2d3][a1b1c1d1a2b2c2d2a3b3c3d3]\begin{bmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \\ \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ \end{bmatrix} = \begin{bmatrix} d_1 \\ d_2 \\ d_3 \\ \end{bmatrix} \rightarrow \begin{bmatrix} a_{1} & b_{1} & c_{1} \bigm| d_{1} \\ a_{2} & b_{2} & c_{2} \bigm| d_{2} \\ a_{3} & b_{3} & c_{3} \bigm| d_{3} \\ \end{bmatrix}

This is what is known as an augmented matrix, and we will use these in the following exercises to solve for linear systems!

Instructions

To the right is a blank augmented matrix. In each of the boxes, you can type in a number. Type in numbers such that the augmented matrix represents the following system of linear equations:

3x+2z=45y+10z=62x+3y3z=8\begin{aligned} -3x + 2z = 4 \\ -5y + 10z = 6 \\ 2x + 3y - 3z = 8 \end{aligned}

When each number has been typed in correctly, the matrix should turn green and signal that you have the correct augmented matrix!

If you get stuck, you can click below to see the solution.

Solution
The solution matrix is [[-3, 0, 2, 4],[0, -5, 10, 6],[2, 3, -3, 8]]

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?