Systems of Linear Equations
You definitely know how to solve systems of two linear equations, for example:
$$\begin{cases}2x+y=6\\5x-y=1\end{cases}$$
However, in AA HL, you need to know the properties of systems of equations with 3 unknowns, in which case the solving becomes a lot more complicated.
Types of Solutions
When solving systems of linear equations, three possible outcomes exist:
- Unique solution: The system has exactly one solution.
- Infinite solutions: The system has infinitely many solutions.
- No solution: The system is inconsistent and has no solution.
Solving Methods
Algebraic Methods
- Substitution Method: This method involves expressing one variable in terms of others and substituting it into the remaining equations.
- Elimination Method: Also known as addition method, it involves adding or subtracting equations to eliminate variables.
- Gaussian Elimination: This method uses elementary row operations to transform the augmented matrix of the system into row echelon form.
Consider the system: $$ \begin{cases} 2x + y - z = 4 \\ x - y + 2z = 5 \\ 3x + 2y - 3z = 3 \end{cases} $$
Substitution Method
- Select an equation, and write it in terms of one of the variables. We will select the first equation and write it in terms of $z$ such that we have $2x+y-4=z$.
- Then we substitute this value of $z$ into the other two equations.
- The second one becomes $x-y+2(2x+y-4)=5$ $\Longrightarrow 5x+y=13$
- The third one becomes $3x+2y-3(2x+y-4)=3$ $\Longrightarrow -3x-y=-9$
- Hence now we are left with the system of equations $$ \begin{cases} 5x+y=13 \\ 3x+y=9 \end{cases} $$
- Now you can repeat the process similarly for these 2 equations to get values of $x$ and $y$ and then solve for the original variable $z$.
- In this case, you will get $x=2$ and $y=3$ such that $z=2(2)+3-4=3$
Elimination Method
- These methods don't differ from each other much as you will see soon. First, select 2 equations. We will choose the first one and the second one.
- Then you want to transform the functions such that when you add them, a variable cancels out. For example, to have a $2x$ in one and a $-2x$ in the other so they will cancel out.
- As seen in the first two equations, we have $+y$ and a $-y$ such that we can add them already and get $2x+y-z+x-y+2z=4+5$ $\Longrightarrow 3x+z=9$
- Repeat this process for another 2 equations. We will choose the second and the third.
- Notice if we transform the second equation by a factor of $2$ then we will have $-2y$ which can cancel the $+2y$ of the third. Hence we can write our second equation as $2x-2y+4z=10$
- Hence adding them again you get $5x+z=13$ to give you the system of linear equations $$ \begin{cases} 3x+z=9\\5x+z=13 \end{cases} $$
- Now we repeat the process for these 2 equations to solve for $x,y,z$ such that we get $x=2,y=3,z=3$
We will discuss Gaussian elimination separately below
Substitution and regular elimination get very long very quickly in $3\times3$ systems of linear equations. Gaussian elimination is generally the most efficient method.
Inconsistent Systems
A system is inconsistent when it has no solution. This occurs when the equations contradict each other.
The system: $$ \begin{cases} x + y = 2 \\ x + y = 3 \end{cases} $$ is inconsistent because no values of $x$ and $y$ can simultaneously satisfy both equations.
Geometrically, inconsistent systems represent parallel lines or planes that never intersect.
Inconsistent (no solution) systems will lead to incorrect equalities when solving using any of the above methods.
If you try any method in the example above, you will end up with $-1=0$ which is incorrect.
General Solutions for Infinite Solutions
When a system has infinite solutions, it's possible to express the solution set in terms of one or more parameters.
For the system: $$ \begin{cases} x + y = 3 \\ 2x + 2y = 6 \end{cases} $$ A general solution is: $x = t$, $y = 3 - t$, where $t$ is any real number.
Infinite solutions system will lead to equalities that are always true, such as some number $c=c$ hence $0=0$. If you try to solve the above system of linear equations, you will obtain $0=0$ hence infinite solutions since this is always true.
When expressing infinite solutions parametrically, always use $t$ as a parameter. It might look like enough to write something like $y = 3 - x$, but this is not a parametric equation, and you have to write $x = t$, $y = 3 - t$. The reason for this will become clearer in the vectors topic for HL.
Geometric Interpretation
Systems of linear equations have direct geometric interpretations:
- Two equations in two unknowns represent lines in a plane.
- Three equations in three unknowns represent planes in 3D space.
The solutions correspond to the intersections of these geometric objects:
- Unique solution: A single point of intersection
- Infinite solutions: Coincident lines or planes
- No solution: Parallel or skew lines/planes
Students often forget to consider the geometric meaning of their algebraic solutions. Always try to visualize what the solution represents in space.
Gaussian Elimination With Matrices
A matrix is a complicated mathematical object in linear algebra – but in the context of IB math AA HL, it is simply a grid of numbers that can be used to solve systems of linear equations.
An augmented matrix includes all the coefficients of each linear equation and its solution. For a system of linear equations given by
$$ \begin{cases} a_1x+b_1y+c_1z=d_1 \\ a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3 \end{cases} $$
We can write the augmented matrix as
$$\begin{pmatrix} a_1 & b_1 & c_1 & | & d_1 \\ a_2& b_2 & c_2 & | & d_2 \\ a_3 & b_3 & c_3 & | & d_3 \end{pmatrix}$$
Equivalence Transformations
We can then apply 3 equivalence transformations to the rows labelled as $R_i$ for the $i^{th}$ row.
- Row switching ($R_i \leftrightarrow R_j$): Hence we can switch two rows in any way we like (the order of the linear equations doesn't matter)
- Row multiplication ($kR_i\to R_i$): We can multiply all the terms of a row by a specific constant $k$
- Row addition ($R_i + kR_j\to R_i$): We can add a multiple of a row to another row, adding all the vertically corresponding terms
By performing these operations, our goal is to reach the row-echelon matrix in the form
$$\begin{pmatrix} 1 & 0 & 0 & | & \bar{x} \\ 0 & 1 & 0 & | & \bar{y} \\ 0 & 0 & 1 & | & \bar{z} \end{pmatrix}$$
where $\bar{x},\bar{y},\bar{z}$ will be the solutions to the linear equations.
Consider the system: $$ \begin{cases} 2x + y - z = 4 \\ x - y + 2z = 5 \\ 3x + 2y - 3z = 3 \end{cases} $$
Gaussian Elimination
We have the Augmented Matrix
$$ \begin{pmatrix} 2 & 1 & -1 & | & 4 \\ 1 & -1 & 2 & | & 5 \\ 3 & 2 & -3 & | & 3 \end{pmatrix} $$
We will start by solving for the first column. When applying certain transformations, we will use the notation used above.
$$\xrightarrow{\frac{1}{2}R_1} \begin{pmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & | & 2 \\ 1 & -1 & 2 & | & 5 \\ 3 & 2 & -3 & | & 3 \end{pmatrix} \xrightarrow{R_2 - R_1} \begin{pmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & | & 2 \\ 0 & -\frac{3}{2} & \frac{5}{2} & | & 3 \\ 3 & 2 & -3 & | & 3 \end{pmatrix} $$
$$ \xrightarrow{R_3 - 3R_1} \begin{pmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & | & 2 \\ 0 & -\frac{3}{2} & \frac{5}{2} & | & 3 \\ 0 & \frac{1}{2} & -\frac{3}{2} & | & -3 \end{pmatrix} \xrightarrow{-\frac{2}{3}R_2} \begin{pmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & | & 2 \\ 0 & 1 & -\frac{5}{3} & | & -2 \\ 0 & \frac{1}{2} & -\frac{3}{2} & | & -3 \end{pmatrix} $$
$$ \xrightarrow{R_3-\frac{1}{2}R_2} \begin{pmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & | & 2 \\ 0 & 1 & -\frac{5}{3} & | & -2 \\ 0 & 0 & -\frac{2}{3} & | & -2 \end{pmatrix} \xrightarrow{-\frac{3}{2}R_3} \begin{pmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & | & 2 \\ 0 & 1 & -\frac{5}{3} & | & -2 \\ 0 & 0 & 1 & | & 3 \end{pmatrix}$$
$$ \xrightarrow{R_2+\frac{5}{3}R_3} \begin{pmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & | & 2 \\ 0 & 1 & 0 & | & 3 \\ 0 & 0 & 1 & | & 3 \end{pmatrix} \xrightarrow{R_1+\frac{1}{2}R_3} \begin{pmatrix} 1 & \frac{1}{2} & 0 & | & \frac{7}{2} \\ 0 & 1 & 0 & | & 3 \\ 0 & 0 & 1 & | & 3 \end{pmatrix}$$
$$ \xrightarrow{R_1-\frac{1}{2}R_2} \begin{pmatrix} 1 & 0 & 0 & | & 2 \\ 0 & 1 & 0 & | & 3 \\ 0 & 0 & 1 & | & 3 \end{pmatrix}$$
Hence $x=2, y=3, z = 3$
When solving through with Gaussian Elimination, start with solving for the first row, the first column (simply just dividing by that term to get $1$ there) and then solve downwards to get the zeros. Afterwards, solve for the middle $1$ and do the same until the lower left triangle of the matrix is zeros with ones on the diagonal. Then solve for the last column upwards, moving to the left one by one and repeating the process. This can be seen being used when solving the above.
Often, students forget to explicitly write the row transformations when doing Gaussian elimination. You must write these out in full whenever you apply an operation to a matrix.
Infinite Solutions
If there are infinite solutions, then when solving using Gaussian elimination, you will encounter a specific row as all zeros:
$$\begin{pmatrix} a_1 & b_1 & c_1 & | & d_1 \\ 0 & b_2 & c_2 & | & d_2 \\ 0 & 0 & 0 & | & 0 \end{pmatrix}$$
which indicates that $0x+0y+0z=0$. This is a redundant equation and holds for infinite values.
In this case, you will have to express the solution in parametric form, using the parameter $t$.
For the augmented matrix
$$\begin{pmatrix} 1 & 0 & 3 & | & 0 \\ 0 & 2 & -1 & | & -4 \\ 0 & 0 & 0 & | & 0 \end{pmatrix}$$
we can first convert this back to equations:
$$\begin{cases} x + 3z = 0 \\ 2y - z = -4 \end{cases}$$
Then we set $x = t$, then we solve for $y$ and $z$ to find the parametric form.
In this case, we have:
$$\begin{cases} x = t \\ y = \frac{t}6 - 2 \\ z = \frac{t}3\end{cases}$$
No Solutions
If there are no solutions, then when solving using Gaussian elimination, you will encounter an incorrect expression where the coefficients are all zero but there is a non-zero value as the answer such as
$$\begin{pmatrix} a_1 & b_1 & c_1 & | & d_1 \\ 0 & b_2 & c_2 & | & d_2 \\ 0 & 0 & 0 & | & d_3 \end{pmatrix}$$
where $d_3\neq 0$. This is indication $0x+0y+0z=d_3$ which is incorrect and thus implies no solutions.
Important Notes
- 3 methods to solve - substitution, elimination and Gaussian
- Infinite solutions will lead to an always true statement (such as $0=0$)
- No solutions will lead to an incorrect statement $c = 0$ even though $c$ is not 0