## Summary

IDefinition, classification and vocabularyIIMethods of direct resolutionASubstitutionBEliminationCElementary row operationsDGaussian elimination## Definition, classification and vocabulary

### System of linear equations

A system of linear equations is a collection of two or more linear equations with the same set of variables. A solution to the system of linear equations is a set of real numbers that can be substituted in for the variables and makes all equations true.

The following is a system of linear equations:

\begin{cases} 2x-3y=4\cr \cr 2x-2y=0 \cr \cr x-y=0\end{cases}

In the above system of linear equations there are three equations and two variables (x and y). The above system of linear equations has the solution x=-4 and y=-4 because all equations in the system are true when these two real numbers are substituted in for the variables.

### Consistent system of linear equations

A system of linear equations is called consistent if the system has at least a solution. This means that there is at least one set of values for the variables which satisfies every equation in the system.

Consider the following system of two linear equations in two variables:

\begin{cases} x+y=3 \cr \cr x-y=-1 \end{cases}

x=1 and y=2 is a solution to both linear equations in the system:

- 1+2=3
- 1-2=-1

Therefore, the system is consistent.

### Inconsistent system of linear equations

A system of linear equations is called inconsistent if it has no solutions.

Consider the following system of linear equations:

\begin{cases} x+y=1 \cr \cr x+y=0 \end{cases}

Observe that it is impossible for x+y to be equal to both 1 and 0 simultaneously.

Therefore, the above system of linear equations is inconsistent.

Two systems of linear equations are called equivalent if they have the same set of solutions.

Consider the following system of linear equations:

\begin{cases} x+y=4 \cr \cr x-y=-2 \end{cases}\\

Also, consider the following system of linear equations:

\begin{cases} 2x+y=5\cr \cr 2x-y=-1 \end{cases}

The two systems are equivalent because the only solution to both systems is x=1 and y=3.

All methods used to solve a system of linear equations involve manipulating a system of linear equations into new systems of linear equations, which are equivalent until we are able to solve for the variables.

## Methods of direct resolution

### Substitution

A linear equation with one variable can be solved by isolating the variable.

2y-3=2

2y=5

y=\dfrac{5}{2}

The method of substitution is a method for solving a system of linear equations by substituting one variable for an equation of the other and then solving linear equations in one variable.

Consider the following system of linear equations:

\begin{cases} x+y=2\ \cr \cr x-y=0 \end{cases}

Isolate a variable in one of the equations

Isolate the variable *y i*n the first equation:

x+y=2

y=-x+2

The system is now:

\begin{cases} y=-x+2\ \cr \cr x-y=0 \end{cases}

Substitute in the other equation

Substitute -x+2 for y in the second equation:

x-y=0

x-\left(-x+2\right)=0

2x-2=0

The system is now:

\begin{cases} y=-x+2\ \cr \cr2x-2=0 \end{cases}

Solve the one variable equation

The linear equation 2x-2=0 can be solved for x :

2x-2=0

2x=2

x=1

The system is now:

\begin{cases} y=-x+2\ \cr \cr x=1 \end{cases}

Solve the other equation

Substitute x=1 into the first equation (or into any original equation):

y=-x+2

y=-1+2

y=1

The solution to the system of linear equations is x=1 and y=1.

Consider the following system of linear equations:

\begin{cases} 2x+3y=2 \cr \cr x-y=7 \end{cases}

Isolate a variable in the first equation

Isolate the variable *x *in the first equation:

x-y=7

x=y+7

The system is now:

\begin{cases} 2x+3y=2 \cr \cr x=y+7 \end{cases}

Substitute in the other equation

Substitute y+7 for *x* in the first equation:

2x+3y=2

2\left(y+7\right)+3y=2

2y+14+3y=2

5y=-12

y=\dfrac{-12}{5}

The system is now:

\begin{cases} y=\dfrac{-12}{5}\ \cr \cr x=y+7 \end{cases}

Solve second equation

Substitute y=\dfrac{-12}{5} into the second equation (or into any original equation):

x=\left(\dfrac{-12}{5}\right)+7

x=\dfrac{23}{5}

The solution to the system of linear equations is x=\dfrac{23}{5} and y=\dfrac{-12}{5}.

### Elimination

The method of elimination eliminates variables by adjusting an equation so that the coefficients on a chosen variable are opposites, and then adding equations from the system so that a variable is eliminated from an equation.

Consider the following system of linear equations:

\begin{cases} x+y=3 \cr \cr -x+y=-1 \end{cases}

The coefficients on the x terms are opposite. When adding the two equations, cancel the x and solve for the variable y.

Add the two linear equations and solve for y :

x+y+\left(-x+y\right)=3+\left(-1\right)\\2y=2\\y=1

Substitute y=1 into the first equation:

x+y=3\\x+1=3\\x=2

The solution to the system of linear equations is x=2 and y=1.

The method of elimination can be used to solve systems of linear equations with more than two variables.

Consider the following system of linear equations:

\begin{cases} x+y+z=6 \cr \cr x-y+2z=5 \cr \cr x-y+z=2 \end{cases}

Begin by eliminating the variable y from the system of linear equations to create a new system of linear equations in the two variables x and z.

Add the first equation and the second equation:

x+y+z+\left(x-y+2z\right)=6+5\\2x+3z=11

Add the first equation and the third equation:

x+y+z+\left(x-y+z\right)=6+2\\2x+2z=8

Therefore, we have the following system of linear equation with the variables x and z :

\begin{cases} 2x+3z=11 \cr \cr 2x+2z=8 \end{cases}

Solve for z

Multiply the second equation by -1 and then add the two equations with only x and z :

2x+3z+\left(-2x-2z\right)=11+\left(-8\right)\\z=3

Solve for x

If we substitute z=3 into the equation 2x+3z=11, then:

2x+3\left(3\right)=11\\2x=2\\x=1

Solve for y

If we substitude x=1 and z=3 into the equation x+y+z=6, then;

x+y+z=6\\1+y+3=6\\y=2

Therefore x=1, y=2, and z=3 is the solution to the system of linear equations.

### Elementary row operations

#### Elementary row operations

An elementary row operation on a system of linear equations is a manipulation of the system of linear equations of one of the following types:

- Multiplying a row by a nonzero number
- Adding a multiple of one row to another
- Switching two rows

Consider the following system of linear equations:

\begin{cases} x_1+2x_2=3 \cr \cr 2x_1+2x_2=1 \end{cases}

Multiplying the first row by the nonzero number 2 produces the following system of linear equations:

\begin{cases} 2x_1+4x_2=6 \cr \cr 2x_1+2x_2=1 \end{cases}

Adding row one to row two of the new matrix produces the following system of linear equations:

\begin{cases} 2x_1+4x_2=6 \cr \cr 4x_1+6x_2=7 \end{cases}

Swapping the two rows of the new matrix produces the following system of linear equations:

\begin{cases} 4x_1+6x_2=7 \cr \cr 2x_1+4x_2=6 \end{cases}

Performing elementary row operations produces new but equivalent systems of linear equations.

#### Equivalent systems of linear equations

Performing elementary row operations on a system of linear equations produces new but equivalent systems of linear equations.

Consider the following system of linear equations:

\begin{cases} 2x+3y-z=2 \cr \cr 10x-2y-z=1 \cr \cr x+y+z=1 \end{cases}

If we multiply the first row by 2 and switch the second and third rows, then we obtain the following system of linear equations:

\begin{cases} 4x+6y-2z=4 \cr \cr x+y+z=1 \cr \cr 10x-2y-z=1 \end{cases}

Therefore, the two systems of linear equations above have the same solutions.

### Gaussian elimination

Consider the following system of linear equations:

\begin{cases} x+3y=7 \cr \cr\,\,\,\,\,\,\,\, \,\,\,y=4 \end{cases}

Substituting y=4 into the first equation:

x+3y=7\\x+3\left(4\right)=7\\x+12=7\\x=-5

The solution to the corresponding system of linear equations is x=-5 and y=4.

The purpose of this example is to illustrate how simple it is to solve a system of linear equations of the form

\begin{cases} x+*y=* \cr \cr \,\,\, y=* \end{cases}

The symbols * are place holders for any real number. The process of Gaussian elimination is the process of performing elementary row operations to a system of linear equations in order for it to have the above form. The purpose of doing so is to be able to solve a system of linear equations.

The process of Gaussian elimination is best understood through example.

Consider the following system of linear equations:

\begin{cases} 2x+3y=2 \cr \cr 4x+y=-1 \end{cases}

Begin the process of Gaussian elimination by making a 1 appear on the variable x in the first equation. This can be accomplished by multiplying the first row by \dfrac{1}{2}, which produces the following system of linear equations:

\begin{cases} x+\dfrac{3}{2}y=1 \cr \cr 4x+y=-1 \end{cases}

Make a 0 appear in the bottom lefthand corner. This is accomplished by subtracting four times the first row from the second. The resulting system of linear equations is:

\begin{cases} x+\dfrac{3}{2}y=1 \cr \cr \,\,\,\,-5y=-5 \end{cases}

Lastly, to make a 1 appear to the right of the 0, we can multiply the second row by \dfrac{-1}{5}. The resulting system of linear equations is:

\begin{cases} x+\dfrac{3}{2}y=1 \cr \cr \,\,\,\,\,\,\,\,\,\,\,\,\,y=1 \end{cases}

Substituting y=1 in the first equation

x+\dfrac{3}{2}y=1\\\\x+\dfrac{3}{2}=1\\x=\dfrac{-1}{2}

By Gaussian elimination, the solution to the original system of linear equations is x=\dfrac{-1}{2} and y=3.

Consider the following system of linear equations:

\begin{cases} \,\,\,\,\,\,\,\,\,\,\,\,y+z=1 \cr \cr x+2y+z=2 \cr \cr 3x+2y+3z=3 \end{cases}

Make a 1 appear in the top right by switching the first and second rows. The resulting system of linear equations is:

\begin{cases} x+2y+z=2 \cr \cr \,\,\,\,\,\,\,\,\,\,\,\,y+z=1 \cr \cr 3x+2y+3z=3 \end{cases}

To make 0 appear in all entries below the top righthand corner, subtract 3 times the first row from the third. The resulting system of linear equations is:

\begin{cases} x+2y+z=2 \cr \cr \,\,\,\,\,\,\,\,\,\,\,y+z=1 \cr \cr \,\,\,\,-4y\,\,\,\,\,\,\,\,=-3 \end{cases}

Now work on row 2. We only need there to be a 1 in the entry in the second row and second column, which there already is. Therefore the second row doesn't need to be altered.

Next, make a 0 appear below the first nonzero entry of the second row. Add four times the second row to the third row and obtain the following system of linear equations:

\begin{cases} x+2y+z=2 \cr \cr \,\,\,\,\,\,\,\,\,\,\,\,y+z=1 \cr \cr \,\,\,\,\,\,\,\,\,4y\,\,\,\,\,\,\,\,\,=3 \end{cases}

Lastly, make a 1 appear where the 4 is located. This is accomplished by multiplying the third row by \dfrac{1}{4}. The corresponding system of linear equations is:

\begin{cases} x+2y+z=2 \cr \cr \,\,\,\,\,\,\,\,\,\,\,\,y+z=1 \cr \cr \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,y=\dfrac{3}{4} \end{cases}

In the system of linear equations we have y=\dfrac{3}{4}. Substituting into the equation y+z=1 we have:

y+z=1\\\dfrac{3}{4}+z=1\\z=\dfrac{1}{4}

Lastly, substituting into the first equation:

x+2y+z=2\\x+\dfrac{6}{4}+\dfrac{1}{4}=2\\x=\dfrac{1}{4}

Therefore, the solution to the system of linear equations is x=\dfrac{1}{4}, y=\dfrac{3}{4}, and z=\dfrac{1}{4}.