M2 Chapter: Systems of Linear Equations - Your Study Guide!

Hey everyone! Welcome to the study notes for one of the most practical topics in M2: Systems of Linear Equations. Don't let the name intimidate you. At its heart, this chapter is all about finding the point where lines or planes meet. It's like being a detective, looking for the one spot that satisfies all the clues (the equations)!

Why is this important? This isn't just abstract math. It's the foundation for everything from GPS systems locating your phone, to economists modelling markets, and engineers designing complex structures. By the end of this guide, you'll master three powerful methods to solve these systems: the Inverse Matrix Method, Cramer's Rule, and the super-versatile Gaussian Elimination.

Let's dive in and crack the code!


Part 1: The Basics - What Are We Solving?

What is a System of Linear Equations?

A linear equation is a simple equation with variables to the power of one, like $$2x + 3y = 7$$. A system of linear equations is just a set of two or more linear equations that we want to solve at the same time. Our goal is to find the values of the variables (like x, y, and z) that make ALL the equations in the system true.

Analogy Time! Imagine you have two friends giving you directions.

  • Friend A says: "I'm standing on 'Main Street'." (This is like one equation: y = 'Main Street')
  • Friend B says: "I'm standing on 'Park Avenue'." (This is a second equation: x = 'Park Avenue')

The solution to the system is the one place that satisfies both clues: the corner of Main and Park. That's the unique solution!

The Three Possibilities

When you solve a system of linear equations, there are only three possible outcomes. It helps to visualise them as intersecting lines (for 2 variables) or planes (for 3 variables).

  1. One Unique Solution: The lines or planes intersect at a single point. This is the most common case you'll see.
  2. Infinitely Many Solutions: The lines are actually the same line, or the planes intersect along a common line. Any point on that line is a solution!
  3. No Solution: The lines are parallel and never touch, or the planes are parallel (or arranged in a way that they never share a common point).

Writing Systems in Matrix Form: AX = B

To use our cool M2 methods, we first need to translate our equations into the language of matrices. We write a system in the form $$AX = B$$.

Example: Consider the system:

$$ \begin{cases} 2x + 4y = 10 \\ 3x - y = 5 \end{cases} $$

We can write this as:

$$ \begin{pmatrix} 2 & 4 \\ 3 & -1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 10 \\ 5 \end{pmatrix} $$

Where:

  • A is the coefficient matrix (the numbers in front of the variables).
  • X is the variable matrix.
  • B is the constant matrix (the numbers on the other side of the '=' sign).
Key Takeaway

A system of linear equations is a set of equations we solve simultaneously. The solution can be unique, infinite, or non-existent. We can represent any system neatly in the matrix form $$AX=B$$, which is the starting point for our next two methods.


Part 2: Method 1 - The Inverse Matrix Method

This method is elegant and powerful, but it comes with a condition: it only works for systems that have a unique solution. How do we know if a system has a unique solution? By checking the determinant of the coefficient matrix, A!

Quick Review: The Determinant

Remember that a square matrix has a special value called its determinant, written as $$|A|$$ or $$det(A)$$. A matrix only has an inverse if its determinant is NOT ZERO ($$|A| \neq 0$$). Such a matrix is called non-singular.

The Logic

If we have $$AX = B$$, we can solve for X by multiplying both sides by the inverse of A, $$A^{-1}$$.

$$ A^{-1}(AX) = A^{-1}B $$ $$ (A^{-1}A)X = A^{-1}B $$ $$ IX = A^{-1}B \quad \text{(since } A^{-1}A = I \text{, the identity matrix)} $$ $$ X = A^{-1}B $$

So, the solution is just the result of multiplying the inverse of the coefficient matrix by the constant matrix!

Step-by-Step Guide

  1. Write the system in matrix form $$AX=B$$.
  2. Calculate the determinant of A, $$|A|$$.
  3. If $$|A|=0$$, STOP. This method cannot be used. The system does not have a unique solution.
  4. If $$|A| \neq 0$$, find the inverse matrix, $$A^{-1}$$.
  5. Calculate the solution by multiplying: $$X = A^{-1}B$$.
  6. Read the values of x, y, and z from the resulting X matrix.

Example (3x3 System)

Solve:

$$ \begin{cases} x + y = 3 \\ -x + z = 1 \\ 2y + z = 0 \end{cases} $$

Step 1: Write in $$AX=B$$ form.

$$ A = \begin{pmatrix} 1 & 1 & 0 \\ -1 & 0 & 1 \\ 0 & 2 & 1 \end{pmatrix}, \quad X = \begin{pmatrix} x \\ y \\ z \end{pmatrix}, \quad B = \begin{pmatrix} 3 \\ 1 \\ 0 \end{pmatrix} $$

Step 2: Calculate the determinant of A.

$$ |A| = 1(0-2) - 1(-1-0) + 0 = -2 + 1 = -1 $$

Step 3: Since $$|A| = -1 \neq 0$$, a unique solution exists and we can proceed.

Step 4: Find the inverse, $$A^{-1}$$. (This involves finding the matrix of cofactors, transposing it to get the adjugate, and dividing by the determinant). After the calculation, we get:

$$ A^{-1} = \frac{1}{-1} \begin{pmatrix} -2 & -1 & 1 \\ 1 & 1 & -1 \\ -2 & -2 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 1 & -1 \\ -1 & -1 & 1 \\ 2 & 2 & -1 \end{pmatrix} $$

Step 5: Calculate $$X = A^{-1}B$$.

$$ \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 2 & 1 & -1 \\ -1 & -1 & 1 \\ 2 & 2 & -1 \end{pmatrix} \begin{pmatrix} 3 \\ 1 \\ 0 \end{pmatrix} = \begin{pmatrix} (2)(3)+(1)(1)+(-1)(0) \\ (-1)(3)+(-1)(1)+(1)(0) \\ (2)(3)+(2)(1)+(-1)(0) \end{pmatrix} = \begin{pmatrix} 7 \\ -4 \\ 8 \end{pmatrix} $$

Step 6: The solution is $$x=7, y=-4, z=8$$.

Key Takeaway

The Inverse Matrix Method is a systematic way to solve for all variables at once. Its main limitation is that it only works when the determinant of the coefficient matrix is non-zero (i.e., for systems with a unique solution).


Part 3: Method 2 - Cramer's Rule

Cramer's Rule is a fantastic "shortcut" that uses determinants to solve for each variable individually. It's especially useful if an exam question asks you to find the value of just *one* variable, like 'y', without needing to find 'x' and 'z'. Like the inverse method, this also only works for systems with a unique solution ($$|A| \neq 0$$).

The Formula

For a 3x3 system, the solutions are given by:

$$ x = \frac{|A_x|}{|A|}, \quad y = \frac{|A_y|}{|A|}, \quad z = \frac{|A_z|}{|A|} $$

What are $$A_x$$, $$A_y$$, and $$A_z$$?

  • $$A_x$$ is the matrix A, but with its first column (the x-coefficients) replaced by the constant matrix B.
  • $$A_y$$ is the matrix A, but with its second column (the y-coefficients) replaced by the constant matrix B.
  • $$A_z$$ is the matrix A, but with its third column (the z-coefficients) replaced by the constant matrix B.

Memory Aid

To find 'x', replace the 'x' column. To find 'y', replace the 'y' column. It's that simple!

Step-by-Step Guide

  1. Write the system in $$AX=B$$ form.
  2. Calculate the main determinant, $$|A|$$. If $$|A|=0$$, STOP. Cramer's Rule cannot be used.
  3. Create the new matrices $$A_x, A_y, A_z$$ by replacing the corresponding columns with matrix B.
  4. Calculate their determinants: $$|A_x|, |A_y|, |A_z|$$.
  5. Apply the formulas to find the values of x, y, and z.

Example (using the same system as before)

$$ A = \begin{pmatrix} 1 & 1 & 0 \\ -1 & 0 & 1 \\ 0 & 2 & 1 \end{pmatrix}, \quad B = \begin{pmatrix} 3 \\ 1 \\ 0 \end{pmatrix} $$

Step 1 & 2: We already know $$|A| = -1$$.

Step 3 & 4: Calculate the other determinants.

For x: Replace the 1st column of A with B.

$$ A_x = \begin{pmatrix} 3 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 2 & 1 \end{pmatrix} \implies |A_x| = 3(0-2) - 1(1-0) + 0 = -6 - 1 = -7 $$

For y: Replace the 2nd column of A with B.

$$ A_y = \begin{pmatrix} 1 & 3 & 0 \\ -1 & 1 & 1 \\ 0 & 0 & 1 \end{pmatrix} \implies |A_y| = 1(1-0) - 3(-1-0) + 0 = 1 + 3 = 4 $$

For z: Replace the 3rd column of A with B.

$$ A_z = \begin{pmatrix} 1 & 1 & 3 \\ -1 & 0 & 1 \\ 0 & 2 & 0 \end{pmatrix} \implies |A_z| = 1(0-2) - 1(0-0) + 3(-2-0) = -2 - 6 = -8 $$

Step 5: Apply the formulas.

$$ x = \frac{|A_x|}{|A|} = \frac{-7}{-1} = 7 $$ $$ y = \frac{|A_y|}{|A|} = \frac{4}{-1} = -4 $$ $$ z = \frac{|A_z|}{|A|} = \frac{-8}{-1} = 8 $$

We get the same result: $$x=7, y=-4, z=8$$. See how it works?

Key Takeaway

Cramer's Rule is a quick, formula-based method for systems with a unique solution. It's your best friend when you only need to find one variable's value.


Part 4: Method 3 - Gaussian Elimination

This is the master key, the most powerful method of all! Why? Because Gaussian Elimination works for ALL systems, whether they have a unique solution, no solution, or infinitely many solutions. It tells you exactly what kind of system you're dealing with.

Analogy: Think of this method as tidying up your equations. You're not changing the core information, just rearranging it in a very neat way so the answer becomes obvious.

The Goal and The Tools

Our goal is to take an augmented matrix $$[A|B]$$ and use elementary row operations to turn it into row echelon form (which looks like a triangle of zeros in the bottom-left corner).

An augmented matrix is just the coefficient matrix A with the constant matrix B stuck onto the right side. For our running example:

$$ [A|B] = \left( \begin{array}{ccc|c} 1 & 1 & 0 & 3 \\ -1 & 0 & 1 & 1 \\ 0 & 2 & 1 & 0 \end{array} \right) $$

Our tools are the three Elementary Row Operations (EROs):

  1. Swap any two rows ($$R_i \leftrightarrow R_j$$).
  2. Multiply a row by a non-zero number ($$kR_i \to R_i$$).
  3. Add a multiple of one row to another row ($$R_i + kR_j \to R_i$$).

Step-by-Step Guide (using our example)

Our goal is to create zeros in the positions marked with *: $$ \left( \begin{array}{ccc|c} 1 & \cdot & \cdot & \cdot \\ * & \cdot & \cdot & \cdot \\ * & * & \cdot & \cdot \end{array} \right) $$

Start: $$ \left( \begin{array}{ccc|c} 1 & 1 & 0 & 3 \\ -1 & 0 & 1 & 1 \\ 0 & 2 & 1 & 0 \end{array} \right) $$

Goal 1: Make the entry below the top-left '1' a zero. We can do this by adding Row 1 to Row 2.

$$ R_2 + R_1 \to R_2 $$ $$ \left( \begin{array}{ccc|c} 1 & 1 & 0 & 3 \\ 0 & 1 & 1 & 4 \\ 0 & 2 & 1 & 0 \end{array} \right) $$

Goal 2: Make the '2' in Row 3 a zero. We can use Row 2 to do this. Let's add -2 times Row 2 to Row 3.

$$ R_3 - 2R_2 \to R_3 $$ $$ \left( \begin{array}{ccc|c} 1 & 1 & 0 & 3 \\ 0 & 1 & 1 & 4 \\ 0 & 0 & -1 & -8 \end{array} \right) $$

This is row echelon form! Now we translate it back into equations, starting from the bottom.

  • Row 3: $$0x + 0y - 1z = -8 \implies -z = -8 \implies \mathbf{z=8}$$
  • Row 2: $$0x + 1y + 1z = 4 \implies y + z = 4 \implies y + 8 = 4 \implies \mathbf{y=-4}$$
  • Row 1: $$1x + 1y + 0z = 3 \implies x + y = 3 \implies x - 4 = 3 \implies \mathbf{x=7}$$

This process of solving from the bottom up is called back substitution.

Interpreting the Final Matrix

This is the most important part of Gaussian Elimination!

  • Unique Solution: You get a nice "staircase" like we did above, with no contradictions.
  • No Solution: You end up with a row that is a contradiction, like $$[0 \ 0 \ 0 \ | \ 5]$$. This translates to the impossible equation $$0x + 0y + 0z = 5$$, or $$0 = 5$$. If you see this, the system has no solution.
  • Infinitely Many Solutions: You end up with a row of all zeros, like $$[0 \ 0 \ 0 \ | \ 0]$$. This translates to $$0=0$$, which is true but useless. It means one of your original equations was redundant. To express the solution, we introduce a parameter.

    Example: If your final equations were $$x-y=2$$ and $$z=3$$, you would let $$y=t$$, where t is any real number. Then $$x = 2+t$$. The solution would be $$(2+t, t, 3)$$.

Key Takeaway

Gaussian Elimination is your universal solver. It always works and clearly shows whether the system has a unique, infinite, or no solution. Master the row operations and learn to interpret the final form.


Part 5: A Special Case - Homogeneous Systems

This is a specific type of system that the syllabus highlights. It's simpler than it sounds!

What is a Homogeneous System?

It's a system where all the constants on the right-hand side are zero. The form is $$AX = 0$$.

Example:

$$ \begin{cases} x + 2y - z = 0 \\ 3x - y + z = 0 \\ 2x + y = 0 \end{cases} $$

The Trivial vs. Non-Trivial Solution

Think about it: if you set $$x=0, y=0, z=0$$, do the equations above work? Yes! $$0=0$$. This solution, $$(0,0,0)$$, is called the trivial solution, and it's *always* a solution for any homogeneous system.

The interesting question is: are there any *other* solutions? These are called non-trivial solutions.

The Key Theorem

This is the crucial rule you need to know:

A homogeneous system of linear equations has non-trivial solutions if and only if the coefficient matrix A is singular (i.e., if $$|A|=0$$).

Breaking it down:
  • You are given a homogeneous system.
  • You calculate the determinant of the coefficient matrix, $$|A|$$.
  • If $$|A| \neq 0$$, the only solution is the trivial one: $$(0,0,0)$$.
  • If $$|A| = 0$$, there are infinitely many non-trivial solutions (in addition to the trivial one). You would find the general form of these solutions using Gaussian elimination and a parameter 't'.
Quick Review Box
Condition Non-Homogeneous System ($$AX=B$$) Homogeneous System ($$AX=0$$)
$$|A| \neq 0$$ Unique Solution Only the Trivial Solution (which is unique)
$$|A| = 0$$ No Solution OR Infinitely Many Solutions Infinitely Many Non-Trivial Solutions
Final Key Takeaway

For homogeneous systems ($$AX=0$$), the determinant tells you everything. If $$|A| \neq 0$$, the only answer is (0,0,0). If $$|A|=0$$, there's a whole family of solutions you can find.


Summary: Which Method Should I Use?

  • Is the system homogeneous ($$AX=0$$)? First check $$|A|$$. This might be all you need to do!
  • Does the question ask for the value of only ONE variable? Use Cramer's Rule. It's the fastest.
  • Are you comfortable with finding matrix inverses? The Inverse Matrix Method is a clean process, provided $$|A| \neq 0$$.
  • Are you unsure, or did you find that $$|A|=0$$? Your go-to, all-purpose tool is Gaussian Elimination. It never fails to give you a clear answer about the nature of the solution.

Practice all three methods so you can choose the most efficient one for any problem. You've got this!