Mathematics for
Data Science 2
Solving systems of linear equations: determinants and Cramer's Rule, the inverse-matrix method, echelon forms, row reduction and Gauss elimination.
Chapters
Linear Equations and a Determinants Recap
What a linear system is, how it is written as Ax = b, and what the determinant of the coefficient matrix says about its solutions.
1.1What is a linear equation?
A linear equation in the variables is an equation of the form
where the coefficients and the constant are real numbers. Every variable appears to the power one: no squares, no product of two variables, nothing under a root.
| Equation | Linear? | Why |
|---|---|---|
| Yes | both variables to the power 1 | |
| Yes | three variables, each to the power 1 | |
| No | is squared | |
| No | all three variables are squared | |
| No | a product of two variables (extra example) |
1.2A system of equations as Ax = b
A system of linear equations is a collection of such equations that share the same variables. When there are equations in unknowns, the whole system packs into one matrix equation :
- is the coefficient matrix, : one row per equation, one column per unknown.
- is the column of unknowns and is the column of constants on the right-hand side.
Write as and state the order of .
- Read the coefficients row by row: .
- The unknowns are and the constants are .
- So holds, and has 3 rows and 2 columns: its order is .
1.3Determinant recap
Cramer's Rule and the inverse-matrix method both work only when , so the determinant has to be back in hand.
A square matrix is invertible (non-singular) exactly when . That one number is the gatekeeper: every method that follows starts by checking it.
Compute and .
- : .
- , along row 1: .
- .
1.4Seeing it geometrically
For two equations in two unknowns, each equation draws a line in the -plane, and solving the system means finding where the lines meet. The determinant of the coefficient matrix decides the story.
- : the lines cross at exactly one point, a unique solution.
- , same line: and are multiples of each other, so every point of the line is a solution: infinitely many.
- , parallel lines: they never meet, so there is no solution.
alone cannot tell you whether you are in the "infinitely many" case or the "no solution" case. Telling those two apart is exactly what row reduction (Parts 4 to 6) is for.
1.5Going deeper
- Square needed for a determinant. A determinant exists only for a square matrix, so is a test for systems with as many equations as unknowns (). Rectangular systems need Gauss elimination (Part 6).
- Three variables. Each equation is a plane in 3D. The same three outcomes appear: planes meeting at a point, along a line or sheet, or not meeting at all (extra).
- Consistent / inconsistent (extra). A system with at least one solution is called consistent; with none, inconsistent.
1.6Exam tips and common mistakes
- In "is it linear?" questions look only at powers and products of variables, not at the numbers.
- The order of is (number of equations) (number of unknowns).
- Calling linear because the coefficients are numbers.
- Writing the order of as instead of .
- Concluding "no solution" just because .
Practice questions (graded-assignment style)
Multiple Select Question (MSQ): select all that apply.
Which of the following is/are a linear equation?
Variables only to the first power.
- Options 2 and 3 have every variable to the power 1.
- Options 1 and 4 contain squares of variables, so they are not linear.
- Answer: options 2 and 3.
Multiple Choice Question (MCQ): choose the one correct option.
For with , what is the order of ?
Rows = equations, columns = unknowns.
- There are 3 equations, so 3 rows. There are 2 unknowns, so 2 columns.
- The order is .
- Answer: option 2.
Multiple Select Question (MSQ): select all that apply.
Consider . Choose the correct statements.
The third equation is 2 times the first, so it adds nothing new. Look at the first two.
- For , the second equation is times the first ( vs ). It agrees only when .
- gives against : contradiction, no solution (option 1 true).
- also contradicts (option 3 false); makes the two equations identical, so infinitely many (option 4 true).
- For the first two equations are independent (), so one solution (option 2 true).
- Answer: options 1, 2 and 4.
Numerical Answer Type (NAT).
Find .
Expand along column 1: only one non-zero entry.
- Column 1 is , so .
- (For a triangular matrix the determinant is the product of the diagonal: .)
- Answer: 2
Multiple Choice Question (MCQ): choose the one correct option.
The system has:
Is the second equation a multiple of the first?
- is : the same line.
- Every point of the line is a solution, so there are infinitely many; .
- Answer: option 3.
Variables to power 1 only
Ax = b with A of order m × n
3 × 3: expand along a row
Unique solution
Cannot tell which
or are parallel
Cramer's Rule
A direct formula for the unknowns as ratios of determinants, for square systems with a non-zero determinant.
2.1When can Cramer's Rule be used?
Cramer's Rule gives a direct formula for solving , with no elimination. It applies only when both conditions hold:
- The coefficient matrix must be square.
- must be non-zero, i.e. is invertible.
If either condition fails, Cramer's Rule does not apply and you use Gauss elimination (Part 6) instead.
2.2Order 2
For with , replace one column of at a time by :
is with its -th column replaced by . The unknown is the ratio of the new determinant to the old one.
Solve .
- , , so the rule applies.
- , .
- , .
- , .
- Check: and .
2.3Order 3
The pattern extends directly. For and so on, build by putting in place of the 1st, 2nd and 3rd columns of . Then
Solve .
- , , and (Example 2).
- Replace columns by : , , .
- Their determinants are , , .
- , , .
- Check in equation 1: .
2.4Order n: the general pattern
For an system with , let be the matrix obtained from by replacing its -th column with . Then
- It needs determinants of order : one for and one for each .
- A bonus fact (extra). You can find just one unknown without solving for the others: compute only and that one .
- Why it is slow for big (extra). Computing determinants is expensive, which is why elimination is preferred for large systems.
2.5Exam tips and common mistakes
- Check first. If it is 0, stop: Cramer's Rule does not apply.
- Replace the column, not the row, and keep the other columns in their original order.
- When a question gives some unknowns, plug them into the rows first; it often fixes the parameter without any determinant.
- Putting in the wrong column.
- Dividing by instead of .
- Using Cramer's Rule on a non-square system.
Practice questions (graded-assignment style)
Multiple Select Question (MSQ): select all that apply.
For with , , and the matrix got by replacing the -th column of with , choose the correct options.
Replace the whole column, keep the rest unchanged.
- : column 1 becomes , so the rows start with 1, 1, 1 and the other columns stay: option 2 is true; option 1 is not with a column replaced by , so it is false.
- : column 2 must become ; option 3 is just again, so it is false.
- : column 3 becomes : option 4 is true.
- Answer: options 2 and 4.
Multiple Select Question (MSQ): select all that apply.
For the same system, and . Which are correct?
Read the entries of the solution vector.
- and are entries 1 and 3; , not .
- Check in equation 1: . Equation 2: . Equation 3: .
- Answer: options 1 and 3.
Numerical Answer Type (NAT).
with , , . Find , given .
Use the known second entry in each row.
- Row 1: , so .
- Row 2: , so and .
- Row 3: , so , i.e. and .
- Answer: 2
Numerical Answer Type (NAT).
with , , . Find , given .
Put into both rows.
- Row 1: .
- Row 2: , so and .
- Answer: -1
Numerical Answer Type (NAT).
Solve with Cramer's Rule and give .
, then .
- .
- , .
- . (And .)
- Answer: 3
det(A) ≠ 0
of A by b
Order 3: 4 determinants
Order n: n + 1
i = 1, 2, …, n
Use Gauss elimination
original equation
Solving with an Invertible Coefficient Matrix
The same systems solved by finding the inverse of A, and a picture of what a unique solution looks like in 3D.
3.1The idea
Cramer's Rule needs determinants. This method reaches straight for the inverse of . Start from and multiply both sides on the left by :
This works because . The applicability conditions are exactly the same as for Cramer's Rule: must be square and .
- Find the inverse (adjugate and determinant: ).
- Compute the product ; it is a column matrix.
- Read off by comparing with .
3.2Seeing it in 3D
With three variables each equation is a plane, and an invertible coefficient matrix means all three planes meet at exactly one point. For example, , , meet only at .
3.3Cramer's Rule or the inverse?
| Cramer's Rule | Inverse-matrix method | |
|---|---|---|
| Conditions | square, | square, |
| What you compute | determinants | , then |
| Strength | one unknown at a time (extra) | all unknowns at once; reuse for many (extra) |
3.4Going deeper
- Why the answer is unique. If is invertible, is forced: any solution has to equal it. So an invertible gives exactly one solution for every .
- The 2 × 2 shortcut (extra). For : swap the diagonal entries, negate the off-diagonal ones, divide by . That is how of Example 5 came out.
- Adjugate = inverse when . In Q1 below , so and are the same matrix.
3.5Exam tips and common mistakes
- Always check the answer: must give back.
- If , the adjugate is the inverse, so you can skip the division.
- Forgetting to divide the adjugate by .
- Multiplying instead of .
- Sign slips while building the adjugate (signs alternate in a checkerboard).
Practice questions (graded-assignment style)
Multiple Select Question (MSQ): select all that apply.
Consider , with , , . Choose the correct options.
Compute first, then check each option with .
- , so option 4 is true.
- With , : options 2 and 3 are true.
- Option 1 fails: row 1 of times column 1 of option 1 is .
- Answer: options 2, 3 and 4.
Multiple Select Question (MSQ): select all that apply.
For the same system, which are correct?
Use .
- .
- So (not ), , .
- Check: , , .
- Answer: options 2 and 3.
Numerical Answer Type (NAT).
Use the inverse method on and find .
, so the adjugate is the inverse.
- , , .
- .
- So .
- Answer: -1
Multiple Choice Question (MCQ): choose the one correct option.
If is square and invertible, the solution of is:
Multiply both sides of by on the left.
- and , so .
- does not exist (a column is not a square matrix), and has the wrong shape.
- Answer: option 2.
A square, det(A) ≠ 0
A⁻¹A = I
A column matrix
at one point
The Echelon Form
The shapes that a matrix is reduced to, so that systems of any size, square or not, can be solved.
4.1Why we need it
Cramer's Rule and the inverse method share a blind spot: they work only when is square and invertible. Real systems are often rectangular, or square but singular. The echelon form is the tool that handles those too. It is really two related shapes.
4.2Row echelon form (REF)
A matrix is in row echelon form if:
- The first non-zero entry (the leading entry) of each row is 1.
- The leading 1 of each row sits strictly to the right of the leading 1 in the row above.
- Any all-zero rows sit at the bottom, below every non-zero row.
4.3Reduced row echelon form (RREF)
A matrix is in reduced row echelon form if it satisfies everything above, plus one more condition:
- The leading 1 in each row is the only non-zero entry in its entire column.
Every matrix in RREF is automatically in REF. RREF just adds the column clean-up condition on top.
4.4Going deeper
- Leading 1 = pivot (extra). The leading 1 of a row is also called a pivot, and its column a pivot column. This word is used a lot in Part 6.
- RREF is unique (extra). A matrix can have many REFs, but its RREF is one single matrix, whichever row operations you use to reach it.
- Echelon form and determinants. A square matrix with a row of zeros has . A square matrix whose RREF is the identity has (it is invertible), as in Q2 below.
4.5Exam tips and common mistakes
- Test the three REF conditions in order: leading 1s, staircase, zero rows. Only then test the RREF column condition.
- Look only at the entry above and below each leading 1 for RREF; other entries are free.
- Requiring the leading entry to be 1 but forgetting the staircase direction (it goes right as you go down).
- Calling a matrix RREF when a non-leading entry above a leading 1 is non-zero.
- Putting a zero row above a non-zero row.
Practice questions (graded-assignment style)
Multiple Select Question (MSQ): select all that apply.
Let (row 1 is the topmost row). Identify the correct statements.
Read each row from the left.
- Row 1 is : its first non-zero entry is 1, not 3 (option 1 false).
- Row 2 is : it begins with 1 (option 2 true). Row 3 is entirely zero (option 3 false).
- A square matrix with a zero row has (option 4 true).
- Answer: options 2 and 4.
Multiple Select Question (MSQ): select all that apply.
Let , a matrix. Which statements are true?
Compute : non-zero means the RREF is the identity.
- gives , then gives , then gives the matrix of option 1: true.
- , so the RREF is the identity matrix : option 3 is true and option 2 is false.
- The identity is also in REF, and can reach it, so option 4 is true.
- Answer: options 1, 3 and 4.
Numerical Answer Type (NAT).
The RREF of a matrix is . The first and third columns of itself are and . If the second column of is , find .
Row operations act on every column in the same way: .
- From columns 1 and 3: , giving .
- The second column of the RREF is , so .
- Check the logic: turns into and into .
- , so and .
- Answer: 1
Multiple Choice Question (MCQ): choose the one correct option.
Which of the following matrices is in reduced row echelon form?
Check staircase, zero rows and clean columns.
- Option 1 is the identity: RREF.
- Option 2: the 2 above the second leading 1 breaks the column condition (REF only).
- Option 3: the leading 1 of row 2 is to the left of the leading 1 of row 1. Not REF.
- Option 4: the zero row is above a non-zero row. Not REF.
- Answer: option 1.
Staircase to the right
Zero rows at the bottom
leading 1 is alone
in its column
REF need not be RREF
and singular matrices
Its column is a pivot column
RREF = I: det ≠ 0
Row Reduction
The three elementary row operations, what they do to the determinant, and the algorithm that reaches REF and RREF.
5.1The three elementary row operations
Getting a matrix into echelon form uses three elementary row operations. Each has a predictable effect on the determinant, which is worth remembering.
| Type | Operation | Effect on |
|---|---|---|
| 1 · interchange | swap two rows | |
| 2 · scale | multiply a row by a constant | |
| 3 · add a multiple | add a multiple of one row to another | , unchanged |
5.2The row-reduction algorithm
To carry any matrix into REF and then RREF:
- Step 1. Find the left-most non-zero column.
- Step 2. Use a Type 1 or Type 2 operation to make its top entry 1.
- Step 3. Use Type 3 operations to zero out every entry below that 1.
- Step 4. Repeat on the submatrix below and to the right of the current row, until no non-zero rows are left. The matrix is now in REF.
- Step 5. For each column with a leading 1, use Type 3 operations to clear every other entry in that column. The matrix is now in RREF.
5.3Going deeper
- Row operations keep the solutions. Applying them to never changes the solution set of . Each step is reversible, so equations are replaced by equivalent ones (extra).
- Why Type 2 uses (extra). Multiplying a row by 0 would destroy information and cannot be undone.
- Each operation is a matrix (extra). Doing a row operation is the same as multiplying on the left by an elementary matrix. That is why in Q3 of Part 4 acts on every column in the same way.
5.4Exam tips and common mistakes
- Write the operation next to every step (R₂ − 3R₁ and so on) so mistakes are easy to trace.
- To avoid fractions, you may swap rows to get a 1 early, or scale only when needed.
- Never change two rows at once with a swap and an add in the same step.
- Believing that scaling a row leaves unchanged (Type 2 changes it by ).
- Using the already-changed row while updating a second row in the same step.
- Forgetting Step 5 and calling a REF a RREF.
Practice questions (graded-assignment style)
Numerical Answer Type (NAT).
Let and let be its reduced row echelon form. How many non-zero rows does have?
Row-reduce .
- Swap : .
- : ; then : .
- This is already the RREF, with 2 non-zero rows.
- Answer: 2
Numerical Answer Type (NAT).
For the same , consider with and . If is given, find .
Use the first two rows of .
- Row 2 of : . With , .
- Row 1: , so .
- Check row 3: .
- Answer: -0.5
Multiple Select Question (MSQ): select all that apply.
Let and be matrices. Eqn 1: . Eqn 2: for some . Eqn 3: . Choose the correct options.
Recall the effect of each type on .
- Type 1 flips the sign: option 1 is true.
- Type 1 then Type 2 gives (with the scaling factor), which is Eqn 2 for some : option 2 is true.
- Type 2 generally changes the determinant (it multiplies it by ), so option 3 is false.
- Type 3 leaves unchanged: option 4 is true.
- Answer: options 1, 2 and 4.
Numerical Answer Type (NAT).
. Swap two rows of , then multiply one row of the result by 3. What is the determinant of the final matrix?
Apply the two effects one after another.
- Swap: .
- Scale a row by 3: .
- Answer: -18
det changes sign
det × c
one row to another
det unchanged
zero below, repeat
Result: REF
Result: RREF
as a sanity check
The Gauss Elimination Method
Solving any linear system by row-reducing its augmented matrix, and reading off whether the answer is unique, infinite, or absent.
6.1Why Gauss elimination?
Cramer's Rule and the inverse method both need a square, invertible . Gauss elimination has no such requirement. It works whether is square or rectangular, invertible or singular, and it tells you outright whether the system has a unique solution, infinitely many, or none at all.
6.2Homogeneous and non-homogeneous systems
Every right-hand side is zero. It always has the trivial solution . Then exactly one of two things happens: is the only solution, or there are infinitely many solutions besides .
Some . It can land in any of three buckets: a unique solution, infinitely many, or none. Gauss elimination decides which.
- More unknowns than equations (): there are always infinitely many solutions besides , because a free variable must exist.
- square and invertible: is the only solution.
6.3The augmented matrix
For , the augmented matrix glues the column onto as an extra last column:
6.4The algorithm
- Step 1. Form the augmented matrix .
- Step 2. Row-reduce it all the way to RREF, with the operations of Part 5.
- Step 3. Split the result as , where is the RREF of and is the transformed last column.
- Step 4. Rewrite it as the equation .
- Step 5. Solve directly. A variable with no leading 1 in its column is a free (independent) variable; the others are dependent, written in terms of the free ones.
6.5Reading the outcome
| RREF of [A | b] | Outcome | Why |
|---|---|---|
| every variable column has a leading 1, no bad row | unique solution | each variable is fixed |
| some variable column has no leading 1, no bad row | infinitely many | free variables can take any value |
| a row | no solution | it says |
6.6Choosing a method
6.7Going deeper
- Free variables. The number of free variables is (number of unknowns) (number of leading 1s in the coefficient part). One free variable gives a line of solutions, two give a plane, and so on (extra).
- Parameter problems. When a system has a letter like or , reduce as far as the letters allow, then split into cases (Q3 below).
- The same pivot idea (extra). "Leading 1 in every variable column" means unique; "a free column" means infinitely many; "0 = 1 row" means none. These three checks answer almost every question on this topic.
6.8Rank, the inverse by Gauss–Jordan, and the rules of the inverse
Four ideas that the graded assignments lean on and that grow straight out of row reduction: rank, the rank test for solutions, finding by Gauss–Jordan, and the algebra of inverses.
A. Rank
The rank of a matrix , written , is the number of non-zero rows in its row echelon form, which is the same as the number of leading 1s (pivots) in its RREF.
Example. . Then and ; subtracting once more, . The RREF is
- Elementary row operations do not change the rank, so any echelon form gives the right count.
- For an matrix, , and .
- Rank counts the rows that are genuinely new: here row 2 is not a multiple of row 1, but row 3 is made of rows 1 and 2, so only two rows survive.
- For an matrix: (RREF is ). In the example, and .
B. The rank test for
Let be ( unknowns) and compare the rank of with the rank of the augmented matrix . This is just 6.5 written with ranks: a row raises the rank of by one.
| Ranks | Outcome |
|---|---|
| no solution (inconsistent) | |
| exactly one solution | |
| infinitely many, with free variables |
A parameter example. Take . Row-reduce the augmented matrix: gives , gives , then gives
- : both ranks are 3, so a unique solution, for every .
- and : last row is all zeros, both ranks are 2, so infinitely many solutions ( free variable).
- and : last row is with ; ranks are 2 and 3, so no solution.
The coefficient determinant of this system is , which agrees: the system fails to have a unique solution only at .
C. Finding by Gauss–Jordan
Write and the identity side by side as and row-reduce until the left half becomes . Whatever the same row operations have turned the right half into is :
Why it works. Each row operation is multiplication on the left by an invertible matrix. If the product of all of them is , then and . So , and the right half records .
Example. .
So . Check: (so is the same matrix), and the first row of times the first column of is , while row 1 times column 2 is ✓.
2 × 2 shortcut. . For , , so the inverse is .
D. The rules of the inverse
Let and be invertible matrices of the same order.
| Rule | Why |
|---|---|
| does what the inverse of must do: . | |
| (order reverses) | . Undo the last step first, like taking off socks and shoes. |
| . | |
| , | . |
| Apply the product rule times. | |
| . | |
| is invertible exactly when both and are | needs both factors non-zero. |
- in general. It is .
- . There is no simple formula for the inverse of a sum.
- No cancelling without an inverse. gives only when is invertible (multiply by on the left). With , , , we get but .
Solving matrix equations. For invertible : (multiply on the left), but (multiply on the right). The side matters because matrix products do not commute.
E. One square matrix, many equivalent statements
For an matrix , each of these says the same thing, and each has a negation that all say the opposite:
| is invertible | is singular |
|---|---|
| RREF of is | RREF has a zero row |
| has only | has a non-trivial solution |
| has exactly one solution for every | has none or infinitely many, depending on |
| Cramer's Rule and apply | Neither applies; use Gauss elimination |
6.9Exam tips and common mistakes
- Always carry the last column along with every row operation.
- After solving, plug your answer back into the original equations.
- For a solution set with a free variable, write it with a parameter: S = { ... | c ∈ ℝ }.
- Row-reducing only A and forgetting the b column.
- Treating a free variable as dependent, or giving only one solution for a system with a free variable.
- Missing the row and claiming a solution exists.
Practice questions (graded-assignment style)
Numerical Answer Type (NAT).
Let and . If , what is the sum of all elements of ?
.
- ; check: .
- .
- . The sum is .
- Answer: 6
Multiple Choice Question (MCQ): choose the one correct option.
The system has:
Find of the coefficient matrix.
- , so the coefficient matrix is invertible and the system has a unique solution.
- In fact (check: , , ).
- Option 4 ("finitely many") is not a distinct case: a linear system has 0, 1 or infinitely many solutions. Option 3 is the one that fits.
- Answer: option 3.
Multiple Select Question (MSQ): select all that apply.
Consider . Choose the correct options.
Solve the first two equations for in terms of , then substitute into the third.
- The first two give and .
- Substituting into the third: .
- : the equation is . For it always holds, so infinitely many (option 1 true); for it has no solution.
- : , a unique solution. So gives (unique, option 2 false); gives (unique, option 3 false); gives (unique, option 4 true).
- Answer: options 1 and 4.
Numerical Answer Type (NAT).
The RREF of the augmented matrix of a system in is . How many free variables are there?
Which variable column has no leading 1?
- Leading 1s are in columns 1, 2 and 4.
- Column 3 has no leading 1, so is the only free variable: , , .
- Answer: 1
Multiple Choice Question (MCQ): choose the one correct option.
A homogeneous system has 2 equations in 3 unknowns. Which statement is true?
A homogeneous system always has , and unknowns exceed equations.
- It is never inconsistent ( works), so option 3 is false.
- With 3 unknowns and at most 2 leading 1s, some column is free, giving infinitely many solutions.
- A linear system never has exactly two solutions. Option 2 is true.
- Answer: option 2.
Numerical Answer Type (NAT).
Find the rank of .
Row-reduce and count the non-zero rows.
- and . Then .
- Echelon form: , with 2 non-zero rows.
- Check: , so the rank must be less than 3 ✓. Rows 1 and 2 are not proportional, so the rank is not 1.
- Answer: 2
Multiple Select Question (MSQ): select all that apply.
Consider . Select all correct statements.
Reduce the augmented matrix and compare the rank of with the rank of .
- Row reduction gives the last row (see the parameter example in 6.9).
- Option 1 ✓ : last row is . Both ranks are 2, less than 3 unknowns, so infinitely many solutions.
- Option 2 ✓ : last row is , which says . The ranks are 2 and 3, so no solution.
- Option 3 ✓ : the pivot , so all three columns have pivots: one solution whatever is.
- Option 4 ✗ For the last pivot exists and the solution is unique, not absent.
- Answer: options 1, 2 and 3.
Numerical Answer Type (NAT).
For , find the entry of .
Reduce to and read the entry. (Cross-check with a cofactor.)
- The worked reduction in 6.9 gives .
- Cross-check with : the entry of the adjugate is the cofactor , and . So the entry is ✓.
- Answer: -24
Numerical Answer Type (NAT).
and are invertible matrices with and . Find .
of an inverse is the reciprocal, and of a product is the product of the s. The order inside does not matter for the determinant.
- , so .
- .
- .
- Answer: 0.5
Multiple Select Question (MSQ): select all that apply.
and are invertible matrices. Choose the correct statements.
Test each rule by multiplying the proposed inverse by the matrix and asking whether the result is .
- Option 1 ✗ , which is generally not because and do not commute.
- Option 2 ✓ .
- Option 3 ✓ .
- Option 4 ✗ For : , but .
- Option 5 ✓ .
- Option 6 ✗ Cancelling needs to be invertible. With , , : but .
- Answer: options 2, 3 and 5.
Multiple Choice Question (MCQ): choose the one correct option.
is an invertible matrix and , are matrices with . Then equals
sits on the right of , so multiply both sides by on the right to cancel it.
- .
- Option 1 would be the answer to , not . Options 3 and 4 invert , which need not be invertible.
- Numeric check: , give , and returns ✓.
- Answer: option 2.
Numerical Answer Type (NAT).
For which value of does have a non-trivial solution?
A square homogeneous system has a non-trivial solution exactly when the coefficient determinant is .
- .
- .
- Check: at , , so the rows are dependent and the rank is 2, with free variable.
- Answer: 5
Multiple Choice Question (MCQ): choose the one correct option.
is a matrix with . Which is true about ?
Compare ranks: also has 3 rows, so its rank cannot exceed 3.
- , and it is at least , so the two ranks are equal: the system is consistent for every . That rules out option 1.
- The number of free variables is , so each solvable system has infinitely many solutions. That rules out option 2 and option 4.
- Answer: option 3.
Numerical Answer Type (NAT).
A homogeneous system has a coefficient matrix of rank 3. How many free variables does its general solution have?
Free variables = unknowns rank.
- The number of unknowns is the number of columns, (not the number of rows).
- Free variables . Pivot columns give the 3 dependent variables, and the other 3 columns are free.
- Answer: 3
Ax = b: non-homogeneous
b glued as last column
R is the RREF of A
Free column: parameter
or none (0 = 1 row)
Week 2 Summary Sheet
One page to revise all of Week 2: the methods, their conditions, the row operations and the three possible outcomes.
The big picture
- , with of order .
- invertible.
- .
- Needs a square, invertible A.
- , .
- Same conditions as Cramer.
- REF: leading 1s step right, zero rows at the bottom.
- RREF: each leading 1 alone in its column.
- Three row operations; five-step algorithm.
- Swap: flips; scale: ; add: unchanged.
- , then solve .
- Unique, infinitely many, or none.
Revision sheet
| Topic | Key idea |
|---|---|
| Linear equation | : every variable to the power 1 |
| Invertible / non-singular | |
| Cramer's Rule | ; needs a square, invertible |
| Inverse-matrix method | ; needs a square, invertible |
| Row echelon form | leading 1s step right going down; zero rows at the bottom |
| Reduced row echelon form | REF, and each leading 1 is the only non-zero entry in its column |
| Type 1 row operation | swap two rows flips sign |
| Type 2 row operation | scale a row by scales by |
| Type 3 row operation | add a multiple of one row to another unchanged |
| Augmented matrix | : glue on as the last column |
| Gauss elimination | row-reduce to , then solve |
| Free variable | a variable with no leading 1 in its column; set it to a parameter |
Which method when?
| Situation | Use |
|---|---|
| square , , one answer wanted | Cramer's Rule or |
| , or not square | Gauss elimination |
| decide unique / infinitely many / none | Gauss elimination (look at the RREF) |
| is a matrix in REF / RREF? | check the four conditions in order |
Common mistakes
- Squares and products of variables make it non-linear.
- If or is not square, use Gauss elimination.
- It is , not .
- A REF may still have non-zero entries above a leading 1.
- Only Type 3 (and no other) leaves unchanged.
- A row means no solution.