Lesson Explainer: Introduction to the System of Linear Equations Mathematics

In this explainer, we will learn how to express a system of linear equations as a matrix equation.

One of the most important applications of matrix operations is to solve a system of linear equations. While we can solve a system of two or three equations by using either the substitution or elimination methods, these methods quickly become overwhelming for a larger number of equations and unknown constants. We could program a computer to solve these problems for us, but how do we program a computer to perform such operations?

When we convert a system of linear equations into a matrix equation of the form 𝐴𝑋=𝐵, we can use this format to concisely enter our matrix into a computer. In this explainer, we will not discuss entering the matrix equation into a computer, but we will focus on how to write a matrix equation equivalent to a given linear system of equations.

Let us begin by considering the simplest system, which has two equations and two unknowns.

How To: Writing Matrix Equations Equivalent to a System of Two Equations

Consider a system of equations given by 𝑎𝑥+𝑏𝑦=𝑒,𝑐𝑥+𝑑𝑦=𝑓 for some known constants 𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓. We can write this system of two equations as one matrix equation 𝑎𝑏𝑐𝑑𝑥𝑦=𝑒𝑓.

The 2×2 matrix on the left-hand side is called the coefficient matrix, the column matrix on the left-hand side is called the variable matrix, and the column matrix on the right-hand side is called the constant matrix. We can concisely express this equation as 𝐴𝑋=𝐵, where 𝐴 is the coefficient matrix, 𝑋 is the variable matrix, and 𝐵 is the constant matrix.

If we carry out the matrix multiplication on the left-hand side of the matrix equation, this will be the same as 𝑎𝑥+𝑏𝑦𝑐𝑥+𝑑𝑦=𝑒𝑓.

Equating the corresponding entries of the matrices on both sides of this equation leads back to the system of two linear equations. Hence, this matrix equation is equivalent to the system of two linear equations.

We can see that the coefficients of 𝑥 and 𝑦 in the system of equations formed the entries of the 2×2 matrix, hence the name coefficient matrix. When writing down the coefficient matrix, we need to be careful about the order of the entries, which must agree with the order of entries in the variable matrix. Since the variable matrix has 𝑥 as its first entry, the coefficients of 𝑥 go in the first column. Hence, the same coefficient matrix is used even if the first equation in the system is written as 𝑏𝑦+𝑎𝑥=𝑒. Rather than following the order of the coefficients written in the given equation, we need to consider which variable it is the coefficient of.

We also note that the column matrix on the right-hand side of the matrix equation contains the constant terms from the right-hand sides of the system of equations, hence the name constant matrix. The order of these constants must be consistent with the order of the rows in the coefficient matrix. Since the coefficients of the first equation, 𝑎𝑥+𝑏𝑦=𝑒, are written in the first row of the coefficient equation, the constant 𝑒 from this equation must also appear in the first row of this equation.

In our first example, we will write a matrix equation that is equivalent to a given system of two equations.

Example 1: Expressing a Pair of Simultaneous Equations as a Matrix Equation

Express the simultaneous equations 3𝑥+2𝑦=12,3𝑥+𝑦=7 as a matrix equation.

Answer

In this example, we need to find a matrix equation that is equivalent to the given pair of simultaneous equations. Recall that a pair of simultaneous equations given by 𝑎𝑥+𝑏𝑦=𝑒,𝑐𝑥+𝑑𝑦=𝑓 can be written as the matrix equation 𝑎𝑏𝑐𝑑𝑥𝑦=𝑒𝑓.

We can see that the given pair of simultaneous equation has the same form as our formula. More specifically,

  • all variables are on the left-hand sides,
  • all constants are on the right-hand sides,
  • variables are arranged in alphabetical order.

Hence, we can form the coefficient matrix and constant matrix by taking the numbers in the corresponding location within the simultaneous equations. The only part to be careful about here is to note that the coefficient of 𝑦 in the second equation is equal to 1 since there is no visible coefficient. To make this fact clear, we can write 1 as its coefficient: 3𝑥+2𝑦=12,3𝑥+1𝑦=7.

This leads to the coefficient and constant matrices, respectively, 3231,127.

Substituting these matrices into the matrix equation, we have 3231𝑥𝑦=127.

In the previous example, we found a matrix equation from a pair of simultaneous equations in standard form.

Definition: Standard Form of a System of Equations

A system of equations is in standard form if

  • all variables are on the left-hand sides,
  • all constants are on the right-hand sides,
  • variables are arranged in alphabetical order (or the order specified in the variable matrix).

Starting with a system of equations in standard form is very helpful when we need to find an equivalent matrix equation. If we are given a system of equations that is not in standard form, we can begin by rearranging the system into standard form.

In the next example, we will first write a given system of two equations in its standard form and then find a matrix equation corresponding to the system.

Example 2: Expressing a Pair of Simultaneous Equations as a Matrix Equation

Express the simultaneous equations 3𝑥24=8𝑦,𝑥=3𝑦 as a matrix equation.

Answer

In this example, we need to find a matrix equation that is equivalent to the given pair of simultaneous equations. Recall that a pair of simultaneous equations given by 𝑎𝑥+𝑏𝑦=𝑒,𝑐𝑥+𝑑𝑦=𝑓 can be written as the matrix equation 𝑎𝑏𝑐𝑑𝑥𝑦=𝑒𝑓.

Here, it is important to note that the entries of the coefficient matrix 𝑎𝑏𝑐𝑑 are the coefficients of the simultaneous equations in the order given in the variable matrix 𝑥𝑦. This means that the first column of the coefficient matrix contains the coefficients of variable 𝑥, while the second column contains the coefficients of variable 𝑦.

Our given equations are not in the correct format since some of the variables appear on the right-hand sides of the equations, and some of the constants appear on the left-hand sides. Recall that a system of equation is in standard form if

  • all variables are on the left-hand sides,
  • all constants are on the right-hand sides,
  • variables are arranged in alphabetical order.

We begin by rearranging the given pair of simultaneous equations into standard form: 3𝑥+8𝑦=24,𝑥+𝑦=3.

Hence, we can form the coefficient matrix and constant matrix by taking the numbers in the corresponding location within the simultaneous equations. The only part to be careful about here is to note that the coefficients in the second equation are equal to 1. To make this fact clear, we can write 1 as its coefficient: 3𝑥+8𝑦=24,1𝑥+1𝑦=3.

This gives the coefficient and constant matrices, respectively, 3811,243.

Substituting the coefficient and constant matrices into the matrix equation, we obtain 3811𝑥𝑦=243.

Now that we know how to write a matrix equation corresponding to a system of two linear equations, let us consider how to write a matrix equation for a larger system. Before we discuss examples of larger systems, we need to understand how the number of equations and the number of unknowns in a system of equations relates to the order of the coefficient matrix.

Our previous examples contained a system of two equations with two unknowns. Consequently, the equivalent matrix forms of these systems have had coefficient matrices of order 2×2. In larger systems, we have the following relation.

Definition: Order of Coefficient Matrices

Let 𝐴𝑋=𝐵 be the matrix form of an equivalent system of linear equations. Then the order of the coefficient matrix 𝐴 is given by ()×().numberofequationsnumberofunknowns

This means that we can find the number of equations and unknowns in a system of equations when we are given the order of its coefficient matrix. Equivalently, if we are given a system of 𝑚 linear equations with 𝑛 unknowns, this means that the order of the coefficient matrix will be 𝑚×𝑛. Following from this, since there are 𝑛 unknowns, the order of the variable matrix 𝑋 will be 𝑛×1. Finally, since there are 𝑚 equations, hence 𝑚 constants on the right-hand sides, the order of the constant matrix 𝐵 will be 𝑚×1. Altogether, the orders of the matrices in the equation 𝐴𝑋=𝐵 are as follows: (𝑚×𝑛)×(𝑛×1)=(𝑚×1).

Thus, we can confirm that the matrix multiplication is valid. We note that both 𝑋 and 𝐵 are always column matrices in this case.

In the next example, we will find the number of equations in a system from the order of its coefficient matrix.

Example 3: Order of a System of Equations

Consider a system of linear equations written in matrix form as 𝐴𝑋=𝐵. If the order of matrix 𝐴 is 𝑚×𝑛 and the order of matrix 𝑋 is 𝑛×1, how many equations does the system have?

Answer

In this example, we need to find the number of equations in a system of equations where we are given the order of matrices involved in a matrix equation. In the matrix equation 𝐴𝑋=𝐵, we know that 𝐴 is the coefficient matrix, 𝑋 is the variable matrix, and 𝐵 is the constant matrix. Recall that the order of the coefficient matrix in a matrix equation is given by ()×().numberofequationsnumberofunknowns

We know that the coefficient matrix, 𝐴, is of order 𝑚×𝑛. Hence, the number of equations in the corresponding system is 𝑚.

In the next example, we will perform matrix multiplication to identify a system of linear equations from a given matrix equation.

Example 4: Finding an Unknown Matrix in a Matrix Equation

Find the matrix 𝐴 such that 𝐴𝑥𝑥𝑥𝑥=𝑥+3𝑥+2𝑥2𝑥+𝑥6𝑥𝑥+3𝑥+𝑥.

Answer

In this example, we need to find a matrix 𝐴 satisfying the given matrix equation. Let us begin by finding the order of the matrix. We know that, to multiply a pair of matrices, the number of columns of the first matrix must equal the number of rows of the second matrix. Since the second matrix has 4 rows, matrix 𝐴 must have 4 columns.

We recall that multiplying an 𝑚×𝑛 matrix to an 𝑛×𝑝 matrix results in an 𝑚×𝑝 matrix. We can see that the order of the matrix on the right-hand side of the given matrix equation is 4×1. This gives 𝑚=4. Together with the number of columns we found earlier, we obtain the order of matrix 𝐴, which is 4×4.

We can write 𝑥𝑥𝑥𝑥=𝑥+3𝑥+2𝑥2𝑥+𝑥6𝑥𝑥+3𝑥+𝑥.

To multiply the 4×4 matrix to a column matrix, we need to first pick each row of the 4×4 matrix and multiply it to the column matrix. To multiply a row to the column matrix, we multiply the corresponding entries from each matrix and add up the products. Using different colors, we can indicate the corresponding entries from the first row: 𝑥𝑥𝑥𝑥=𝑥+3𝑥+2𝑥2𝑥+𝑥6𝑥𝑥+3𝑥+𝑥.

Multiplying the row with the column, we obtain 𝑥+𝑥+𝑥+𝑥=𝑥+3𝑥+2𝑥.

We can match the coefficients of corresponding terms from both sides of the equation. However, the coefficient of 𝑥 is not visible, and also there is no term on the right-hand side containing 𝑥. This means that the coefficient of 𝑥 is 1 and the coefficient of 𝑥 is 0. We can write these coefficients into the equation to write 𝑥+𝑥+𝑥+𝑥=1𝑥+3𝑥+2𝑥+0𝑥.

This tells us the entries in the first row of matrix 𝐴: 𝐴=1320.

We can continue this process to fill all rows of matrix 𝐴. The multiplication of the second row of 𝐴 with the column should result in 2𝑥+𝑥. We need to rearrange this order so that 𝑥 is written first and also add zeros as coefficients of the terms that do not appear in the expression. Hence, we obtain 1𝑥+0𝑥+2𝑥+0𝑥.

This gives us the second row of 𝐴: 𝐴=13201020.

Multiplying the third and fourth row to the column matrix should produce, respectively, 0𝑥+0𝑥+6𝑥+0𝑥,1𝑥+3𝑥+0𝑥+1𝑥.

This leads to the matrix 𝐴=1320102000601301.

In the previous example, we found the matrix 𝐴 from the given matrix equation by working out the matrix multiplication backward. This process can be used to write a matrix equation from the given system of linear equations. Matrix 𝐴 in this example is a coefficient matrix. We were able to find this coefficient matrix by rearranging the variable expressions in the correct order, as indicated in the variable matrix, and writing coefficients of the variables as entries of the matrix.

In the next example, we will find an equivalent system of equations as a given matrix equation.

Example 5: Identifying a Set of Simultaneous Equations from a Matrix Equation

Write down the set of simultaneous equations that could be solved using the given matrix equation: 124101348𝑝𝑞𝑟=11610.

Answer

In this example, we need to find a set of simultaneous equations that is equivalent to the given matrix equation. We can do this by working out the matrix multiplication on the left-hand side of the equation above. Before we multiply matrices, let us check to see if the multiplication is well-defined. Recall that, to multiply a pair of matrices, the number of columns of the first matrix must equal the number of rows of the second matrix. We can see that the first matrix on the left-hand side has 3 columns, and the variable matrix has 3 rows. Hence, the multiplication is well-defined.

Computing the matrix multiplication, 124101348𝑝𝑞𝑟=𝑝2𝑞4𝑟𝑝+𝑟3𝑝+4𝑞8𝑟.

Substituting this matrix to the left-hand side of the given equation, 𝑝2𝑞4𝑟𝑝+𝑟3𝑝+4𝑞8𝑟=11610.

Recall that a pair of matrices are equal if each corresponding entries in the two matrices are equal. Hence, we obtain the set of simultaneous equations: 𝑝2𝑞4𝑟=11,𝑝+𝑟=6,3𝑝+4𝑞8𝑟=10.

In the previous example, we found a system of equations equivalent to a given matrix equation. Reversing this process gives us a method of writing a matrix equation from a given system of equations. We can see that this process is very similar to how we wrote a matrix equation corresponding to a system of two equations and two unknowns.

How To: Writing Matrix Equations Equivalent to a System of 𝑚 Equations

Consider a system of 𝑚 linear equations with 𝑛 unknowns 𝑥,𝑥,,𝑥 given by 𝑎𝑥+𝑎𝑥𝑎𝑥=𝑏,𝑎𝑥+𝑎𝑥𝑎𝑥=𝑏,𝑎𝑥+𝑎𝑥𝑎𝑥=𝑏.

This system of equations can be written as the matrix equation: 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑥𝑥𝑥=𝑏𝑏𝑏.

We can concisely express this equation as 𝐴𝑋=𝐵, where 𝐴 is the coefficient matrix, 𝑋 is the variable matrix, and 𝐵 is the constant matrix.

Similar to the system of two equations, it is helpful to first write the system of equations in the standard form by ensuring

  • all variables are on the left-hand sides,
  • all constants are on the right-hand sides,
  • variables are arranged in the order specified in the variable matrix.

Additionally, it is also helpful to vertically align terms corresponding to the same variable. For instance, consider the system of equations 𝑥2𝑦+3𝑤=1,3𝑥+11𝑦+5𝑧7𝑤=0,7𝑥24𝑦11𝑧+25𝑤=3.

We can see that these equations are in the standard form if the variable matrix is given by 𝑥𝑦𝑧𝑤. We can also see a blank space in the first equation due to the fact that it is missing the 𝑧 term. This means that the coefficient of 𝑧 is zero in this case. This leads to the matrix equation: 1203311577241125𝑥𝑦𝑧𝑤=103.

Hence, once we write the system of linear equations in standard form and vertically aligned, it is simple to write down a matrix equation corresponding to the system.

In our final example, we will find the matrix equation corresponding to a system of three linear equations.

Example 6: Expressing a Set of Simultaneous Equations as a Matrix Equation

Express the following set of simultaneous equations as a matrix equation: 7𝑥3𝑦+6𝑧=5,5𝑥2𝑦+2𝑧=11,2𝑥3𝑦+8𝑧=10.

Answer

Before we begin, we should note that there are 3 equations and 3 variables: 𝑥, 𝑦, and 𝑧. This means that the coefficient matrix will be of order 3×3. Our goal will be to find the matrix equation of the form 𝑥𝑦𝑧=, which reproduces the system of linear equations in the statement of the question.

We begin by taking the first of the three given equations, which is 7𝑥3𝑦+6𝑧=5.

By using the definition of matrix multiplication, we can populate the first row of the coefficient matrix as 736𝑥𝑦𝑧=5.

We still need to take the second and third lines in the system of equations and write these into the coefficient matrix. The second equation is 5𝑥2𝑦+2𝑧=11, which we can embed into the second row of the coefficient matrix, crucially without changing the first row. This gives 736522𝑥𝑦𝑧=511.

Now, we only have the third equation, 2𝑥3𝑦+8𝑧=10, which we can write into the third row of the coefficient matrix without affecting the entries in the two rows above. This gives 736522238𝑥𝑦𝑧=51110.

This represents the full representation of the system of linear equations in matrix form.

Let us finish by recapping a few important concepts from the explainer.

Key Points

  • Given a system of equations, we can write an equivalent matrix equation of the form 𝐴𝑋=𝐵. Here 𝐴 is the coefficient matrix, 𝑋 is the variable matrix, and 𝐵 is the constant matrix.
  • A system of equations is in standard form if
    • all variables are on the left-hand sides,
    • all constants are on the right-hand sides,
    • variables are arranged in alphabetical order (or the order specified in the variable matrix).
  • The order of the coefficient matrix from an equivalent system of equations is given by ()×().numberofequationsnumberofunknowns
  • Consider a system of 𝑚 linear equations with 𝑛 unknowns 𝑥,𝑥,,𝑥 given by 𝑎𝑥+𝑎𝑥𝑎𝑥=𝑏,𝑎𝑥+𝑎𝑥𝑎𝑥=𝑏,𝑎𝑥+𝑎𝑥𝑎𝑥=𝑏. This system of equations can be written as the matrix equation 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑥𝑥𝑥=𝑏𝑏𝑏.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.