Systems, Matrices, and Determinants

Study Sheet

Systems, Matrices, and Determinants

Substitution, elimination, Gaussian elimination, matrix algebra, inverses, determinants, Cramer's Rule, partial fractions, and linear programming

Solving Systems by Substitution and Elimination

Concept
The idea

A solution of a system is an ordered pair (or triple) that satisfies every equation at once. Two main hand methods:

  • Substitution: solve one equation for a variable, then plug into the other. Best when a variable already has coefficient 11, or for nonlinear systems.
  • Elimination: add multiples of the equations to cancel a variable. Best for linear systems with awkward coefficients.

A linear system may have one solution (lines cross), no solution (parallel lines; you reach a false statement like 0=50=5), or infinitely many (same line; you reach a true statement like 0=00=0). A nonlinear system (line and circle, two conics, …) can have 0,1,2,0,1,2, or more solutions.

Every linear system can be written as the single equation Ax=bA\mathbf{x} = \mathbf{b}, which looks like ax=bax = b and is solved the same way: x=A−1b\mathbf{x} = A^{-1}\mathbf{b}, whenever the inverse exists. The alternatives are row reduction (fastest in practice) and Cramer's rule (slow, but it shows that every coordinate of the answer is a RATIO of determinants). Matrix multiplication is row-by-column and does not commute, so A−1bA^{-1}\mathbf{b} is not bA−1\mathbf{b}A^{-1}. The determinant measures how much the matrix scales area or volume, and a value of zero means space has been flattened — the same statement as "no inverse" and as "no unique solution".

Example
Elimination (linear)
xy−1123456−11234567(4, 2)
The solution is the one point on both lines.

Solve {3x+2y=162x−5y=−2\begin{cases} 3x+2y=16 \\ 2x-5y=-2 \end{cases}

Multiply eq. 1 by 55 and eq. 2 by 22 to cancel yy:

15x+10y=80,4x−10y=−4.15x+10y=80, \qquad 4x-10y=-4.

Add: 19x=76⇒x=419x=76 \Rightarrow x=4. Back-substitute into eq. 1: 12+2y=16⇒y=212+2y=16 \Rightarrow y=2.

Check: 2(4)−5(2)=8−10=−22(4)-5(2)=8-10=-2. ✓  Solution: (4,2)(4,2).

Side note
Where it goes wrong

Multiplying matrices entry by entry. The (i,j)(i, j) entry of ABAB is the dot product of row ii of AA with column jj of BB, and the inner dimensions must match.

Example
Substitution (nonlinear: line meets circle)
(3, 4)(−4, −3)
The line y=x+1y=x+1 cuts the circle of radius 55 in two points.

Solve {x2+y2=25y=x+1\begin{cases} x^2+y^2=25 \\ y=x+1 \end{cases}

Substitute y=x+1y=x+1: x2+(x+1)2=25⇒2x2+2x−24=0⇒x2+x−12=0x^2+(x+1)^2=25 \Rightarrow 2x^2+2x-24=0 \Rightarrow x^2+x-12=0.

Factor: (x+4)(x−3)=0⇒x=−4(x+4)(x-3)=0 \Rightarrow x=-4 or x=3x=3, giving y=−3y=-3 or y=4y=4.

Solutions: (−4,−3)(-4,-3) and (3,4)(3,4). Check (3,4)(3,4): 9+16=259+16=25. ✓

Tip

Tip: After finding a variable, always back-substitute into the original equation and verify both. For nonlinear systems, each xx must be paired with the yy from the equation you substituted into.

Try it
Quick check

By substitution: {y=2x−13x+y=9\begin{cases} y=2x-1 \\ 3x+y=9 \end{cases}

Work it on paper before revealing the answer.

Show the answer

Answer: (2,3)(2,3)

Three-Variable Linear Systems: Gaussian Elimination

Concept
Row-echelon form

Write the system as an augmented matrix and use elementary row operations to reach row-echelon form (leading 11's stepping to the right, zeros below), then back-substitute.

  • Swap two rows: Ri↔RjR_i \leftrightarrow R_j.
  • Scale a row: Ri→kRiR_i \to kR_i (k≠0k\neq 0).
  • Add a multiple of one row to another: Ri→Ri+kRjR_i \to R_i + kR_j.

Reduced row-echelon form additionally clears entries above each leading 11 (Gauss–Jordan).

Example
Full Gaussian elimination

Solve {x+y+z=62x−y+z=3x+2y−z=2\begin{cases} x+y+z=6 \\ 2x-y+z=3 \\ x+2y-z=2 \end{cases}

Augmented matrix, then eliminate below the first pivot with R2→R2−2R1R_2\to R_2-2R_1 and R3→R3−R1R_3\to R_3-R_1:

[11162−11312−12]  ⟶  [11160−3−1−901−2−4].\begin{bmatrix} 1 & 1 & 1 & 6 \\ 2 & -1 & 1 & 3 \\ 1 & 2 & -1 & 2 \end{bmatrix} \;\longrightarrow\; \begin{bmatrix} 1 & 1 & 1 & 6 \\ 0 & -3 & -1 & -9 \\ 0 & 1 & -2 & -4 \end{bmatrix}.

Swap R2↔R3R_2\leftrightarrow R_3, then R3→R3+3R2R_3\to R_3+3R_2:

[111601−2−400−7−21].\begin{bmatrix} 1 & 1 & 1 & 6 \\ 0 & 1 & -2 & -4 \\ 0 & 0 & -7 & -21 \end{bmatrix}.

Back-substitute: −7z=−21⇒z=3-7z=-21\Rightarrow z=3; y−2(3)=−4⇒y=2y-2(3)=-4\Rightarrow y=2; x+2+3=6⇒x=1x+2+3=6\Rightarrow x=1.

Check in eq. 2: 2(1)−2+3=32(1)-2+3=3. ✓  Solution: (1,2,3)(1,2,3).

Tip

Tip: A row of the form [ 0 0 0∣c ][\,0\ 0\ 0 \mid c\,] with c≠0c\neq 0 means no solution. A row [ 0 0 0∣0 ][\,0\ 0\ 0 \mid 0\,] means a free variable and infinitely many solutions.

Try it
Quick check

Solve x+y+z=2x+y+z=2,  2x−y+z=5\ 2x-y+z=5,  x+2y−z=−3\ x+2y-z=-3.

Show the answer

Answer: (1,−1,2)(1,-1,2). Eliminate xx: R2−2R1R_2-2R_1 gives −3y−z=1-3y-z=1 and R3−R1R_3-R_1 gives y−2z=−5y-2z=-5. From the second, y=2z−5y=2z-5; substitute: −3(2z−5)−z=1-3(2z-5)-z=1, so −7z=−14-7z=-14, z=2z=2, y=−1y=-1, and x=2−y−z=1x=2-y-z=1.

Matrices and Their Operations

Concept
Adding, scaling, multiplying

For matrices of the same size, add/subtract entrywise; scalar multiply multiplies every entry.

Matrix product ABAB is defined only when AA is m×nm\times n and BB is n×pn\times p (inner dimensions match); the result is m×pm\times p. Entry (i,j)(i,j) of ABAB is the dot product of row ii of AA with column jj of BB. In general AB≠BAAB\neq BA.

Example
Combined operations and a product

Let A=[120−1]A=\begin{bmatrix} 1 & 2 \\ 0 & -1 \end{bmatrix}, B=[31−24]B=\begin{bmatrix} 3 & 1 \\ -2 & 4 \end{bmatrix}.

2A−B=[240−2]−[31−24]=[−132−6]2A-B=\begin{bmatrix} 2 & 4 \\ 0 & -2 \end{bmatrix}-\begin{bmatrix} 3 & 1 \\ -2 & 4 \end{bmatrix}=\begin{bmatrix} -1 & 3 \\ 2 & -6 \end{bmatrix}.

AB=[1(3)+2(−2)1(1)+2(4)0(3)+(−1)(−2)0(1)+(−1)(4)]=[−192−4]AB=\begin{bmatrix} 1(3)+2(-2) & 1(1)+2(4) \\ 0(3)+(-1)(-2) & 0(1)+(-1)(4) \end{bmatrix}=\begin{bmatrix} -1 & 9 \\ 2 & -4 \end{bmatrix}.

Tip

Tip: Check dimensions before multiplying: (m×n)(n×p)=(m×p)(m\times n)(n\times p)=(m\times p). If the inner numbers differ, the product does not exist.

Try it
Quick check

With A=[2−103]A=\begin{bmatrix}2&-1\\0&3\end{bmatrix} and B=[142−2]B=\begin{bmatrix}1&4\\2&-2\end{bmatrix}, compute ABAB and BABA.

Show the answer

Answer: AB=[0106−6]AB=\begin{bmatrix}0&10\\6&-6\end{bmatrix}, BA=[2114−8]BA=\begin{bmatrix}2&11\\4&-8\end{bmatrix}. Each entry is a row of the left matrix dotted with a column of the right. The two products differ: matrix multiplication is not commutative.

The Inverse of a Matrix

Concept
Inverses

A−1A^{-1} satisfies AA−1=A−1A=IAA^{-1}=A^{-1}A=I. For a 2×22\times2 matrix

A=[abcd],A−1=1ad−bc[d−b−ca],A=\begin{bmatrix} a & b \\ c & d \end{bmatrix},\qquad A^{-1}=\frac{1}{ad-bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix},

provided det⁡A=ad−bc≠0\det A = ad-bc \neq 0. If det⁡A=0\det A=0 the matrix is singular (no inverse). To solve Ax=bA\mathbf{x}=\mathbf{b}, use x=A−1b\mathbf{x}=A^{-1}\mathbf{b}.

Example
Find a 2×22\times2 inverse and solve a system

Solve {2x+3y=7x+4y=6\begin{cases} 2x+3y=7 \\ x+4y=6 \end{cases} using an inverse.

Coefficient matrix A=[2314]A=\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}, det⁡A=2(4)−3(1)=5\det A=2(4)-3(1)=5.

A−1=15[4−3−12].A^{-1}=\frac{1}{5}\begin{bmatrix} 4 & -3 \\ -1 & 2 \end{bmatrix}.

Then x=A−1b=15[4−3−12][76]=15[28−18−7+12]=15[105]=[21]\mathbf{x}=A^{-1}\mathbf{b}=\frac{1}{5}\begin{bmatrix} 4 & -3 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 7 \\ 6 \end{bmatrix}=\frac{1}{5}\begin{bmatrix} 28-18 \\ -7+12 \end{bmatrix}=\frac{1}{5}\begin{bmatrix} 10 \\ 5 \end{bmatrix}=\begin{bmatrix} 2 \\ 1 \end{bmatrix}.

Check: 2(2)+3(1)=72(2)+3(1)=7 and 2+4(1)=62+4(1)=6. ✓  Solution (2,1)(2,1).

Tip

Tip: Verify an inverse cheaply by confirming AA−1=IAA^{-1}=I, or at least that det⁡A⋅det⁡(A−1)=1\det A \cdot \det(A^{-1})=1.

Try it
Quick check

Find the inverse of [3512]\begin{bmatrix}3&5\\1&2\end{bmatrix} and use it to solve 3x+5y=43x+5y=4, x+2y=1x+2y=1.

Show the answer

Answer: A−1=[2−5−13]A^{-1}=\begin{bmatrix}2&-5\\-1&3\end{bmatrix} and (x,y)=(3,−1)(x,y)=(3,-1). det⁡A=6−5=1\det A=6-5=1. Then A−1[41]=[8−5−4+3]A^{-1}\begin{bmatrix}4\\1\end{bmatrix}=\begin{bmatrix}8-5\\-4+3\end{bmatrix}. Check: 9−5=49-5=4 and 3−2=13-2=1.

Determinants and Cramer's Rule

Concept
Determinants

2×22\times2: det⁡[abcd]=ad−bc\det\begin{bmatrix} a & b \\ c & d \end{bmatrix}=ad-bc.

3×33\times3 (expansion along row 1):

det⁡[abcdefghi]=a(ei−fh)−b(di−fg)+c(dh−eg).\det\begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}=a(ei-fh)-b(di-fg)+c(dh-eg).

Cramer's Rule: for Ax=bA\mathbf{x}=\mathbf{b} with D=det⁡A≠0D=\det A\neq0, each variable is xk=Dk/Dx_k=D_k/D, where DkD_k replaces column kk of AA with b\mathbf{b}.

For a 2×22\times2 system, eliminating yy by hand gives (ad−bc)x=…(ad-bc)x=\dots, so the number ad−bcad-bc appears on its own; it is zero exactly when the two equations describe parallel (or identical) lines. Cramer's Rule is that elimination written once and for all: each unknown is a ratio of determinants, with the constants swapped into that unknown's column.

Example
3×33\times3 determinant and Cramer's Rule

Solve {x+y+z=62x−y+z=3x+2y−z=2\begin{cases} x+y+z=6 \\ 2x-y+z=3 \\ x+2y-z=2 \end{cases} for xx by Cramer.

D=det⁡[1112−1112−1]=1(1−2)−1(−2−1)+1(4+1)=−1+3+5=7D=\det\begin{bmatrix} 1&1&1\\2&-1&1\\1&2&-1\end{bmatrix}=1(1-2)-1(-2-1)+1(4+1)=-1+3+5=7.

Dx=det⁡[6113−1122−1]=6(1−2)−1(−3−2)+1(6+2)=−6+5+8=7D_x=\det\begin{bmatrix} 6&1&1\\3&-1&1\\2&2&-1\end{bmatrix}=6(1-2)-1(-3-2)+1(6+2)=-6+5+8=7.

So x=Dx/D=7/7=1x=D_x/D=7/7=1 (matching the Gaussian result above).

Tip

Tip: Remember the alternating + − ++\,-\,+ sign pattern across the top row. If D=0D=0, Cramer's Rule fails—the system has either no solution or infinitely many.

Try it
Quick check

Use Cramer's Rule to solve 2x−y=72x-y=7, x+3y=0x+3y=0.

Show the answer

Answer: (3,−1)(3,-1). D=2⋅3−(−1)⋅1=7D=2\cdot3-(-1)\cdot1=7, Dx=7⋅3−(−1)⋅0=21D_x=7\cdot3-(-1)\cdot0=21, Dy=2⋅0−7⋅1=−7D_y=2\cdot0-7\cdot1=-7. So x=217=3x=\tfrac{21}{7}=3 and y=−77=−1y=\tfrac{-7}{7}=-1.

Partial Fraction Decomposition

Concept
Breaking a rational function apart

For a proper fraction (numerator degree << denominator degree), factor the denominator and write one term per factor:

  • Distinct linear (ax+b)(ax+b): term Aax+b\dfrac{A}{ax+b}.
  • Repeated linear (ax+b)2(ax+b)^2: terms Aax+b+B(ax+b)2\dfrac{A}{ax+b}+\dfrac{B}{(ax+b)^2}.
  • Irreducible quadratic (ax2+bx+c)(ax^2+bx+c): term Ax+Bax2+bx+c\dfrac{Ax+B}{ax^2+bx+c}.

If improper, do polynomial division first. Solve for the constants by clearing denominators.

Example
Full partial-fraction decomposition

Decompose 5x−1x2−x−2\dfrac{5x-1}{x^2-x-2}.

Factor: x2−x−2=(x−2)(x+1)x^2-x-2=(x-2)(x+1). Write 5x−1(x−2)(x+1)=Ax−2+Bx+1\dfrac{5x-1}{(x-2)(x+1)}=\dfrac{A}{x-2}+\dfrac{B}{x+1}.

Clear: 5x−1=A(x+1)+B(x−2)5x-1=A(x+1)+B(x-2). Let x=2x=2: 9=3A⇒A=39=3A\Rightarrow A=3. Let x=−1x=-1: −6=−3B⇒B=2-6=-3B\Rightarrow B=2.

5x−1x2−x−2=3x−2+2x+1.\frac{5x-1}{x^2-x-2}=\frac{3}{x-2}+\frac{2}{x+1}.

Check: 3(x+1)+2(x−2)(x−2)(x+1)=5x−1(x−2)(x+1)\dfrac{3(x+1)+2(x-2)}{(x-2)(x+1)}=\dfrac{5x-1}{(x-2)(x+1)}. ✓

Tip

Tip: Substituting the roots of the factors instantly isolates constants. For repeated or quadratic factors, also compare coefficients of like powers.

Try it
Quick check

Decompose x+7x2−x−6\dfrac{x+7}{x^2-x-6}.

Show the answer

Answer: 2x−3−1x+2\dfrac{2}{x-3}-\dfrac{1}{x+2}. x2−x−6=(x−3)(x+2)x^2-x-6=(x-3)(x+2) and x+7=A(x+2)+B(x−3)x+7=A(x+2)+B(x-3). At x=3x=3: 10=5A10=5A, A=2A=2. At x=−2x=-2: 5=−5B5=-5B, B=−1B=-1.

Systems of Inequalities and Linear Programming

Concept
Feasible regions and optimization

Graph each inequality and shade the overlap—the feasible region. In linear programming you maximize or minimize a linear objective z=ax+byz=ax+by over that region. The optimum (if it exists) always occurs at a corner (vertex), so evaluate zz at every vertex and pick the best.

The level sets 3x+2y=z3x+2y=z are parallel lines, and increasing zz slides the line across the plane. The last point of the region the sliding line touches must be on the boundary, and because the boundary is made of straight edges, a line leaving a polygon leaves through a corner (or along a whole edge). So checking the corners is enough.

Example
Linear-programming optimization
xy(3, 1)(4, 0)(0, 2)
The feasible region; z=3x+2yz=3x+2y is largest at the corner (4,0)(4,0).

Maximize z=3x+2yz=3x+2y subject to x≥0, y≥0, x+y≤4, x+3y≤6x\ge0,\ y\ge0,\ x+y\le4,\ x+3y\le6.

Vertices: (0,0),(4,0),(3,1),(0,2)(0,0),(4,0),(3,1),(0,2). The lines cross at x+y=4, x+3y=6⇒y=1, x=3x+y=4,\ x+3y=6\Rightarrow y=1,\ x=3.

z(0,0)=0,z(4,0)=12,z(3,1)=11,z(0,2)=4.z(0,0)=0,\quad z(4,0)=12,\quad z(3,1)=11,\quad z(0,2)=4.

Maximum z=12z=12 at (4,0)(4,0).

Tip

Tip: Always list the vertices explicitly—including where two boundary lines intersect—then test each. A bounded feasible region guarantees both a max and a min exist.

Try it
Quick check

Maximize z=2x+5yz=2x+5y subject to x≥0x\ge0, y≥0y\ge0, x+y≤6x+y\le6, x+2y≤8x+2y\le8.

Show the answer

Answer: z=20z=20 at (0,4)(0,4). Corners: (0,0)(0,0), (6,0)(6,0), (4,2)(4,2) (where x+y=6x+y=6 meets x+2y=8x+2y=8), (0,4)(0,4). Values: 0, 12, 18, 200,\ 12,\ 18,\ 20.

The Matrix Form Ax=bA\mathbf{x} = \mathbf{b}

Concept
One equation, with matrices for numbers

Every linear system can be written Ax=bA\mathbf{x} = \mathbf{b}, where AA holds the coefficients, x\mathbf{x} the unknowns and b\mathbf{b} the constants. In that form the system looks like the one-variable equation ax=bax = b, and the solution looks like x=a−1bx = a^{-1}b — which is exactly right: x=A−1b\mathbf{x} = A^{-1}\mathbf{b} when A−1A^{-1} exists. The analogy is not a mnemonic; it is the reason the inverse is defined the way it is.

Tip
The 2×2 inverse

For A=[abcd]A = \begin{bmatrix} a & b \\ c & d\end{bmatrix} with det⁡A=ad−bc≠0\det A = ad - bc \ne 0,

A−1=1ad−bc[d−b−ca]A^{-1} = \dfrac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a\end{bmatrix}.

Swap the diagonal, negate the off-diagonal, divide by the determinant. The division is the only step that can fail, which is why det⁡A=0\det A = 0 and "no inverse" are the same statement.

Example
Worked: solve by inverting

Solve ;2x+y=5;2x + y = 5, ;3x+4y=10;3x + 4y = 10.

Step 1 — write it as a matrix equation. [2134][xy]=[510]\begin{bmatrix} 2 & 1 \\ 3 & 4\end{bmatrix}\begin{bmatrix} x \\ y\end{bmatrix} = \begin{bmatrix} 5 \\ 10\end{bmatrix}.

Step 2 — determinant. det⁡A=8−3=5≠0\det A = 8 - 3 = 5 \ne 0, so A−1A^{-1} exists.

Step 3 — invert. A−1=15[4−1−32]A^{-1} = \tfrac15\begin{bmatrix} 4 & -1 \\ -3 & 2\end{bmatrix}.

Step 4 — multiply. x=15[4(5)−1(10)−3(5)+2(10)]=15[105]=[21]\mathbf{x} = \tfrac15\begin{bmatrix} 4(5) - 1(10) \\ -3(5) + 2(10)\end{bmatrix} = \tfrac15\begin{bmatrix} 10 \\ 5\end{bmatrix} = \begin{bmatrix} 2 \\ 1\end{bmatrix}.

Answer. (2,1)(2, 1).

Check. 2(2)+1=52(2) + 1 = 5 ✓ and 3(2)+4(1)=103(2) + 4(1) = 10 ✓.

Side note
Order matters

A−1bA^{-1}\mathbf{b}, never bA−1\mathbf{b}A^{-1}. Matrix multiplication does not commute, and the second product is not even defined for these shapes.

Try it
Quick check

Write 4x−y=34x-y=3, 2x+3y=52x+3y=5 as Ax=bA\mathbf x=\mathbf b and solve it with A−1A^{-1}.

Show the answer

Answer: (x,y)=(1,1)(x,y)=(1,1). A=[4−123]A=\begin{bmatrix}4&-1\\2&3\end{bmatrix}, det⁡A=14\det A=14, A−1=114[31−24]A^{-1}=\tfrac1{14}\begin{bmatrix}3&1\\-2&4\end{bmatrix}. Then A−1[35]=114[1414]A^{-1}\begin{bmatrix}3\\5\end{bmatrix}=\tfrac1{14}\begin{bmatrix}14\\14\end{bmatrix}.

Systems With a Parameter

Concept
The question changes from "what" to "when"

Once a coefficient is a letter, "solve the system" splits into three questions: for which values of the parameter is there exactly one solution, for which is there none, and for which are there infinitely many? All three are answered by the determinant, because it is the only quantity the solution is divided by.

Example
Worked: find the values that break the system

For which kk does   kx+4y=8\;kx + 4y = 8,   x+ky=4  \;x + ky = 4\; fail to have exactly one solution, and what happens at each of them?

Step 1 — determinant. det⁡=k⋅k−4⋅1=k2−4\det = k\cdot k - 4\cdot 1 = k^2 - 4.

Step 2 — set it to zero. k2=4k^2 = 4, so k=2k = 2 or k=−2k = -2. For every other kk there is exactly one solution.

Step 3 — test k=2k = 2. The system is 2x+4y=82x + 4y = 8 and x+2y=4x + 2y = 4. The first is exactly twice the second — same line — so there are infinitely many solutions, every point of x+2y=4x + 2y = 4.

Step 4 — test k=−2k = -2. The system is −2x+4y=8-2x + 4y = 8 and x−2y=4x - 2y = 4. Multiplying the second by −2-2 gives −2x+4y=−8-2x + 4y = -8, which contradicts the first: parallel and distinct, so no solution.

The lesson. A zero determinant says only "not exactly one". Which of the other two cases you are in depends on the CONSTANTS, so each excluded value has to be tested on its own.

Example
Worked: solving in terms of the parameter

Solve ;kx+y=5;kx + y = 5, ;x+ky=3;;x + ky = 3; for xx and yy in terms of kk.

Step 1 — determinant. det⁡=k2−1\det = k^2 - 1.

Step 2 — Cramer. x=5k−3k2−1x = \dfrac{5k - 3}{k^2 - 1} and y=3k−5k2−1y = \dfrac{3k - 5}{k^2 - 1}.

Step 3 — the excluded values. k=1k = 1 and k=−1k = -1.

Check at a safe value. At k=2k = 2: x=73x = \tfrac{7}{3}, y=13y = \tfrac{1}{3}, and indeed 2(73)+13=52\left(\tfrac73\right) + \tfrac13 = 5 ✓ and 73+2(13)=3\tfrac73 + 2\left(\tfrac13\right) = 3 ✓.

Partial Fractions Are a System in Disguise

Concept
Why this belongs here

Splitting 5x−1(x−1)(x+2)\dfrac{5x - 1}{(x-1)(x+2)} into Ax−1+Bx+2\dfrac{A}{x-1} + \dfrac{B}{x+2} means finding numbers AA and BB that make two polynomials identical. Matching coefficients turns that into a linear system — so a technique you will use constantly in calculus is an application of this topic, not a separate trick.

Example
Worked: two distinct linear factors

Write 5x+1(x−1)(x+2)\dfrac{5x + 1}{(x-1)(x+2)} as a sum of two simpler fractions.

Step 1 — the form. 5x+1(x−1)(x+2)=Ax−1+Bx+2\dfrac{5x+1}{(x-1)(x+2)} = \dfrac{A}{x-1} + \dfrac{B}{x+2}.

Step 2 — clear denominators. 5x+1=A(x+2)+B(x−1)5x + 1 = A(x + 2) + B(x - 1).

Step 3 — match coefficients. The xx terms give A+B=5A + B = 5; the constants give 2A−B=12A - B = 1. That is a 2×22\times2 system.

Step 4 — solve it. Adding the two equations: 3A=63A = 6, so A=2A = 2 and B=3B = 3.

Answer. 5x+1(x−1)(x+2)=2x−1+3x+2\dfrac{5x+1}{(x-1)(x+2)} = \dfrac{2}{x-1} + \dfrac{3}{x+2}.

Check. 2(x+2)+3(x−1)=2x+4+3x−3=5x+12(x+2) + 3(x-1) = 2x + 4 + 3x - 3 = 5x + 1 ✓.

A faster route. Substituting the roots kills one unknown at a time: x=1x = 1 gives 6=3A6 = 3A, so A=2A = 2; x=−2x = -2 gives −9=−3B-9 = -3B, so B=3B = 3. Matching coefficients is the fallback for repeated or irreducible factors, where no substitution isolates a single unknown.

Going Deeper: Advanced Systems & Matrices

Concept
Matrix powers, recurrences, and the Cayley–Hamilton shortcut

Every square matrix satisfies its own characteristic equation. For a 2×22\times2 matrix AA with trace t=tr⁡A=a+dt=\operatorname{tr}A=a+d and determinant Δ=det⁡A\Delta=\det A, the Cayley–Hamilton theorem gives

A2−t A+Δ I=0⟺A2=t A−Δ I.A^2 - t\,A + \Delta\,I = \mathbf{0} \qquad\Longleftrightarrow\qquad A^2 = t\,A - \Delta\,I.

Two powerful consequences:

  • Reduce high powers: A2A^2 (and hence A3,A4,…A^3, A^4,\dots) is always a linear combination αA+βI\alpha A + \beta I. So An=cnA+dnIA^n = c_n A + d_n I for scalars found by a recurrence, never a full multiplication.
  • Instant inverse: rearrange to A(tI−A)=ΔIA\bigl(tI-A\bigr)=\Delta I, so if Δ≠0\Delta\neq0, @@BLOCK1@@

The scalar recurrence itself mirrors the matrix: if An=cnA+dnIA^n=c_nA+d_nI then An+1=cnA2+dnA=(tcn+dn)A−ΔcnIA^{n+1}=c_n A^2 + d_n A = (tc_n+d_n)A - \Delta c_n I, so cn+1=tcn+dnc_{n+1}=tc_n+d_n and dn+1=−Δcnd_{n+1}=-\Delta c_n.

Example
Worked: Cayley–Hamilton inverse and a reduced power

Let A=[2314]A=\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}, so t=6t=6 and Δ=2(4)−3(1)=5\Delta=2(4)-3(1)=5.

Inverse. A−1=15(6I−A)=15[6−2−3−16−4]=15[4−3−12]A^{-1}=\dfrac{1}{5}\bigl(6I-A\bigr)=\dfrac{1}{5}\begin{bmatrix} 6-2 & -3 \\ -1 & 6-4 \end{bmatrix}=\dfrac{1}{5}\begin{bmatrix} 4 & -3 \\ -1 & 2 \end{bmatrix}, matching the adjugate formula.

Power via recurrence. From A2=6A−5IA^2=6A-5I:

A3=A⋅A2=6A2−5A=6(6A−5I)−5A=31A−30I.A^3 = A\cdot A^2 = 6A^2-5A = 6(6A-5I)-5A = 31A-30I.

So A3=31[2314]−30[1001]=[32933194]A^3=31\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}-30\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}=\begin{bmatrix} 32 & 93 \\ 31 & 94 \end{bmatrix} — no repeated matrix multiplication needed.

Concept
Special determinant identities and singular conditions

Some determinants have closed forms worth memorizing:

  • Vandermonde: det⁡[1x1x121x2x221x3x32]=(x2−x1)(x3−x1)(x3−x2)\det\begin{bmatrix} 1 & x_1 & x_1^2 \\ 1 & x_2 & x_2^2 \\ 1 & x_3 & x_3^2 \end{bmatrix}=(x_2-x_1)(x_3-x_1)(x_3-x_2), i.e. the product of all differences xj−xix_j-x_i (i<ji<j).
  • Identity plus all-ones (I+aJI+aJ): if JJ is the n×nn\times n matrix of all 11's, then det⁡(I+aJ)=1+na\det(I+aJ)=1+na.
  • Block triangular: det⁡[AB0D]=det⁡A⋅det⁡D\det\begin{bmatrix} A & B \\ \mathbf{0} & D \end{bmatrix}=\det A\cdot\det D (the off-diagonal block BB does not matter).

Singular (det⁡=0\det=0) exactly when rows/columns are linearly dependent: one row is a scalar multiple of another, a row is a sum of others, or a row (or column) is all zeros. A singular matrix has no inverse, and Ax=bA\mathbf{x}=\mathbf{b} then has either no solution or infinitely many.

Example
Worked: three determinant identities

Vandermonde with x1=1, x2=2, x3=4x_1=1,\,x_2=2,\,x_3=4:

det⁡[1111241416]=(2−1)(4−1)(4−2)=1⋅3⋅2=6.\det\begin{bmatrix} 1 & 1 & 1 \\ 1 & 2 & 4 \\ 1 & 4 & 16 \end{bmatrix}=(2-1)(4-1)(4-2)=1\cdot3\cdot2=6.

I+2JI+2J, size 33: formula gives 1+3(2)=71+3(2)=7. Directly, I+2J=[322232223]I+2J=\begin{bmatrix} 3 & 2 & 2 \\ 2 & 3 & 2 \\ 2 & 2 & 3 \end{bmatrix}, and expanding confirms det⁡=7\det=7. ✓

Block triangular: det⁡[2599039900170004]=(2⋅3)(1⋅4)=24\det\begin{bmatrix} 2 & 5 & 9 & 9 \\ 0 & 3 & 9 & 9 \\ 0 & 0 & 1 & 7 \\ 0 & 0 & 0 & 4 \end{bmatrix}=(2\cdot3)(1\cdot4)=24 (product of the two 2×22\times2 diagonal blocks, which are themselves triangular).

Concept
Nonlinear systems: intersecting conics

When both equations are conics, eliminate the squared terms rather than a single variable. Add or subtract multiples so that x2x^2 (or y2y^2) cancels, leaving a simpler relation; substitute back. Two conics can meet in up to four points, so expect several ordered pairs and pair each recovered value with the correct sign from the equation you used.

Example
Worked: ellipse meets hyperbola
Four intersection points (±2,±1)(\pm2,\pm1).

Solve {x2+2y2=6x2−y2=3\begin{cases} x^2+2y^2=6 \\ x^2-y^2=3 \end{cases}

Subtract eq. 2 from eq. 1 to kill x2x^2: 3y2=3⇒y2=1⇒y=±13y^2=3\Rightarrow y^2=1\Rightarrow y=\pm1.

Substitute into eq. 2: x2−1=3⇒x2=4⇒x=±2x^2-1=3\Rightarrow x^2=4\Rightarrow x=\pm2.

Solutions (four): (2,1), (2,−1), (−2,1), (−2,−1)(2,1),\,(2,-1),\,(-2,1),\,(-2,-1). Check (2,1)(2,1): 4+2=64+2=6 and 4−1=34-1=3. ✓

Concept
Partial fractions with repeated and irreducible factors

Two cases beyond the distinct-linear setup demand extra terms:

  • Repeated linear (x−r)k(x-r)^k: include one term per power, A1x−r+A2(x−r)2+⋯+Ak(x−r)k\dfrac{A_1}{x-r}+\dfrac{A_2}{(x-r)^2}+\cdots+\dfrac{A_k}{(x-r)^k}.
  • Irreducible quadratic x2+bx+cx^2+bx+c (no real roots): use a linear numerator Bx+Cx2+bx+c\dfrac{Bx+C}{x^2+bx+c}.

Root-substitution alone will not find every constant here, so clear denominators and match coefficients of like powers of xx, giving a small linear system for the unknowns.

Example
Worked: an irreducible quadratic factor

Decompose 3x2+2x+1(x−1)(x2+1)=Ax−1+Bx+Cx2+1\dfrac{3x^2+2x+1}{(x-1)(x^2+1)}=\dfrac{A}{x-1}+\dfrac{Bx+C}{x^2+1}.

Clear denominators: 3x2+2x+1=A(x2+1)+(Bx+C)(x−1)3x^2+2x+1=A(x^2+1)+(Bx+C)(x-1).

Root shortcut, x=1x=1:   6=2A⇒A=3\;6=2A\Rightarrow A=3.

Match coefficients: x2 ⁣: 3=A+B⇒B=0x^2\!:\ 3=A+B\Rightarrow B=0; constant: 1=A−C⇒C=2:\ 1=A-C\Rightarrow C=2; check x1 ⁣: 2=−B+C=2x^1\!:\ 2=-B+C=2. ✓

3x2+2x+1(x−1)(x2+1)=3x−1+2x2+1.\frac{3x^2+2x+1}{(x-1)(x^2+1)}=\frac{3}{x-1}+\frac{2}{x^2+1}.
Concept
Linear programming: unbounded regions and an edge of optima

The corner principle assumes a bounded feasible region. Two degenerate cases:

  • Unbounded region: if the objective can grow without limit along an open direction, there is no maximum (though a minimum may still exist at a vertex, or vice versa). Always check whether the region is closed in the direction you are optimizing.
  • Edge of optima: when the objective line z=ax+byz=ax+by is parallel to a boundary edge, every point on that edge is optimal — infinitely many solutions, all giving the same zz. You detect this when two adjacent vertices tie for the best value.
Example
Worked: an unbounded feasible region

Consider x≥0, y≥0, x+y≥2x\ge0,\ y\ge0,\ x+y\ge2 (region opens outward to the upper right).

Maximize z=x+yz=x+y: moving farther from the origin increases zz without bound, so no maximum exists — the problem is unbounded.

Minimize z=x+yz=x+y over the same region: the constraint forces x+y≥2x+y\ge2, and every point of the edge from (2,0)(2,0) to (0,2)(0,2) gives z=2z=2. So the minimum is z=2z=2, attained along an entire edge (an edge of optima), not a single corner.

Why It Works

A 2×22\times2 matrix sends the unit square to a parallelogram whose area is ∣ad−bc∣|ad - bc| — the determinant — so det⁡A=0\det A = 0 means the parallelogram is flattened to a segment and the map cannot be undone: no inverse. The inverse formula 1ad−bc(d−b−ca)\tfrac{1}{ad - bc}\begin{pmatrix} d & -b\\ -c & a\end{pmatrix} can be checked by direct multiplication; the determinant in the denominator is exactly why it fails when ad−bc=0ad - bc = 0.

Tip
Reading a proof

Do not read a proof the way you read a rule. Cover the last line, ask what the previous line forces, and only then uncover it. If a step feels like magic, that is the step to work by hand with a concrete number.

Formulas, Proofs & Tips

Tip
Determinants and Cramer’s rule
det⁡[abcd]=ad−bc,x=det⁡Axdet⁡A,y=det⁡Aydet⁡A\det\begin{bmatrix} a & b \\ c & d\end{bmatrix}=ad-bc,\qquad x=\frac{\det A_x}{\det A},\quad y=\frac{\det A_y}{\det A}

What it means. The determinant measures how a matrix scales area; when it is 00 the system has no unique solution.

Example. det⁡[2314]=2⋅4−3⋅1=5\det\begin{bmatrix}2&3\\1&4\end{bmatrix}=2\cdot4-3\cdot1=5.

Why it works. Solving ax+by=e, cx+dy=fax+by=e,\ cx+dy=f by elimination gives x=ed−bfad−bcx=\tfrac{ed-bf}{ad-bc}, and the numerator is the determinant of AA with the xx-column replaced by the constants. A zero determinant means the two lines are parallel or identical.

Tip. Check det⁡A≠0\det A\neq 0 before dividing — that is precisely the test for a unique solution.