Title: Default for 8.3 Solution by Gauss Elimination
Course: HELM Workbooks 2023-2024

Solving three equations in three unknowns

Solving the system of linear equations

\[\begin{matrix} a_{11} x + a_{12} y + a_{13} z = b_1 \\ a_{21} x + a_{22} y + a_{23} z = b_2 \\ a_{31} x + a_{32} y + a_{33} z = b_3 \\ \end{matrix}\]

is to find \(x, y\) and \(z\) such that all the equations are satisfied. In matrix form, this can be written as \(AX = B\). In other words,

\[ \displaystyle{\left [ \begin{matrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \\ \end{matrix} \right ] \left [ \begin{matrix} x \\ y \\ z \\ \end{matrix} \right ] = \left [\begin{matrix} b_1 \\ b_2 \\ b_3 \\ \end{matrix} \right ] . }\]

Note that not all systems have unique solutions. Some systems will have no solutions while others will have infinitely many. We begin here with the most simple cases and develop more general cases as we progress.

The diagonal system

The easiest set of three simultaneous linear equations to solve is of the following type: \[\begin{matrix} 3x_1 & = & 6 \\ 2x_2 & = & 5 \\ 4x_3 & = & 7 \\ \end{matrix}\] which obviously has solution \(\displaystyle{[x_1,x_2,x_3]^T=\left[2,\frac{5}{2},\frac{7}{4}\right]^T}\) or, equivalently, \(\displaystyle{x_1=2, x_2=\frac{5}{2}, x_3=\frac{7}{4}}\).

In matrix form \(AX=B\) the equations are \[\left[\begin{array}{ccc}3&0&0\\ 0&2&0\\ 0&0&4\end{array}\right]\left[\begin{array}{c}x_1\\ x_2\\ x_3\end{array}\right]=\left[\begin{array}{c}6\\ 5\\ 7\end{array}\right]\] where the matrix of coefficients, \(A\), is clearly diagonal.

Exercise

Solve the following system of equations:

\[ [value] [value] = [value].\]
\(X=\)
Feedback: We are given the system of equations: \[ [value] [value] = [value].\] The sytem reads \[\begin{matrix} [value]x & = & [value] \\ [value]y & = & [value] \\ [value]z & = & [value] \\ \end{matrix}\] From which we can directly obtain \[x = [value], \qquad y = [value] , \qquad z = [value]. \]

The triangular system

The next easiest system of equations to solve is of the following kind: \[\begin{matrix} 3x_1 & + & x_2 & - & x_3 & = & 0 \\ & & 2x_2 & + & x_3 & = & 12 \\ & & & & 3x_3 & = & 6 \\ \end{matrix}\] The last equation can be solved immediately to give \(x_3=2\).

Substituting this value of \(x_3\) into the second equation gives

\[2x_2+2=12\qquad{\rm from\ which}\qquad 2x_2=10\qquad {\rm so\ that}\qquad x_2=5\]

Substituting these values of \(x_2\) and \(x_3\) into the first equation gives

\[3x_1+5-2=0\qquad {\rm from\ which}\qquad\ 3x_1=-3\qquad {\rm so\ that}\qquad x_1=-1\] Hence the solution is \([x_1,x_2,x_3]^T=[-1,5,2]^T.\)

This process of solution is called back-substitution.

In matrix form the system of equations is

\[\left[\begin{array}{rrr}3&1&-1\\ 0&2&1\\ 0&0&3\end{array}\right]\left[\begin{array}{c}x_1\\ x_2\\ x_3\end{array}\right]=\left[\begin{array}{r}0\\ 12\\ 6\end{array}\right].\]

The matrix of coefficients is said to be upper triangular because all elements below the leading diagonal are zero. Any system of equations in which the coefficient matrix is triangular (whether upper or lower) will be particularly easy to solve.

Exercise

Solve the following system of equations using back-substitution:

\[ [value] [value] = [value].\]
\(X=\)
Feedback: We are given the system \[ [value] [value] = [value].\] For an upper triangular matrix, we apply back-substitution. The last equation can be solved immediately to give \[ z = [value]. \] Substituting this value of \( z \) into the second equation, we get \[[value] \] which implies \(y = [value] \). Finally, substituting this values of \( y \) and \( z \) into the first equation, we get \[[value] \] which implies \(x = [value] \). Therefore, \[ x = [value], \qquad y = [value], \qquad [value]. \]

Although we have worked so far with integers this will not always be the case and fractions will enter the solution process. We must then take care and it is always wise to check that the equations balance using the calculated solution.

The general system of three simultaneous linear equations

In the previous subsection we met systems of equations which could be solved by back-substitution alone. In this Section we meet systems which are not so amenable and where preliminary work must be done before back-substitution can be used.

Consider the system \[\begin{matrix} x_1 & + & 3x_2 & + & 5x_3 & = & 14 \\ 2x_1 & - & x_2 & - & 3x_3 & = & 3 \\ 4x_1 & + & 5x_2 & - & x_3 & = & 7 \\ \end{matrix}\] We will use the solution method known as Gauss elimination, which has three stages. In the first stage the equations are written in matrix form. In the second stage the matrix equations are replaced by a system of equations having the same solution but which are in triangular form. In the final stage the new system is solved by back-substitution.

Stage 1:Matrix Formulation

The first step is to write the equations in matrix form:

\[\left[\begin{matrix} 1&3&5\\ 2&-1&-3\\ 4&5&-1 \\ \end{matrix}\right] \left[\begin{matrix} x_1\\ x_2\\ x_3 \\ \end{matrix}\right] = \left[\begin{matrix} 14\\ 3\\ 7\\ \end{matrix}\right].\] Then, for conciseness, we combine the matrix of coefficients with the column vector of right-hand sides to produce the augmented matrix:

\[\left[\begin{array}{rrr|r} 1 & 3 & 5 & 14 \\ 2 & -1 & -3 & 3 \\ 4 & 5 & -1 & 7 \\ \end{array}\right].\]

If the general system of equations is written \(A X =B\) then the augmented matrix is written \([A|B]\). Hence the first equation \[x_1+3x_2+5x_3=14\] is replaced by the first row of the augmented matrix, \[1 \qquad 3\qquad 5\qquad |\qquad 14\] and so on. Stage 1 has now been completed. We will next triangularise the matrix of coefficients by means of row operations. There are three possible row operations:

- interchange two rows;
- multiply or divide a row by a non-zero constant factor;
- add to, or subtract from, one row a multiple of another row.

Note that interchanging two rows of the augmented matrix is equivalent to interchanging the two corresponding equations. The shorthand notation we use is introduced by example. To interchange row 1 and row 3 we write \(R1\leftrightarrow R3\). To divide row 2 by 5 we write \(R2\div 5\). To add three times row 1 to row 2, we write \(R2+3R1\). In the Task which follows you will see where these annotations are placed.

Note that these operations neither create nor destroy solutions so that at every step the system of equations has the same solution as the original system.

Stage 2: Triangularisation

The second stage proceeds by first eliminating \(x_1\) from the second and third equations using row operations.

\[\left[\begin{array}{rrr|r} 1 & 3 & 5 & 14 \\ 2 & -1 & -3 & 3 \\ 4 & 5 & -1 & 7 \end{array}\right] \begin{array}{c} \\ R2-2 \times R1 \\ R3-4 \times R1 \\ \end{array} \Rightarrow \left[\begin{array}{rrr|r} 1 & 3 & 5 & 14 \\ 0 & -7 & -13 & -25 \\ 0 & -7 & -21 & -49 \\ \end{array}\right]\]

In the above we have subtracted twice row (equation) 1 from row (equation) 2.

In full these operations would be written, respectively, as \[(2x_1-x_2-3x_3)-2(x_1+3x_2+5x_3)=3-2\times 14 \qquad \text{or} \qquad -7x_2-13x_3=-25\] and \[(4x_1+5x_2-x_3)-4(x_1+3x_2+5x_3)=7-4\times 14 \qquad \text{or} \qquad -7x_2-21x_3=-49.\]

Now since all the elements in rows 2 and 3 are negative we multiply throughout by \(-1\): \[\left[\begin{array}{rrr|r} 1 & 3 & 5 & 14 \\ 0 & -7 & -13 & -25 \\ 0 & -7 & -21 & -49 \end{array}\right] \begin{array}{c} \\ R2\times (-1) \\ R3\times (-1) \\ \end{array} \Rightarrow \left[\begin{array}{rrr|r} 1 & 3 & 5 & 14 \\ 0 & 7 & 13 & 25 \\ 0 & 7 & 21 & 49 \end{array}\right]\]

Finally, we eliminate \(x_2\) from the third equation by subtracting equation 2 from equation 3, i.e., \(R3-R2\): \[\left[\begin{array}{rrr|r} 1&3&5&14\\ 0&7&13&25\\ 0&7&21&49 \\ \end{array}\right] \begin{array}{c} \\ \\ R3-R2 \\ \end{array} \Rightarrow \left[\begin{array}{rrr|r} 1&3&5&14\\ 0&7&13&25\\ 0&0&8&24 \\ \end{array}\right]\]

The system is now in triangular form.

Stage 3: Back Substitution

Here we solve the equations from bottom to top. At each step of the back substitution process we encounter equations which only have a single unknown and so can be easily solved.

The general system of three simultaneous linear equations

In the previous section we met systems of equations which could be solved by back-substitution alone. In this Section we meet systems which are not so amenable and where preliminary work must be done before back-substitution can be used.

Consider the system \[\begin{matrix} x_1 & + & 3x_2 & + & 5x_3 & = & 14 \\ 2x_1 & - & x_2 & - & 3x_3 & = & 3 \\ 4x_1 & + & 5x_2 & - & x_3 & = & 7 \\ \end{matrix}\] We will use the solution method known as Gauss elimination, which has three stages. In the first stage the equations are written in matrix form. In the second stage the matrix equations are replaced by a system of equations having the same solution but which are in triangular form. In the final stage the new system is solved by back-substitution.

Stage 1: Matrix Formulation

The first step is to write the equations in matrix form:

\[\left[\begin{matrix} 1&3&5\\ 2&-1&-3\\ 4&5&-1 \\ \end{matrix}\right] \left[\begin{matrix} x_1\\ x_2\\ x_3 \\ \end{matrix}\right] = \left[\begin{matrix} 14\\ 3\\ 7\\ \end{matrix}\right].\] Then, for conciseness, we combine the matrix of coefficients with the column vector of right-hand sides to produce the augmented matrix:

\[\left[\begin{array}{rrr|r} 1 & 3 & 5 & 14 \\ 2 & -1 & -3 & 3 \\ 4 & 5 & -1 & 7 \\ \end{array}\right].\]

If the general system of equations is written \(A X =B\) then the augmented matrix is written \([A|B]\). Hence the first equation \[x_1+3x_2+5x_3=14\] is replaced by the first row of the augmented matrix, \[1 \qquad 3\qquad 5\qquad |\qquad 14\] and so on. Stage 1 has now been completed. We will next triangularise the matrix of coefficients by means of row operations. There are three possible row operations:

- interchange two rows;
- multiply or divide a row by a non-zero constant factor;
- add to, or subtract from, one row a multiple of another row.

Note that interchanging two rows of the augmented matrix is equivalent to interchanging the two corresponding equations. The shorthand notation we use is introduced by example. To interchange row 1 and row 3 we write \(R1\leftrightarrow R3\). To divide row 2 by 5 we write \(R2\div 5\). To add three times row 1 to row 2, we write \(R2+3R1\). In the Task which follows you will see where these annotations are placed.

Note that these operations neither create nor destroy solutions so that at every step the system of equations has the same solution as the original system.

Stage 2: Triangularisation

The second stage proceeds by first eliminating \(x_1\) from the second and third equations using row operations.

\[\left[\begin{array}{rrr|r} 1 & 3 & 5 & 14 \\ 2 & -1 & -3 & 3 \\ 4 & 5 & -1 & 7 \end{array}\right] \begin{array}{c} \\ R2-2 \times R1 \\ R3-4 \times R1 \\ \end{array} \Rightarrow \left[\begin{array}{rrr|r} 1 & 3 & 5 & 14 \\ 0 & -7 & -13 & -25 \\ 0 & -7 & -21 & -49 \\ \end{array}\right]\]

In the above we have subtracted twice row (equation) 1 from row (equation) 2.

In full these operations would be written, respectively, as \[(2x_1-x_2-3x_3)-2(x_1+3x_2+5x_3)=3-2\times 14 \qquad \text{or} \qquad -7x_2-13x_3=-25\] and \[(4x_1+5x_2-x_3)-4(x_1+3x_2+5x_3)=7-4\times 14 \qquad \text{or} \qquad -7x_2-21x_3=-49.\]

Now since all the elements in rows 2 and 3 are negative we multiply throughout by \(-1\), this is not really necessary but it will clean up the matrix a bit: \[\left[\begin{array}{rrr|r} 1 & 3 & 5 & 14 \\ 0 & -7 & -13 & -25 \\ 0 & -7 & -21 & -49 \end{array}\right] \begin{array}{c} \\ R2\times (-1) \\ R3\times (-1) \\ \end{array} \Rightarrow \left[\begin{array}{rrr|r} 1 & 3 & 5 & 14 \\ 0 & 7 & 13 & 25 \\ 0 & 7 & 21 & 49 \end{array}\right]\]

Finally, we eliminate \(x_2\) from the third equation by subtracting equation 2 from equation 3, i.e., \(R3-R2\): \[\left[\begin{array}{rrr|r} 1&3&5&14\\ 0&7&13&25\\ 0&7&21&49 \\ \end{array}\right] \begin{array}{c} \\ \\ R3-R2 \\ \end{array} \Rightarrow \left[\begin{array}{rrr|r} 1&3&5&14\\ 0&7&13&25\\ 0&0&8&24 \\ \end{array}\right]\]

The system is now in triangular form.

Stage 3: Back Substitution

Here we solve the equations from bottom to top. At each step of the back substitution process we encounter equations which only have a single unknown and so can be easily solved.

Exercise

Complete the solution to the above system by back-substitution.

\(x=\)

Check that these values satisfy the original system of equations.

You should always check your solution in the original equations to ensure that the equations balance.

Again we emphasise that we chose a particular set of procedures in Stage 1. This was chosen mainly to keep the arithmetic simple by delaying the introduction of fractions. Sometimes we are courageous and take fewer, harder steps.

An important point to note is that when in Stage 2 we wrote \(R2-2R1\) against row 2; what we meant is that row 2 is replaced by the combination (row \(2)-2\times\)(row 1).

Key Point: Elementary Row Operations

The operation \[\text{ row } i-\alpha \times \text{ row }\ j\] means replace row \(i\) by the combination \[\text{ row } i-\alpha \times \text{ row } j.\]
Feedback: In full the equations are \[\begin{matrix} x_1 & + & 3x_2 & + & 5x_3 & = & 14 \\ & & 7x_2 & + & 13x_3 & = & 25 \\ & & & & 8x_3 & = & 24 \\ \end{matrix}\] From the last equation we see that \(x_3=3\). Substituting this value into the second equation gives \[7x_2+39=25 \qquad \text{or} \qquad 7x_2=-14 \qquad \text{so that} \qquad x_2=-2\] Finally, using these values for \(x_2\) and \(x_3\) in equation 1 gives \[x_1-6+15=14.\] Hence \(x_1=5\). The solution is therefore \([x_1,x_2,x_3]^T=[5,-2,3]^T\). You can check that these values satisfy the original system of equations.

Exercise

Consider the following linear system of equations: \[\begin{matrix} [value] \\ [value] \\ [value] \\ \end{matrix}\]

1. Construct the augmented matrix.
\([A|B]=\)

2. Triangularise the augmented matrix by means of row operations. Express your answer as matrix \(T\).
\(T=\)
3. Apply back-substitution to obtain the solution to the system.
\(X=\) .
Feedback: 1. The augmented matrix is \[ [A|B] = [value]. \] 2. To triangularize the augmented matrix, we begin from the augmented matrix \( [A|B] \). Since \( a_{11} = [value] \neq 0 \), we can replace row 2 by row 2 - \( \frac{[value]}{[value]} \times \) (row 1) and row 3 by row 3 - \( \frac{[value]}{[value]} \times \) (row 1). In other words, \[ [A|B] = [value] \begin{matrix} \\ R2 - \frac{[value]}{[value]} \times R1 \\ R3 - \frac{[value]}{[value]} \times R1 \\ \end{matrix} \Rightarrow [value]. \] By continuing this process, we get the triangularization \( T \) of \( [A|B] \): \[T = [value] \]. 3. From the triangular matrix \( T \), the last equation reads \[ [value] \] from which we get \(z = [value] \). Plugging in this value of \( z \) in the second equation \( [value] \) gives \[ [value] \] from which we get \(y = [value] \). Finally, plugging in the obtained values for \( y \) and \( z \) in the first equation \( [value] \) gives \[ [value] \] from which we deduce \(x = [value] \). Summarizing, \(x = [value], y = [value] \) and \( z = [value] \).

You should always check your solution in the original equations to ensure that the equations balance.

Again we emphasise that we chose a particular set of procedures in Stage 1. This was chosen mainly to keep the arithmetic simple by delaying the introduction of fractions. Sometimes we are courageous and take fewer, harder steps.

An important point to note is that when in Stage 2 we wrote \(R2-2R1\) against row 2; what we meant is that row 2 is replaced by the combination (row \(2)-2\times\)(row 1).

In general, the operation \[\text{ row } i-\alpha \times \text{ row }\ j\] means replace row \(i\) by the combination \[\text{ row } i-\alpha \times \text{ row } j.\]

Equations which have an infinite number of solutions

Consider the following system of equations \[\begin{matrix} x_1 & + & x_2 & - & 3x_3 & = & 3 \\ 2x_1 & - & 3x_2 & + & 4x_3 & = & -4\\ x_1 & - & x_2 & + & x_3 & = & -1 \\ \end{matrix}\] In augmented form we have: \[\left[\begin{array}{rrr|r} 1 & 1 & -3 & 3 \\ 2 & -3 & 4 & -4 \\ 1 & -1 & 1 & -1 \\ \end{array}\right]\]

Now performing the usual Gauss elimination operations we have: \[\left[\begin{array}{rrr|r} 1&1&-3&3 \\ 2&-3&4&-4 \\ 1&-1&1&-1 \\ \end{array}\right] \begin{array}{c} \\ R2-2\times R1 \\ R3- R1 \end{array} \Rightarrow \left[\begin{array}{rrr|r} 1&1&-3&3 \\ 0&-5&10&-10 \\ 0&-2&4&-4 \\ \end{array}\right]\]

Now applying \(R2\div -5\) and \(R3\div -2\) gives \[\left[\begin{array}{rrr|r} 1&1&-3&3 \\ 0&1&-2&2 \\ 0&1&-2&2 \\ \end{array}\right]\] Then \(R2-R3\) gives \[\left[\begin{array}{rrr|r} 1&1&-3&3 \\ 0&1&-2&2 \\ 0&0&0&0 \\ \end{array}\right]\]

Now applying \(R2\div -5\) and \(R3\div -2\) gives \[\left[\begin{array}{rrr|r} 1&1&-3&3 \\ 0&1&-2&2 \\ 0&1&-2&2 \\ \end{array}\right]\] Then \(R2-R3\) gives \[\left[\begin{array}{rrr|r} 1&1&-3&3 \\ 0&1&-2&2 \\ 0&0&0&0 \\ \end{array}\right]\] We see that all the elements in the last row are zero. This means that the variable \(x_3\) can take any value whatsoever, so let \(x_3=t\) then using back substitution the second row now implies \[x_2=2+2x_3= 2+2t\] and then the first row implies \[x_1=3-x_2+3x_3=3-(2+2t)+3(t)=1+t\] In this example the system of equations has an infinite number of solutions: \[x_1=1+t,\qquad x_2=2+2t,\qquad x_3=t\quad{\rm or}\quad [x_1,x_2,x_3]^T=[1+t,2+2t,t]^T\] where \(t\) can be assigned any value. For every value of \(t\) these expressions for \(x_1,x_2\) and \(x_3\) will simultaneously satisfy each of the three given equations.

Systems of linear equations arise in the modelling of electrical circuits or networks. By breaking down a complicated system into simple loops, Kirchhoff’s law can be applied. This leads to a set of linear equations in the unknown quantities (usually currents) which can easily be solved by any of the methods you’ve learned.

Engineering Example: Currents in three loops

In the circuit shown find the currents \((i_1, i_2, i_3)\) in the loops.

[Image]

Solution

Loop 1 gives \[2(i_1)+3(i_1-i_2)=5\quad\rightarrow\quad 5i_1-3i_2=5\] Loop 2 gives \[6(i_2-i_3)+3(i_2-i_1)=4\quad\rightarrow\quad -3i_1+9i_2-6i_3=4\] Loop 3 gives \[6(i_3-i_2)+4(i_3)=6-5\quad\rightarrow\quad -6i_2+10i_3=1\] Note that in loop 3, the current generated by the \(6v\) cell is positive and for the \(5v\) cell negative in the direction of the arrow.

In matrix form \[\left[\begin{matrix}\hfill 5&\hfill -3&\hfill 0\\ \hfill -3&\hfill 9&\hfill -6\\ \hfill 0&\hfill -6&\hfill 10\end{matrix}\right] \left[\begin{matrix}\hfill i_1\\ \hfill i_2\\ \hfill i_3\end{matrix}\right]= \left[\begin{matrix}\hfill 5\\ \hfill 4\\ \hfill 1\end{matrix}\right]\] Solving gives \[i_1= \frac{34}{15},\quad i_2= \frac{19}{9},\quad i_3= \frac{41}{30}\]

Engineering Example: Velocity of a rocket

The upward velocity of a rocket, measured at 3 different times, is shown in the following table \[\begin{array}{|c|c|}\hline \text{Time}, t & \text{Velocity}, v \\ \text{(seconds)}& \text{(metres/second)} \\ \hline 5&106.8\\ \hline 8&177.2\\ \hline 12&279.2\\ \hline \end{array}\] The velocity over the time interval \(5\leq t\leq 12\) is approximated by a quadratic expression as \[v(t)=a_1t^2+a_2t+a_3\] Find the values of \(a_1, a_2\) and \(a_3\).

Solution

Substituting the values from the table into the quadratic equation for \(v(t)\) gives: \[\begin{array}{l} 106.8 & = & 25a_1 & + & 5a_2 & + & a_3 \\ 177.2 & = & 64a_1 & + & 8a_2 & + & a_3 \\ 279.2 & = & 144a_1 & + & 12a_2 & + & a_3 \\ \end{array} \qquad \text{or} \qquad \left[\begin{matrix} 25&5&1\\ 64&8&1\\ 144&12&1 \end{matrix}\right] \left[\begin{matrix} a_1\\a_2\\a_3 \end{matrix}\right]= \left[\begin{matrix} 106.8\\ 177.2\\ 279.2 \end{matrix}\right]\] Applying one of the methods you’ve learned gives the solution as \[a_1=0.2905\qquad a_2=19.6905\qquad a_3=1.0857 \quad \text{to } 4 \text{ d.p}.\] As the original values were all experimental observations then the values of the unknowns are all approximations. The relation \(v(t)=0.2905t^2+19.6905t+1.0857\) can now be used to predict the approximate position of the rocket for any time within the interval \(5\leq t \leq 12\).

Exercise

Consider the following linear system of equations: \[\begin{matrix} [value] \\ [value] \\ \displaystyle     [value] \\ \end{matrix}\]

1. Construct the augmented matrix.
\([A|B]=\)

2. Triangularise the augmented matrix by means of row operations. Express your answer as matrix \(T\).
\(T=\)
3. Apply back-substitution to obtain the solution to the system.
\(X=\) .
Feedback: 1. The augmented matrix is \[ [A|B] = [value]. \] 2. To triangularize the augmented matrix, we begin from the augmented matrix \( [A|B] \). Since \( a_{11} = [value] \neq 0 \), we can replace row 2 by row 2 - \( \frac{[value]}{[value]} \times \) (row 1) and row 3 by row 3 - \( \frac{[value]}{[value]} \times \) (row 1). In other words, \[ [A|B] = [value] \begin{matrix} \\ R2 - \frac{[value]}{[value]} \times R1 \\ R3 - \frac{[value]}{[value]} \times R1 \\ \end{matrix} \Rightarrow [value]. \] By continuing this process, we get the triangularization \( T \) of \( [A|B] \): \[T = [value] \]. 3. From the triangular matrix \( T \), the last equation reads \[ [value] \] from which we get \(z = \displaystyle [value] \). Plugging in this value of \( z \) in the second equation \( [value] \) gives \[ [value] \] from which we get \(y = \displaystyle [value] \). Finally, plugging in the obtained values for \( y \) and \( z \) in the first equation \([value]\) gives \[ [value] \] from which we deduce \(x = \displaystyle [value] \). Summarizing, \(x = \displaystyle [value], y = \displaystyle [value] \) and \( z = \displaystyle [value] \).

Exercise

Consider the following linear system of equations: \[\begin{matrix} [value] \\ [value] \\ [value] \\ \end{matrix}\]

You might need to think carefully about this system

1. Construct the augmented matrix.
\([A|B]=\)

2. Triangularise the augmented matrix by means of row operations. Express your answer as matrix \(T\).
\(T=\)
3. Apply back-substitution to obtain the solution to the system.
\(X=\) .
Feedback: 1. The augmented matrix is \[ [A|B] = [value]. \] 2. To triangularize the augmented matrix, we begin from the augmented matrix \( [A|B] \). Since \( a_{11} = [value] \neq 0 \), we can replace row 2 by row 2 - \( \frac{[value]}{[value]} \times \) (row 1) and row 3 by row 3 - \( \frac{[value]}{[value]} \times \) (row 1). In other words, \[ [A|B] = [value] \begin{matrix} \\ R2 - \frac{[value]}{[value]} \times R1 \\ R3 - \frac{[value]}{[value]} \times R1 \\ \end{matrix} \Rightarrow [value]. \] By continuing this process, we get the triangularization \( T \) of \( [A|B] \): \[T = [value] \]. 3. The third row of the matrix is a zero row, so we are left with an undetermined system of equations. Therefore, there are infinitely many solutions. Set \(z = t \) in the second equation \([value] \) to obtain \[ [value] \] from which we deduce \(y = [value] \). Plugging in the obtained values of \( y \) and \( z \) in the first equation \( [value] \) we obtain \[ [value] \] from which we deduce \(x = [value] \). Summarizing, \[ x = [value], \qquad y = [value], \qquad z = t. \]

Exercise

Consider the following linear system of equations: \[\displaystyle{\begin{matrix} [value] \\ [value] \\ \displaystyle[value] \\ \end{matrix}}\]

1. Construct the augmented matrix.
\([A|B]=\)

2. Triangularise the augmented matrix by means of row operations. Express your answer as matrix \(T\).
\(T=\)
3. Apply back-substitution to obtain the solution to the system.
\(X=\) .
Feedback: 1. The augmented matrix is \[ [A|B] = [value]. \] 2. To triangularize the augmented matrix, we begin from the augmented matrix \( [A|B] \). Since \( a_{11} = [value] \neq 0 \), we can replace row 2 by row 2 - \( \frac{[value]}{[value]} \times \) (row 1) and row 3 by row 3 - \( \frac{[value]}{[value]} \times \) (row 1). In other words, \[ [A|B] = [value] \begin{matrix} \\ R2 - \frac{[value]}{[value]} \times R1 \\ R3 - \frac{[value]}{[value]} \times R1 \\ \end{matrix} \Rightarrow [value]. \] By continuing this process, we get the triangularization \( T \) of \( [A|B] \): \[T = [value] \]. 3. From the triangular matrix \( T \), the last equation reads \[ [value] \] from which we get \(z = \displaystyle [value] \). Plugging in this value of \( z \) in the second equation \( [value] \) gives \[ [value] \] from which we get \(y = \displaystyle [value] \). Finally, plugging in the obtained values for \( y \) and \( z \) in the first equation \([value]\) gives \[ [value] \] from which we deduce \(x = \displaystyle [value] \). Summarizing, \(x = \displaystyle [value], y = \displaystyle [value] \) and \( z = \displaystyle [value] \).

Exercise

Consider the following linear system of equations: \[\begin{matrix} [value] \\ [value] \\ [value] \\ \end{matrix}\]

1. Construct the augmented matrix.
\([A|B]=\)

2. Triangularise the augmented matrix by means of row operations. Express your answer as matrix \(T\).
\(T=\)
3. Apply back-substitution to obtain the solution to the system.
\(X=\) .
Feedback: 1. The augmented matrix is \[ [A|B] = [value]. \] 2. To triangularize the augmented matrix, we begin from the augmented matrix \( [A|B] \). Since \( a_{11} = [value] \neq 0 \), we can replace row 2 by row 2 - \( \frac{[value]}{[value]} \times \) (row 1) and row 3 by row 3 - \( \frac{[value]}{[value]} \times \) (row 1). In other words, \[ [A|B] = [value] \begin{matrix} \\ R2 - \frac{[value]}{[value]} \times R1 \\ R3 - \frac{[value]}{[value]} \times R1 \\ \end{matrix} \Rightarrow [value]. \] By continuing this process, we get the triangularization \( T \) of \( [A|B] \): \[T = [value] \]. 3. From the triangular matrix \( T \), the last equation reads \[ [value] \] from which we get \(z = [value] \). Plugging in this value of \( z \) in the second equation \( [value] \) gives \[ [value] \] from which we get \(y = [value] \). Finally, plugging in the obtained values for \( y \) and \( z \) in the first equation \([value]\) gives \[ [value] \] from which we deduce \(x = [value] \). Summarizing, \(x = [value], y = [value] \) and \( z = [value] \).

We say a matrix is in row echelon form if it has the shape resulting from Gaussian elimination, where Gaussian elimination has operated on the rows. Furthermore, we say a matrix is in reduced row echelon form if it satisfies the following conditions:

1. It is in row echelon form.
2. The leading entry in each nonzero row is a \(1 \) (called a leading \( 1 \)).
3. Each column containing a leading \( 1 \) has zeros in all its other entries.

Example

The matrix \[ \left [ \begin{matrix} 2 & -1 & 2 & 0 \\ 0 & 1 & 4 & -2 \\ 0 & 0 & -2 & 3 \\ \end{matrix} \right ] \]

is in row echelon form, but not reduced row echelon form. The matrices

\[\left [ \begin{matrix} 1 & 0 & 0 & -1 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & -5\\ \end{matrix} \right], \hspace{3mm} \left [ \begin{matrix} 1 & 3 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{matrix} \right]\]

are in reduced row echelon form.