2.6.11 · D4Matrices & Determinants — Introduction

Exercises — Solving 2×2 systems using Cramer's rule

2,044 words9 min readBack to topic

Throughout, our system is always and the three determinants are (parent definitions, repeated so nothing is assumed):

D_x=\begin{vmatrix}c_1&b_1\\c_2&b_2\end{vmatrix},\quad D_y=\begin{vmatrix}a_1&c_1\\a_2&c_2\end{vmatrix}.$$ > [!definition] "Diagonal down minus diagonal up" — what a $2\times2$ determinant *is* > A determinant $\begin{vmatrix}p&q\\r&s\end{vmatrix}$ is a single number: take the **main diagonal** > (top-left to bottom-right, $p\to s$) and multiply, $ps$; take the **anti-diagonal** (top-right to > bottom-left, $q\to r$) and multiply, $qr$; then **subtract** in that order: $ps-qr$. See the arrows > in the figure below — the green arrow is "plus," the red arrow is "minus." ![[deepdives/dd-maths-2.6.11-d4-s01.png]] See [[Determinant of a 2×2 matrix]] for why this number equals the signed area of the parallelogram built from the rows. --- ## Level 1 — Recognition *Goal: identify $D$, $D_x$, $D_y$ correctly — no solving yet.* > [!example] Q1. Name the pieces > For the system $5x - 2y = 7,\quad 3x + 4y = 1$, write down $D$, $D_x$, and $D_y$ **as determinants** > (do not evaluate them yet), then evaluate each. > [!recall]- Solution Q1 > Match against the template. Here $a_1=5,\ b_1=-2,\ c_1=7$ and $a_2=3,\ b_2=4,\ c_2=1$. > $$D=\begin{vmatrix}5&-2\\3&4\end{vmatrix},\quad > D_x=\begin{vmatrix}7&-2\\1&4\end{vmatrix},\quad > D_y=\begin{vmatrix}5&7\\3&1\end{vmatrix}.$$ > **WHY these:** $D_x$ swaps column 1 (the $x$-column) for the constants $\binom{7}{1}$; $D_y$ swaps > column 2 (the $y$-column). Evaluate with "diagonal down minus diagonal up": > $$D=(5)(4)-(-2)(3)=20+6=26,$$ > $$D_x=(7)(4)-(-2)(1)=28+2=30,$$ > $$D_y=(5)(1)-(7)(3)=5-21=-16.$$ > [!example] Q2. Which column got swapped? > Someone wrote $\begin{vmatrix}2&9\\-1&9\end{vmatrix}$ for the system > $2x + 6y = 9,\ -x + 8y = 9$. Is this $D_x$ or $D_y$? Is it even correct? > [!recall]- Solution Q2 > The constant column here is $\binom{9}{9}$. In the written determinant, column 2 is $\binom{9}{9}$ > and column 1 is the original $a$-column $\binom{2}{-1}$. Swapping **column 2** with the constants > is the recipe for $==D_y==$. So it is meant to be $D_y$. > Is it correct? The template says $D_y=\begin{vmatrix}a_1&c_1\\a_2&c_2\end{vmatrix} > =\begin{vmatrix}2&9\\-1&9\end{vmatrix}$ — **yes, correct.** Value: $(2)(9)-(9)(-1)=18+9=27$. > [!mistake] L1 trap — "constants go on top so this is $D_x$." > **Why it feels right:** the constant column visibly appears, and students associate "the answer > numbers on top" with the numerator for $x$. **The truth:** *which variable* the determinant belongs > to is decided by *which column was replaced*, not by the mere presence of constants. Constants in > **column 1** → $D_x$; constants in **column 2** → $D_y$. **Fix:** whisper "variable = column." --- ## Level 2 — Application *Goal: solve a clean unique system end-to-end.* > [!example] Q3. Solve it > $$3x + 2y = 12, \qquad x - y = 1.$$ > [!recall]- Solution Q3 > **Step 1 — $D$ first (WHY: if $0$ we must stop).** > $D=\begin{vmatrix}3&2\\1&-1\end{vmatrix}=(3)(-1)-(2)(1)=-3-2=-5\neq0.$ Good, unique solution. > **Step 2 — $D_x$** (swap column 1 with $\binom{12}{1}$): > $D_x=\begin{vmatrix}12&2\\1&-1\end{vmatrix}=(12)(-1)-(2)(1)=-12-2=-14.$ > **Step 3 — $D_y$** (swap column 2): > $D_y=\begin{vmatrix}3&12\\1&1\end{vmatrix}=(3)(1)-(12)(1)=3-12=-9.$ > **Step 4:** $x=\dfrac{D_x}{D}=\dfrac{-14}{-5}=\dfrac{14}{5},\quad y=\dfrac{D_y}{D}=\dfrac{-9}{-5}=\dfrac{9}{5}.$ > **Check** in eq.(2): $\tfrac{14}{5}-\tfrac{9}{5}=\tfrac{5}{5}=1.$ ✓ > [!example] Q4. Fractions in the answer > $$4x + 5y = 3, \qquad 6x - 2y = 8.$$ > [!recall]- Solution Q4 > $D=\begin{vmatrix}4&5\\6&-2\end{vmatrix}=(4)(-2)-(5)(6)=-8-30=-38.$ > $D_x=\begin{vmatrix}3&5\\8&-2\end{vmatrix}=(3)(-2)-(5)(8)=-6-40=-46.$ > $D_y=\begin{vmatrix}4&3\\6&8\end{vmatrix}=(4)(8)-(3)(6)=32-18=14.$ > $x=\dfrac{-46}{-38}=\dfrac{23}{19},\quad y=\dfrac{14}{-38}=-\dfrac{7}{19}.$ > **Check** eq.(1): $4\cdot\tfrac{23}{19}+5\cdot(-\tfrac{7}{19})=\tfrac{92-35}{19}=\tfrac{57}{19}=3.$ ✓ > [!example] Q5. A zero constant > $$2x + 7y = 0, \qquad 5x + 3y = 29.$$ > [!recall]- Solution Q5 > $D=\begin{vmatrix}2&7\\5&3\end{vmatrix}=(2)(3)-(7)(5)=6-35=-29.$ > $D_x=\begin{vmatrix}0&7\\29&3\end{vmatrix}=(0)(3)-(7)(29)=-203.$ > $D_y=\begin{vmatrix}2&0\\5&29\end{vmatrix}=(2)(29)-(0)(5)=58.$ > $x=\dfrac{-203}{-29}=7,\quad y=\dfrac{58}{-29}=-2.$ > **Note:** a $0$ constant is fine — it just kills one product inside the determinant, nothing breaks. > **Check** eq.(1): $2(7)+7(-2)=14-14=0.$ ✓ > [!mistake] L2 trap — "flip the sign of the answer, not of the determinant." > **Why it feels right:** when $D<0$ students see two negatives and rush, sometimes writing > $x=-D_x/D$ to "make it positive." **The truth:** the formula is $x=D_x/D$ with **each determinant's > own sign kept**; a negative over a negative already gives the right positive value. > In Q3, $-14/-5=+14/5$ automatically. **Fix:** compute $D_x$ and $D$ with correct signs, then divide > once — never sprinkle extra minus signs. --- ## Level 3 — Analysis *Goal: interpret $D=0$ — classify no-solution vs infinite-solution.* ![[deepdives/dd-maths-2.6.11-d4-s02.png]] > [!example] Q6. Classify > $$3x - 6y = 9, \qquad -2x + 4y = 5.$$ > [!recall]- Solution Q6 > $D=\begin{vmatrix}3&-6\\-2&4\end{vmatrix}=(3)(4)-(-6)(-2)=12-12=0.$ > $D=0$, so **no unique solution** — investigate. Compute one numerator: > $D_x=\begin{vmatrix}9&-6\\5&4\end{vmatrix}=(9)(4)-(-6)(5)=36+30=66\neq0.$ > Since $D=0$ but $D_x\neq0$: **no solution** (parallel, distinct lines — the blue/orange left panel > of the figure). Geometrically the two lines have the same slope but different intercepts, so they > never cross. > [!example] Q7. Classify > $$x + 3y = 4, \qquad 2x + 6y = 8.$$ > [!recall]- Solution Q7 > $D=\begin{vmatrix}1&3\\2&6\end{vmatrix}=6-6=0.$ Investigate both: > $D_x=\begin{vmatrix}4&3\\8&6\end{vmatrix}=24-24=0,\quad D_y=\begin{vmatrix}1&4\\2&8\end{vmatrix}=8-8=0.$ > All three zero → **infinitely many solutions** (one and the same line — the right panel of the > figure, where blue and orange overlap perfectly). Parametrize: from eq.(1), $x=4-3y$, with $y$ free. > [!example] Q8. Which case is it, and why? > Without fully solving, decide the number of solutions of > $$6x - 4y = 10, \qquad -3x + 2y = -5.$$ > [!recall]- Solution Q8 > $D=\begin{vmatrix}6&-4\\-3&2\end{vmatrix}=(6)(2)-(-4)(-3)=12-12=0.$ Degenerate. > Check $D_x=\begin{vmatrix}10&-4\\-5&2\end{vmatrix}=(10)(2)-(-4)(-5)=20-20=0.$ > And $D_y=\begin{vmatrix}6&10\\-3&-5\end{vmatrix}=(6)(-5)-(10)(-3)=-30+30=0.$ > All zero → **infinitely many solutions.** (Indeed eq.(2) is exactly $-\tfrac12\times$ eq.(1).) > [!mistake] L3 trap — "$D=0$, therefore no solution." > **Why it feels right:** $D=0$ blocks the division, so it feels like "impossible." **The truth:** > $D=0$ only means *not unique*. You **must** test $D_x$ (and $D_y$): if any is nonzero → no solution; > if all are zero → infinitely many. Q6 and Q7 both have $D=0$ yet opposite answers. **Fix:** after > $D=0$, never conclude — compute a numerator to split the two cases. --- ## Level 4 — Synthesis *Goal: parameters, and combining Cramer with algebra.* > [!example] Q9. Find $k$ making the system have **no unique** solution > $$kx + 3y = 6, \qquad 2x + y = 4.$$ > Find every $k$ for which the solution is *not* unique, then classify each such $k$. > [!recall]- Solution Q9 > Uniqueness fails exactly when $D=0$. > $D=\begin{vmatrix}k&3\\2&1\end{vmatrix}=(k)(1)-(3)(2)=k-6.$ > $D=0\iff k=6$. **So $k=6$** is the only troublesome value. > **Now classify $k=6$.** With $k=6$: $D_x=\begin{vmatrix}6&3\\4&1\end{vmatrix}=(6)(1)-(3)(4)=6-12=-6\neq0.$ > Since $D=0,\ D_x\neq0$: **no solution** at $k=6$. For every $k\neq6$: **unique solution.** > (There is *no* value of $k$ giving infinitely many here, because $D_x$ stays $-6\neq0$ whenever $D=0$.) > [!example] Q10. Solve with a parameter, then specialize > Solve $2x + y = m,\ x + 3y = 1$ for $x,y$ in terms of $m$, then find $m$ making $x=y$. > [!recall]- Solution Q10 > $D=\begin{vmatrix}2&1\\1&3\end{vmatrix}=6-1=5\neq0$ for all $m$, so a unique solution always exists. > $D_x=\begin{vmatrix}m&1\\1&3\end{vmatrix}=3m-1,\qquad D_y=\begin{vmatrix}2&m\\1&1\end{vmatrix}=2-m.$ > $$x=\frac{3m-1}{5},\qquad y=\frac{2-m}{5}.$$ > Set $x=y$: $\dfrac{3m-1}{5}=\dfrac{2-m}{5}\Rightarrow 3m-1=2-m\Rightarrow 4m=3\Rightarrow m=\dfrac34.$ > **Check:** at $m=\tfrac34$, $x=\dfrac{3(\frac34)-1}{5}=\dfrac{\frac94-1}{5}=\dfrac{5/4}{5}=\dfrac14$, > and $y=\dfrac{2-\frac34}{5}=\dfrac{5/4}{5}=\dfrac14.$ Indeed $x=y=\tfrac14$. ✓ > [!example] Q11. Two conditions at once > A system $ax + 2y = 6,\ 3x + by = 9$ is known to have the solution $x=2,\ y=1$. Find $a$ and $b$, > then confirm with Cramer's rule that this really is *the* solution. > [!recall]- Solution Q11 > Plug $x=2,\ y=1$ into both equations: > eq.(1): $2a+2=6\Rightarrow a=2$. eq.(2): $6+b=9\Rightarrow b=3$. > So the system is $2x+2y=6,\ 3x+3y=9$. **But watch:** > $D=\begin{vmatrix}2&2\\3&3\end{vmatrix}=6-6=0.$ Not unique! > $D_x=\begin{vmatrix}6&2\\9&3\end{vmatrix}=18-18=0,\ D_y=\begin{vmatrix}2&6\\3&9\end{vmatrix}=18-18=0.$ > **Infinitely many solutions** — $(2,1)$ is *one* of them, not the only one. (Both equations reduce to > $x+y=3$.) **Lesson:** "has solution $(2,1)$" need not mean "unique"; Cramer reveals the degeneracy. > [!mistake] L4 trap — "$D=0$ found; done, the system fails." > **Why it feels right:** in Q9 setting $D=0$ solved the whole problem, so students stop at $D=0$ > everywhere. **The truth:** the question may still ask *which* degenerate case (no solution vs > infinite), which needs $D_x,D_y$ — see Q11, where $D=0$ actually gives infinitely many, not "no > solution." **Fix:** treat $D=0$ as a fork, never an endpoint. --- ## Level 5 — Mastery *Goal: prove and build — understand the machinery itself.* > [!example] Q12. Prove the $y$-numerator > Starting from $a_1x+b_1y=c_1,\ a_2x+b_2y=c_2$, derive $y=\dfrac{a_1c_2-a_2c_1}{a_1b_2-a_2b_1}$ by > elimination, and show the numerator equals $D_y$. > [!recall]- Solution Q12 > **Eliminate $x$** (WHY: we want $y$ alone). Multiply eq.(1) by $a_2$ and eq.(2) by $a_1$: > $$a_1a_2x+a_2b_1y=a_2c_1,\qquad a_1a_2x+a_1b_2y=a_1c_2.$$ > Both $x$-terms are now $a_1a_2x$ — subtract the first from the second: > $$(a_1b_2-a_2b_1)\,y = a_1c_2-a_2c_1.$$ > WHY it looks clean: the shared $a_1a_2x$ cancels exactly. Divide by $D=a_1b_2-a_2b_1$: > $$y=\frac{a_1c_2-a_2c_1}{a_1b_2-a_2b_1}.$$ > The numerator $a_1c_2-a_2c_1=\begin{vmatrix}a_1&c_1\\a_2&c_2\end{vmatrix}=D_y$: column 2 of $A$ > replaced by the constants. $\blacksquare$ > [!example] Q13. Consistency by hand vs Cramer > Show that $x + y = 2,\ 2x + 2y = 5$ is inconsistent (no solution) **two ways**: (a) by elimination, > (b) by Cramer's classification. Confirm the two verdicts agree. > [!recall]- Solution Q13 > **(a) Elimination.** Multiply eq.(1) by $2$: $2x+2y=4$. Compare to eq.(2): $2x+2y=5$. > Subtract: $0=1$, a contradiction → **no solution.** > **(b) Cramer.** $D=\begin{vmatrix}1&1\\2&2\end{vmatrix}=2-2=0$; > $D_x=\begin{vmatrix}2&1\\5&2\end{vmatrix}=4-5=-1\neq0.$ $D=0,\ D_x\neq0\Rightarrow$ **no solution.** > Both agree. See [[Consistency of linear systems]] for the general classification. > [!example] Q14. Build the geometry > Explain, using the "$D$ = signed area of the parallelogram formed by the coefficient rows" idea, why > the system $4x + 6y = c_1,\ 2x + 3y = c_2$ can *never* have a unique solution, for any $c_1,c_2$. > [!recall]- Solution Q14 > The coefficient rows are $(4,6)$ and $(2,3)$. Notice $(4,6)=2\cdot(2,3)$: they point the **same > direction** (row 1 is exactly twice row 2). Two arrows on the same line span a parallelogram of > **zero area**, so $D=0$ — confirmed: $D=(4)(3)-(6)(2)=12-12=0$. > Because $D=0$ regardless of $c_1,c_2$, the lines are **either identical or parallel**, never crossing > at a single point → **never a unique solution.** > Which of the two? Depends on the constants: $D_x=\begin{vmatrix}c_1&6\\c_2&3\end{vmatrix}=3c_1-6c_2 > =3(c_1-2c_2)$. If $c_1=2c_2$ ⇒ $D_x=0$ ⇒ infinitely many; else no solution. The picture: the > $D=0$ row-parallelism is what forbids a unique crossing. See [[Determinant of a 2×2 matrix]]. > [!mistake] L5 trap — "parallel rows still might cross for the right constants." > **Why it feels right:** changing $c_1,c_2$ shifts the lines, so it *seems* you could nudge them into > a single crossing. **The truth:** constants shift lines but **cannot change their slope**; parallel > lines stay parallel. $D$ depends only on coefficients, so once $D=0$ no constant can create a unique > solution — only choose between "no solution" and "infinitely many." **Fix:** remember $D$ ignores > the constants entirely. --- > [!recall]- Answer key (quick reference) > Q1 $D=26,D_x=30,D_y=-16$. Q2 $D_y=27$, correct. Q3 $x=\tfrac{14}{5},y=\tfrac95$. Q4 $x=\tfrac{23}{19},y=-\tfrac{7}{19}$. > Q5 $x=7,y=-2$. Q6 no solution. Q7 infinitely many. Q8 infinitely many. Q9 $k=6$ → no solution; > else unique. Q10 $x=\tfrac{3m-1}{5},y=\tfrac{2-m}{5}$, $x=y$ at $m=\tfrac34$. Q11 $a=2,b=3$, > infinitely many. Q12 proof. Q13 no solution (both methods). Q14 always $D=0$, never unique. ## Connections - [[Solving 2×2 systems using Cramer's rule]] — the parent this drill trains. - [[Determinant of a 2×2 matrix]] — the "diagonal down minus up" engine. - [[Consistency of linear systems]] — the classification behind L3 and Q13. - [[Matrix form of linear equations Ax=b]] — every system here as $A\mathbf{x}=\mathbf{c}$. - [[Inverse of a 2×2 matrix]] — same $1/D$ hidden inside. - [[Cramer's rule for 3×3 systems]] — next step up: three column swaps.