1. Matrix

A matrix is a grid of $m$ rows and $n$ columns. It contains the coefficients of a linear system. These are the so-called elements of the matrix.

Example I shows how a linear system is turned into a matrix equation in the form $A\vec{x} = \vec{y}$.

Example I

Index notation is used to specify a matrix element $a_{i,j}$, with $i$ the row and $j$ the column. For example, the element $a_{3,2}$ equals $4$ in the $A$ matrix of example I.

2. Matrix elimination

The matrix elimination, also called Gaussian elimination, is a method to solve a linear system. This is in fact the addition method applied to matrices.

The starting point for a matrix elimination is the augmented matrix, as example II shows. The variable elimination is performed by adding two rows together. One of the two rows is then replaced by the result of the addition.

Example II


Once we get the augmented matrix in echelon form we can solve back the system by going from the bottom up, as follows :

$ 10z = 30 \iff$ $z = 3$

Let’s replace $z$ in the second row :

$ y + 1 \cdot \underbrace{3}_{z} = 1 \iff$ $y = -2$

Let’s replace $y$ and $z$ in the first row :

$-1x + -3 \cdot \underbrace{-2}_{y} + 1 \cdot \underbrace{3}_{z} = 10 \iff -x + 9 = 10 \iff$ $x = -1$

The solution is :

single intersection point of three planes

Figure 3.1 : the solution of a linear system of three variables is the intersection point of three planes (wikipedia)

Example III


 

From the last row of the echelon matrix we have :

$0x+0y+0z = -5$

That equation is unsolvable, therefore the system has no solution :

Example IV

 

From the last row of the echelon matrix we have :

$0x+0y = 0 \iff 0=0$

That equation provides no information about the variables, since any pair of $(x, y)$ satisfies it.

Let’s move on to the upper row from which we get :

$1x+-1y = 1 \iff x = 1+y$. Let $y= \beta$.

Only one relevant equation remains but the system has two variables. Thus the system has infinitely many solutions and the general solution is :

Wrap-up

The matrix equation makes it possible to separates the coefficients from the variables. This simplifies the notation.

Solving a matrix equation is done by performing operations on the augmented matrix rows, namely interchanging rows, multiplying a row by a factor (different from $0$) and replacing a row by the sum of two rows together. This until we eventually get a matrix in echelon form (like a staircase).

From the echelon matrix, we solve rows by substituting back the values found from the bottom up. Rows of all zeroes do not provide any information about the variables and can thus be ignored.