2.6.11Matrices & Determinants — Introduction
Solving 2×2 systems using Cramer's rule
1,653 words8 min readdifficulty · medium
WHAT are we solving?
HOW we derive Cramer's rule (from scratch — no memorizing)
We want alone. The trick of elimination: to kill , multiply the equations by numbers that make the -terms cancel.
Step 1 — Eliminate . Multiply eq.(1) by and eq.(2) by : Why this step? We chose the multipliers precisely so both -coefficients become — now they subtract away cleanly.
Step 2 — Subtract. Why this step? is gone; stands alone.
Step 3 — Solve for .
Now look at each piece — they are determinants:
c_1b_2 - c_2b_1 = \begin{vmatrix} c_1 & b_1 \\ c_2 & b_2 \end{vmatrix} \equiv D_x$$ Notice $D_x$ is just $A$ with its **first column replaced by $\mathbf{c}$**! **Step 4 — Same for $y$** (multiply eq.(1) by $a_2$, eq.(2) by $a_1$, subtract): $$(a_1b_2 - a_2b_1)\,y = a_1c_2 - a_2c_1 \;\Rightarrow\; y = \frac{a_1c_2 - a_2c_1}{a_1b_2 - a_2b_1}$$ and $a_1c_2 - a_2c_1 = \begin{vmatrix} a_1 & c_1 \\ a_2 & c_2 \end{vmatrix} \equiv D_y$ — column 2 replaced by $\mathbf{c}$. > [!formula] Cramer's Rule (2×2) > $$\boxed{\,x = \dfrac{D_x}{D}, \qquad y = \dfrac{D_y}{D}\,}$$ > $$D = \begin{vmatrix} a_1 & b_1 \\ a_2 & b_2 \end{vmatrix},\quad > 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}$$ > **Valid only when $D \neq 0$.** ![[2.6.11-Solving-2×2-systems-using-Cramer's-rule.png]] --- ## WHY does $D=0$ break everything? > [!intuition] Geometry of $D=0$ > Each equation is a **line**. The solution is where they cross. > - $D \neq 0$: lines meet at exactly **one point** → unique solution. > - $D = 0, D_x=D_y=0$: lines are **identical** → infinitely many solutions. > - $D = 0$, but $D_x$ or $D_y \neq 0$: lines are **parallel, distinct** → no solution. > > $D$ measures the "spread" between the two rows (the area of the parallelogram they form). If the > rows point the same direction, that area is $0$ — the system is degenerate. --- ## Worked examples > [!example] Example 1 — a clean unique solution > $$2x + 3y = 8, \qquad 4x - y = 6$$ > **Step 1: $D$.** $\;D=\begin{vmatrix}2&3\\4&-1\end{vmatrix}=(2)(-1)-(3)(4)=-2-12=-14.$ > *Why first?* If $D=0$ we'd stop — Cramer wouldn't apply. > **Step 2: $D_x$** (replace col 1 by $\begin{bmatrix}8\\6\end{bmatrix}$): > $D_x=\begin{vmatrix}8&3\\6&-1\end{vmatrix}=(8)(-1)-(3)(6)=-8-18=-26.$ > **Step 3: $D_y$** (replace col 2): > $D_y=\begin{vmatrix}2&8\\4&6\end{vmatrix}=(2)(6)-(8)(4)=12-32=-20.$ > **Step 4:** $x=\dfrac{-26}{-14}=\dfrac{13}{7},\quad y=\dfrac{-20}{-14}=\dfrac{10}{7}.$ > **Check:** $2(\tfrac{13}{7})+3(\tfrac{10}{7})=\tfrac{26+30}{7}=\tfrac{56}{7}=8.$ ✓ > [!example] Example 2 — no solution ($D=0$) > $$x + 2y = 3, \qquad 2x + 4y = 10$$ > $D=\begin{vmatrix}1&2\\2&4\end{vmatrix}=4-4=0.$ Cramer can't give a value. > Test $D_x=\begin{vmatrix}3&2\\10&4\end{vmatrix}=12-20=-8\neq0.$ > Since $D=0$ but $D_x\neq0$: **no solution** (parallel distinct lines: second line is $x+2y=5$, contradicting $x+2y=3$). > [!example] Example 3 — infinitely many ($D=0$) > $$x + 2y = 3, \qquad 2x + 4y = 6$$ > $D=0$ again. $D_x=\begin{vmatrix}3&2\\6&4\end{vmatrix}=12-12=0,\;D_y=\begin{vmatrix}1&3\\2&6\end{vmatrix}=6-6=0.$ > All zero → **infinitely many solutions** (same line). Solve one: $x=3-2y$, $y$ free. --- ## Forecast-then-Verify drill > [!recall] Predict *before* computing > For $3x - y = 5,\; x + 2y = 4$: guess whether $D$ is positive or negative, then compute. > *Verify:* $D=(3)(2)-(-1)(1)=6+1=7>0$. Unique solution: $D_x=\begin{vmatrix}5&-1\\4&2\end{vmatrix}=10+4=14$, $D_y=\begin{vmatrix}3&5\\1&4\end{vmatrix}=12-5=7$. So $x=14/7=2,\ y=7/7=1$. --- ## Common mistakes (Steel-manned) > [!mistake] "I replace the row, not the column." > **Why it feels right:** equations are written in *rows*, so replacing a row feels natural. > **The truth:** each *variable owns a column* of coefficients. $D_x$ replaces column 1 because > $x$'s coefficients live in column 1. **Fix:** whisper "variable = column." > [!mistake] "$D=0$ just means $x=0$." > **Why it feels right:** dividing usually gives smaller numbers, so $0$ feels like a value. > **The truth:** $D=0$ makes $D_x/D$ *undefined*, not zero. It signals no unique solution — investigate $D_x,D_y$. **Fix:** always compute $D$ first and stop if it's $0$. > [!mistake] Sign slip in the determinant. > **Why it feels right:** $a_1b_2 - a_2b_1$ has a minus that's easy to drop. > **Fix:** always "main-diagonal product **minus** anti-diagonal product," in that order. --- ## #flashcards/maths Cramer's rule formula for $x$ and $y$ ::: $x=D_x/D,\ y=D_y/D$ where $D$ is the coefficient determinant. How do you build $D_x$? ::: Replace column 1 (the $x$-coefficients) of $A$ with the constant column $\mathbf{c}$. How do you build $D_y$? ::: Replace column 2 (the $y$-coefficients) of $A$ with the constant column $\mathbf{c}$. What is $D$ for $a_1x+b_1y=c_1,\ a_2x+b_2y=c_2$? ::: $a_1b_2-a_2b_1$. When is Cramer's rule valid? ::: Only when $D\neq0$ (unique solution / lines intersect once). $D=0$ and $D_x\neq0$ means? ::: No solution — parallel distinct lines. $D=D_x=D_y=0$ means? ::: Infinitely many solutions — the two equations are the same line. Geometric meaning of $D$? ::: Signed area spanned by the coefficient rows; $0$ means rows are parallel/degenerate. Why does replacing a column give the numerator? ::: Elimination produces $c_1b_2-c_2b_1$, which is exactly $A$ with the target variable's column swapped for $\mathbf{c}$. > [!recall]- Feynman: explain to a 12-year-old > Imagine two friends each telling you a rule about two secret numbers. To find the first secret > number, you cover up its "spot" and slide in the answer numbers, then do a little criss-cross math > ($\times$ then subtract) on both the covered board and the original board. Divide the two results — > that's your first number! Do the same for the second number. If the "original board" math gives > zero, the two friends' rules are secretly the same line or never meet, so there's no single answer. > [!mnemonic] Remember it > **"D on the bottom, column swap on top."** > $x$ → swap the **1st** column, $y$ → swap the **2nd**. Determinant = **diagonal down minus diagonal up.** --- ## Connections - [[Determinant of a 2×2 matrix]] — the engine $D$ used here. - [[Matrix form of linear equations Ax=b]] — Cramer solves this without inverting $A$. - [[Inverse of a 2×2 matrix]] — $x = A^{-1}c$ hides the same $1/D$ factor. - [[Consistency of linear systems]] — the $D=0$ cases classified here. - [[Cramer's rule for 3×3 systems]] — same idea, three column swaps. ## 🖼️ Concept Map ```mermaid flowchart TD SYS[2x2 linear system Ax=c] -->|written as| COEF[Coefficient matrix A] SYS -->|solved via| ELIM[Eliminate y by subtraction] ELIM -->|yields| XFORM[x = ratio of two determinants] XFORM -->|generalized to| CRAMER[Cramer's Rule] COEF -->|determinant of A| D[D main determinant] D -->|replace col 1 with c| DX[Dx] D -->|replace col 2 with c| DY[Dy] CRAMER -->|x equals| DX CRAMER -->|y equals| DY CRAMER -->|requires| VALID[D not equal 0] D -->|measures| GEOM[Area between rows / line spread] GEOM -->|D=0 same lines| INF[Infinite solutions] GEOM -->|D=0 parallel| NONE[No solution] GEOM -->|D not 0| UNIQUE[Unique solution] ``` ## 🔊 Hinglish (regional understanding) > [!intuition]- Hinglish mein samjho > Dekho, Cramer's rule ka core idea simple hai: do equations mein do unknowns ($x$ aur $y$) fase hue > hain, aur hum inhe alag-alag nikaalna chahte hain sirf **determinants** ki madad se. Pehle > coefficient matrix ka determinant nikalo — usse bolte hain $D$ (main diagonal ka product minus > anti-diagonal ka product). Yeh $D$ neeche denominator mein baithta hai dono answers ke liye. > > Ab $x$ nikaalne ke liye ek chhota sa trick: coefficient matrix ki **pehli column** (jo $x$ ke > coefficients hain) uthaao aur uski jagah constant wali column ($c_1, c_2$) daal do — yeh ban gaya > $D_x$. Similarly $y$ ke liye **doosri column** replace karke $D_y$ banao. Phir $x = D_x/D$ aur > $y = D_y/D$. Bas ho gaya, koi substitution ki jhanjhat nahi! Yaad rakho: **variable = column** — > $x$ ki jagah column 1, $y$ ki jagah column 2. > > Sabse important warning: agar $D=0$ ho, toh Cramer's rule kaam nahi karta, kyunki zero se divide > nahi hota. Geometrically, har equation ek **line** hai. $D \neq 0$ matlab lines ek point pe milti > hain — unique answer. $D=0$ ho lekin $D_x$ ya $D_y$ non-zero — lines parallel hain, koi solution > nahi. Aur agar teeno ($D, D_x, D_y$) zero — dono ek hi line hain, infinite solutions. Exam mein > pehle hamesha $D$ check karo, tabhi aage badho. Yeh method fast hai aur sign mistakes chhod do toh > almost error-free. ![[audio/2.6.11-Solving-2×2-systems-using-Cramer's-rule.mp3]]