Ruled

Systems of linear equations

Matrix form AX = B, the consistency test by rank, and four solution methods — Cramer's rule, the inverse method, Gauss elimination and Gauss–Jordan — including homogeneous systems.

This is what the whole module was building towards.

Matrix form

A system of equations in unknowns

collapses to a single matrix equation

where is the coefficient matrix (), the column of unknowns (), and the column of constants ().

The augmented matrix is with attached as an extra column:

A system with is homogeneous; otherwise non-homogeneous.

Consistency — will it even have a solution?

Compare the rank of the coefficient matrix with the rank of the augmented matrix.

where is the number of unknowns. In the third case, unknowns can be chosen freely; they are the free variables or parameters.

Inconsistency shows up in the reduced augmented matrix as a row of the form

which says . That is impossible, so no solution exists.

Method 1 — Cramer's rule

For a system of equations in unknowns with :

where is with the -th column replaced by .

For three unknowns:

When , Cramer's rule gives no answer directly:

  • If and at least one inconsistent, no solution.
  • If and every consistent, infinitely many solutions (analyse by rank).

Cramer's rule is clean for and but costs determinants, so it is unusable for large systems.

Method 2 — Matrix inversion

If is square and non-singular:

Compute (usually via adjoint), then multiply. Useful when several different vectors must be solved with the same — invert once, reuse.

Method 3 — Gauss elimination

  1. Form .
  2. Reduce the left block to upper triangular / echelon form by row operations.
  3. Read the last equation, solve for the last unknown, and back-substitute upwards.

This is the method actual software uses. It has the lowest operation count of the three and never requires a determinant.

Method 4 — Gauss–Jordan

Same start, but continue until the left block is :

The solution is read off directly — no back-substitution. Slightly more arithmetic than Gauss elimination, but no second phase.

Homogeneous systems

These are always consistent, because always works. That solution is called the trivial solution. The real question is whether anything else exists.

For equations in unknowns:


In general, has non-trivial solutions if and only if , and the solution set then has free parameters.

A homogeneous system with fewer equations than unknowns () always has non-trivial solutions, since .

Choosing a method

SituationMethod
or unknowns, , question says "Cramer"Cramer's rule
Same , several different Inverse method
Any size, method freeGauss elimination
Consistency to be discussedRank of vs rank of
HomogeneousCheck ; if zero, row-reduce and parametrise

Worked examples

5 solved

Every step is shown, in the order you would write it in an answer book.

Example 1

Three unknowns by Cramer's rule

Question

Solve by Cramer's rule:

  1. Write the coefficient determinant

    Expanding along row 1:


    , so a unique solution exists.

  2. — replace column 1 with

  3. — replace column 2

  4. — replace column 3

  5. Divide

  6. Check in all three equations

    ✓    ✓   

Answer

Example 2

The same system by Gauss elimination

Question

Solve by Gauss elimination:

  1. Form the augmented matrix

  2. Clear column 1

    :

    :

  3. Clear column 2

    :

    Upper triangular — elimination is complete.

  4. Back-substitute

    From row 3:

    From row 2:

    From row 1:

  5. Note the ranks

    and , with unknowns. Equal ranks, both equal to — consistent with a unique solution, exactly as found.

Answer

— the same as by Cramer's rule, with far less arithmetic.

NoteScaling R₃ by 2 before subtracting avoids fractions. Legal, and worth doing every time.

Example 3

Solving by the inverse method

Question

Solve using :

  1. Write in matrix form

  2. Invert

  3. Multiply

  4. Check

    ✓   

Answer

NoteKeep the 1/14 outside until the very last step — it turns the whole computation into integer arithmetic.

Example 4

Testing consistency by rank

Question

Test for consistency and solve if possible:

  1. Form the augmented matrix

  2. Reduce

    :

    :

    :

  3. Read the ranks

    Coefficient block: two non-zero rows, so .

    Augmented matrix: three non-zero rows, so .

  4. Conclude

    The system is inconsistent — no solution.

    The last row says , i.e. , which is impossible. Geometrically the three planes have no common point.

Answer

Inconsistent: . No solution exists.

Example 5

A homogeneous system with non-trivial solutions

Question

Solve

  1. Check the determinant

    , so non-trivial solutions exist.

  2. Row-reduce (no column needed — it stays zero)

    :

    :

    :

  3. Count the free variables

    , unknowns, so there are free variable — a one-parameter family of solutions.

  4. Parametrise and back-substitute

    Let .

    Row 2:

    Row 1:

  5. Write the solution

    Check with , i.e. : ✓, ✓,

    Setting recovers the trivial solution.

Answer

for any real .

NoteAlways present a homogeneous answer as a multiple of a fixed vector. Giving one particular solution loses marks — the question asks for all of them.

Practice problems

7 with solutions

Work each one on paper first. The full solution — not just the answer — is one click away.

Problem 1Basic

Solve by Cramer's rule: .

Show solution

Check: ✓  

Answer
Problem 2Basic

Write in the form and state the augmented matrix.

Show solution

Augmented matrix:

Answer
Problem 3Exam level

Solve by Gauss–Jordan:

Show solution

,   :

, then to get a leading :

,   :

:

,   :

Read off directly:

Check: ✓   ✓  

Answer
Problem 4Exam level

Test for consistency and solve:

Show solution

,   :

:

Ranks. and . Equal, so the system is consistent. But unknowns and , so there are free variable and infinitely many solutions.

Parametrise. Let .

Row 2:

Row 1:

Check with , giving : ✓, ✓,

AnswerConsistent with infinitely many solutions: .
Problem 5Exam level

Find the values of for which the system has (i) a unique solution, (ii) no solution, (iii) infinitely many solutions:

Show solution

,   :

:

since .

(i) Unique solution. This would need , but the coefficient block has a zero row for every , so always. A unique solution never occurs.

(ii) No solution. Need , which makes :

(iii) Infinitely many. Need , giving :

Solution when : row 2 becomes . With : , and .

Solution when : row 2 becomes . With : , and .

Answer(i) never; (ii) ; (iii) or .
Problem 6Exam level

Show that the system has only the trivial solution.

Show solution

Homogeneous, so it is automatically consistent. Test .

Expand along row 1:


Since the coefficient matrix is non-singular, , and the only solution of is

that is, — the trivial solution only. ∎

Answer, so is the only solution.
Problem 7Challenge

Find so that has a non-trivial solution, and find that solution for the smaller value of .

Show solution

A homogeneous system has non-trivial solutions exactly when .

Expand along row 1:



Only one value, (a repeated root).

Solving at .

:
:

, , so one free parameter.

Row 2: .

Row 1: . Let .

Check with , i.e. : ✓, ✓,

Answer; solution .