Become a math whiz with AI Tutoring, Practice Questions & more.

HotmathMath Homework. Do It Faster, Learn It Better.

# Representing Systems of Linear Equations using Matrices

As we start to learn about matrices, one of our first steps should be to learn about the relationship between matrices and systems of linear equations. As we will soon find out, it is possible to write systems of linear equations as matrices. But why would we ever want to do this? What exactly is the relationship between a matrix and a system of linear equations? How can matrices help us solve systems of linear equations, and what''s a matrix in the first place? Let's find out:

## The basics of matrices

The English language has various definitions for the term "matrix." The term matrix also has its own separate definition in the world of biology. In a very broad sense, a matrix is defined as an environment with specific rules. It is a "system" or a hierarchy through which certain things are organized.

In math, a matrix is a set of numbers arranged in columns and rows. Once we place these numbers inside the matrix we call them "elements" of that matrix. The word was first coined by the English mathematician James Sylvester in the 19th century, although it was his friend Arthur Cayley who truly advanced the concept of matrices. Today, we use matrices in a number of mathematical applications -- including the study of linear equations.

## Representing systems of linear equations with matrices

The best way to understand the concept of a matrix is to build our own matrices. We can do this by taking a system of linear equations and rewriting it or "representing" it as a matrix. Consider the following system of linear equations:

• $2x+3y=8$
• $5x-y=-2$

This system of linear equations is ready to be turned into a matrix. Why? Because both equations are already in standard form. But what happens if we don't get a system that is written in standard form? In this case, we would have to rearrange our equations a little -- because everything needs to line up perfectly before we turn our equations into matrices. Consider the following system:

• $2x+3y-8=0$
• $5x=-2+y$

In this case, the equations are not written in standard form. We would need to change the values around so that both equations take the following form: \$Ax+By = C\$. In this equation, the C value is our integer or "constant." A and B are coefficients. Let's take another look at our first system of linear equations:

• $2x+3y=8$
• $5x-y=-2$

What happens if we focus only on the coefficients A and B? What happens if we eliminate the variables and the constants? This would make life much easier, as we already know where the variables lie. If both equations are lined up in the same way, then we can eliminate the x and y variables and simply remember that the first column represents the x value while the second column represents the y column. We would be left with something like this:

This is our first matrix, and we call this the "coefficient matrix." This matrix gets its name from the elements within, which represent only the coefficients of our system. We can also call this a "square matrix" and a $2×2$ matrix because of its shape and form. But we're not done just yet. Before we start working with this matrix, we need to construct a few additional matrices.

Remember that the variables are x and y. Therefore, our very simple variable matrix looks like this:

Last but not least, we need to construct our "constant matrix." This matrix includes elements taken from the right side of the equation:

Now that we have turned every aspect of our system of linear equations into a matrix. Putting all three matrices together, we are left with something like this:

Now we can see that the general concept of a matrix is actually quite simple. We are basically writing our linear equation in a different way. This matrix is equivalent to our original system of linear equations. If we wanted to double-check that this is true, we only need to multiply the coefficient matrix by the variable matrix. This is a basic example of matrix multiplication.

We can also think of our matrix as a function of the vector

We can define this function as:

It's worth noting that we can make this even simpler!

We can write this as $AX=B$ .

In this equation:

• $A$ represents the $2×2$ coefficient matrix
• $X$ represents the variables $x$ and $y$
• $B$ represents our constants $8$ and $-2$

## Why should we build matrices?

Gaussian Elimination, named after the German mathematician Carl Friedrich Gauss, is a fundamental algorithm in linear algebra for solving systems of linear equations. The method consists of two parts: forward elimination and back substitution.

In Gaussian Elimination, we begin with a system of linear equations and perform a series of elementary row operations to transform the augmented matrix of the system (i.e., the matrix of coefficients augmented by the column of constants) into row-echelon form or even further into reduced row-echelon form.

The row-echelon form of a matrix satisfies two conditions:

1. All non-zero rows are above rows that consist entirely of zeros, if any.
2. The leading coefficient (the first non-zero number from the left, also called the pivot) of a non-zero row is always strictly to the right of the leading coefficient of the row above it.

In the reduced row-echelon form, we have two additional conditions:

1. The pivot of each non-zero row is 1.
2. The pivot is the only non-zero entry in its column.

The three types of elementary row operations we can perform on the matrix are:

1. Swap two rows.
2. Multiply a row by a non-zero scalar.
3. Add or subtract a multiple of one row to another row.

The goal of Gaussian Elimination is to use these operations to create a matrix where the bottom left corner is filled with zeros (this is the row-echelon form), and if carried further to make all the leading coefficients 1 and ensure they are the only non-zero entries in their columns, we get the reduced row-echelon form.

Once the augmented matrix is in row-echelon form, it is then straightforward to find the solutions to the system of equations through a process called back-substitution, which involves solving for the variables from the bottom row up. If the matrix is in the reduced row-echelon form, the solution is even more apparent: if the system is consistent (i.e., it has at least one solution), then each variable corresponds to exactly one pivot, and its value is given by the constant in the same row.

Gaussian Elimination is not only important for solving systems of linear equations, but it also provides a method to find the rank of a matrix, calculate the determinant of a square matrix, and invert a matrix, among other things.

## Gaussian Elimination

Let's take the following system of equations:

First, we can write this system of equations as an augmented matrix:

Make the pivot in the 1st column by dividing the 1st row by 3:

Subtract 2 times the 1st row from the 2nd row:

Subtract 5 times the 1st row from the 3rd row:

Make the pivot in the 2nd column by dividing the 2nd row by $\frac{5}{3}$ :

Subtract $\left(\frac{2}{3}\right)$ times the 2nd row from the 1st row:

Subtract $\left(-\frac{19}{3}\right)$ times the 2nd row from the 3rd row:

Make the pivot in the 3rd column by dividing the 3rd row by 9:

Add the 3rd row to the 1st row:

Subtract the 3rd row from the 2nd row:

Solution set:

• $x=\frac{23}{45}$
• $y=\frac{4}{45}$
• $z=\frac{32}{45}$

## Pair your student with a tutor who knows how to represent systems of linear equations with matrices

Matrices are meant to make life easier for students of mathematics, but the opposite is often true. With help from a tutor, your student can realize the usefulness of matrices. Math tutors have all kinds of handy tips and tricks up their sleeves -- often cultivated through years of university-level learning. With help from their tutor, your student can ask plenty of questions and practice their skills in a 1-on-1 environment. Reach out to our Academic Consultants today to learn more about the possibilities. Varsity Tutors will pair your student with a suitable tutor.

;