6 minutes read

This topic covers one of the most important aspects of linear algebra. Here you'll learn how to represent systems of linear equations in matrix form and how to convert this matrix form back to the original form. This will help you solve the systems and will show you one of the applications of matrices. Furthermore, the existence of this correspondence between systems and matrices forms the basis of all linear algebra. It serves as a thread that seamlessly weaves together a geometric and algebraic understanding of linear objects.

Systems of linear equations

Back in school, everyone studied systems of linear equations. Let's take a look at an example for a quick revision:

{x+y=12xy=3\begin{cases} x + y = 1\\ 2x - y = 3\end{cases}

On the left-hand side, you have the unknowns (xx and yy), which are the variables you usually aim to determine, and the respective coefficients. The numbers on the right-hand side of the equations are called the constant terms. There are also other ways of writing the same equations, like:

{x+y1=02xy3=0\begin{cases} x + y - 1 = 0\\ 2x - y - 3 = 0\end{cases}

From this point on, for the sake of convenience, let's consider systems where constant terms are on the right side of the equations while the unknowns with the coefficients are on the left side.

Note: If an equation doesn't have a constant term, then count it as zero.

Let's assume that you have mm linear equations and nn unknowns (as the number of Latin letters is limited, we usually prefer to denote them, using indices like x1x_{1}, x2x_{2}, and so on). Now you can come up with the general form of a system of linear equations:

{a11x1++a1nxn=b1am1x1++amnxn=bm\left\{ \begin{array}{lr} a_{11}x_{1}& + & \cdots & + & a_{1n}x_{n} & = & b_{1} \\ \vdots & & \vdots & & \vdots & & \vdots \\ a_{m1}x_{1} & + & \cdots & + & a_{mn}x_{n} & = & b_{m} \\ \end{array} \right.

Here x1,,xnx_1,\dots, x_n are the unknowns, a11,,amna_{11}, \dots , a_{mn} are the coefficients of unknowns, and b1,,bmb_1,\dots, b_m are constant terms.

Note: If one of the equations in the system doesn't include some of the unknowns, we say that the coefficient in front of this unknown is zero. For example,

{3x1+2x4x5=12x23x3+x5=0\begin{cases} 3x_{1} + 2x_{4} - x_{5} = 1\\ 2x_{2} - 3x_{3} + x_{5} = 0 \end{cases}is the same as

{3x1+0x2+0x3+2x4x5=10x1+2x23x3+0x4+x5=0\begin{cases} 3x_{1} + 0x_{2} + 0x_{3} + 2x_{4} - x_{5} = 1\\ 0x_{1} + 2x_{2} - 3x_{3} + 0x_{4} + x_{5} = 0 \end{cases}

Transforming a system of linear equations to matrix form

Now it's time to review the representation of a system of linear equations in a matrix form. For instance, let's take a look at the following system:{x+2y+3z=42x+3yz=27x3y+2z=1\begin{cases} x + 2y + 3z= 4\\ 2x + 3y - z = 2\\ 7x - 3y + 2z = 1 \end{cases}Its matrix form will be:(123423127321)\left( \begin{array}{ccc|c} 1 & 2 & 3 & 4\\ 2 & 3 & -1 & 2\\ 7 & -3 & 2 & 1\\ \end{array} \right)

Such a matrix is called extended because the constant terms are included in it as a column that is separated with a vertical line. It contains constant terms that are put there according to the order of equations in the system. The left side of the matrix is called the coefficient matrix and contains the coefficients of unknowns. Though sometimes it’s easier to work with the extended form, you are going to see in the future that coefficient matrices are exactly what is usually referred to as matrices in linear algebra.

The coefficient matrix of this system is:

(123231732)\left( \begin{array}{ccc} 1 & 2 & 3 \\ 2 & 3 & -1 \\ 7 & -3 & 2 \\ \end{array} \right)

It is important to maintain the order of both the rows (if the equation is under number kk, then it has to be in the kk-th row of the matrix) and the columns (coefficients for xix_{i} will be in the ii-th column).

Actually, you can change the order of rows, as long as you don't forget about the order on the right-hand side (the order of constant terms). However, you must not change the order of columns. Still, better not to make any changes while you're making the matrix since you could confuse yourself.

You can also write all the unknowns and constant terms as two-column vectors (33 by 11 matrices):

(xyz)and(421)\begin{pmatrix} x \\ y \\ z \end{pmatrix} \qquad \text{and} \qquad \begin{pmatrix} 4 \\ 2 \\ 1 \end{pmatrix}

If you take a look at the general form of a system of linear equations: {a11x1++a1nxn=b1am1x1++amnxn=bm\left\{ \begin{array}{lr} a_{11}x_{1}& + & \cdots & + & a_{1n}x_{n} & = & b_{1} \\ \vdots & & \vdots & & \vdots & & \vdots \\ a_{m1}x_{1} & + & \cdots & + & a_{mn}x_{n} & = & b_{m} \\ \end{array} \right.

you can write for it the extended matrix:(a11a1nb1am1amnbm)\left( \begin{array}{ccc|c} a_{11} & \cdots & a_{1n} & b_{1} \\ \vdots & \ddots & \vdots & \vdots \\ a_{m1} & \cdots & a_{mn} & b_m\\ \end{array} \right) the coefficient matrix

(a11a1nam1amn)\left( \begin{array}{ccc} a_{11} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots \\ a_{m1} & \cdots & a_{mn} \\ \end{array} \right)and the column vectors of the unknowns and constant terms for the general form:(x1xn)and(b1bm)\begin{pmatrix} x_1 \\ \vdots \\ x_{n} \end{pmatrix} \qquad \text{and} \qquad \begin{pmatrix} b_1 \\ \vdots \\ b_m \end{pmatrix}Note that if the number of equations and the number of unknowns are not the same, then the column vectors of unknowns and constant terms have different numbers of entries. For example, the system

{x1x2x3=12x25x3=3\begin{cases} x_{1} - x_{2} - x_{3} = -1\\ 2x_{2} - 5x_{3} = -3 \end{cases}has a three-entry column vector of unknowns and a two-entry column vector of constant terms:

(x1x2x3)and(13)\begin{pmatrix}x_{1}\\x_{2}\\x_{3}\end{pmatrix} \qquad \text{and} \qquad \begin{pmatrix}-1\\-3\end{pmatrix}Now if you multiply the coefficient matrix and the vector of the unknowns, you'll see that it is equal to the column vector of constant terms. So, a system of linear equations can be presented as a product of two matrices:

(a11a1nam1amn)(x1xn)=(b1bm)\left( \begin{array}{ccc} a_{11} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots \\ a_{m1} & \cdots & a_{mn} \\ \end{array} \right) \cdot \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix} =\begin{pmatrix} b_1 \\ \vdots \\ b_m \end{pmatrix}

As mentioned before, It is important to note that if any of aija_{ij} is zero, it gets omitted in the system view, instead of using 0xi0 \cdot x_i for convenience. Therefore, if you haven't noticed some of the unknowns, don't get confused, since it just means that there will be a zero at this place in the matrix. Denoting the coefficient matrix with AA and column vectors of unknowns and constant terms by x\vec{x} and b\vec{b} correspondingly, you can write it down as simply as

Ax=bA\cdot\vec{x}= \vec{b}For now, one can say that this kind of notation does not seem helpful, but as time goes by, it will be more obvious why such a notation could be fruitful.

Lastly note that this process can be reversed. By given AA and b\vec{b} or by given extended matrix one can always write down a system of linear equations just by choosing a set of variables to denote unknowns, summing them row by row with coefficients from AA equations them with the entries of b\vec{b}.

Examples

Let’s look at some examples.

Given a system

{y=2x+y=3x+z=4\left\{ \begin{array}{lr} y= 2\\ x + y = 3\\ x + z = 4 \end{array} \right.keeping in mind that the absent unknowns in equations are considered as having zero coefficients, you will end up with a corresponding expanded matrix

(010211031014)\left( \begin{array}{ccc|c} 0 & 1 & 0 & 2\\ 1 & 1 & 0 & 3\\ 1 & 0 & 1 & 4\\ \end{array} \right)You can also write this using a regular matrix and column vectors:

(010110101)(xyz)=(234)\begin{pmatrix}0&1&0\\1&1&0\\1&0&1\end{pmatrix}\cdot\begin{pmatrix}x\\y\\z\end{pmatrix} = \begin{pmatrix} 2\\3\\4\end{pmatrix}

Now you can do the same in reverse. Consider an extended matrix

(20112031161123/20)\left( \begin{array}{cccc|c} -2& 0 & 1 & 1 & -2\\ 0 & 3 & -1 & 1&6 \\ 1 & 1 & 2 & -3/2 & 0\\ \end{array} \right)you can conclude that the coefficient matrix and constant term column vectors are

(201103111123/2)and(260)\begin{pmatrix}-2&0&1&1\\0&3&-1&1\\1&1&2&-3/2\end{pmatrix} \quad \text{and} \quad \begin{pmatrix}-2\\6\\0 \end{pmatrix}As the rows of the coefficient matrix have four entries it means that this matrix represents a system with four unknowns. Let’s denote them by y1y_{1}, y2y_{2}, y3y_{3} and y4y_{4}. The final system is{2y1+y3+y4=23y2y3+y4=6y1+y2+2y332y4=0\begin{cases} -2y_{1} + y_{3} + y_{4} = -2\\ 3y_{2} - y_{3} + y_{4} = 6\\ y_{1} + y_{2} + 2y_{3} - \frac{3}{2}y_{4} = 0 \end{cases}

Conclusion

In this topic, you've learned how to represent systems of linear equations, using different types of matrices and restoring a linear system by its matrix representation. In the future, using this knowledge, you will be able to learn how to solve large systems using various methods and find out if they have solutions and much more.

4 learners liked this piece of theory. 0 didn't like it. What about you?
Report a typo