Skip to content

4.P — Worked Problems: Linear Algebra

Twelve problems, each worked out entry by entry. Every formula used is derived in the chapter that introduces it.

Problem 1 — Vectors: angle, projection and the perpendicular part

Given \mathbf{u} = (3, 4, 0) and \mathbf{v} = (1, 2, 2), find the angle between them, the projection of \mathbf{v} onto \mathbf{u}, and the part of \mathbf{v} perpendicular to \mathbf{u}.

Solution

Step 1 — the dot product.

\mathbf{u}\cdot\mathbf{v} = (3)(1) + (4)(2) + (0)(2) = 3 + 8 + 0 = 11

Step 2 — the two lengths.

\|\mathbf{u}\| = \sqrt{9+16+0} = \sqrt{25} = 5, \qquad \|\mathbf{v}\| = \sqrt{1+4+4} = \sqrt9 = 3

Step 3 — the angle.

\cos\theta = \frac{\mathbf{u}\cdot\mathbf{v}}{\|\mathbf{u}\|\|\mathbf{v}\|} = \frac{11}{5\times3} = \frac{11}{15} = 0.7333

\theta = \arccos(0.7333) = 42.83°

Step 4 — the projection.

\text{proj}_{\mathbf{u}}\mathbf{v} = \frac{\mathbf{u}\cdot\mathbf{v}}{\|\mathbf{u}\|^2}\mathbf{u} = \frac{11}{25}(3,4,0) = \left(\frac{33}{25}, \frac{44}{25}, 0\right) = (1.32,\ 1.76,\ 0)

Step 5 — the perpendicular part is whatever is left over:

\mathbf{v} - \text{proj}_{\mathbf{u}}\mathbf{v} = (1 - 1.32,\ 2 - 1.76,\ 2 - 0) = (-0.32,\ 0.24,\ 2)

Step 6 — check that it really is perpendicular, which is the whole point of the construction:

(3)(-0.32) + (4)(0.24) + (0)(2) = -0.96 + 0.96 + 0 = 0 \; ✓

Answers: 42.83°; projection (1.32, 1.76, 0); perpendicular part (-0.32, 0.24, 2).

What to notice. Splitting a vector into "the part along \mathbf{u}" and "the part perpendicular to \mathbf{u}" is the single most reused move in the subject. It is what least squares does with data, what Gram–Schmidt does repeatedly, and what a physics problem does when it resolves a force into components along and across a slope.

Problem 2 — Reading a matrix as a picture

Describe geometrically what A = \begin{pmatrix} 0 & -1 \\ 1 & 0\end{pmatrix} does, then find A^2, A^3, A^4 and explain the pattern.

Solution

Step 1 — look at the columns. The first column is where \hat{\imath} = (1,0) lands: at (0,1), which is straight up. The second column is where \hat{\jmath} = (0,1) lands: at (-1,0), which is to the left.

East becomes north; north becomes west. This is a 90° anticlockwise rotation.

Step 2 — confirm against the general rotation matrix. With \theta = 90°, \cos90° = 0 and \sin90° = 1:

\begin{pmatrix}\cos\theta & -\sin\theta\\ \sin\theta&\cos\theta\end{pmatrix} = \begin{pmatrix}0&-1\\1&0\end{pmatrix} \; ✓

Step 3 — the powers, by multiplication.

A^2 = \begin{pmatrix}0&-1\\1&0\end{pmatrix}\begin{pmatrix}0&-1\\1&0\end{pmatrix}

Entry (1,1) is row 1 of the first times column 1 of the second: (0)(0) + (-1)(1) = -1. Entry (1,2): (0)(-1) + (-1)(0) = 0. Entry (2,1): (1)(0) + (0)(1) = 0. Entry (2,2): (1)(-1) + (0)(0) = -1.

A^2 = \begin{pmatrix}-1&0\\0&-1\end{pmatrix} = -I

Step 4 — the rest follow instantly.

A^3 = A^2 \cdot A = -I\cdot A = -A = \begin{pmatrix}0&1\\-1&0\end{pmatrix}, \qquad A^4 = (A^2)^2 = (-I)^2 = I

Answers: a 90° anticlockwise rotation; A^2 = -I, A^3 = -A, A^4 = I.

The pattern, and why it should look familiar. Four quarter-turns make a full turn, which is doing nothing — hence A^4 = I. And A^2 = -I says: an object that squares to minus one. That is exactly the defining property of i from 2.5. Multiplying by i is rotating by 90°, and this matrix is what that statement looks like in coordinates. The complex numbers and the rotation matrices are the same structure written two ways.

Problem 3 — Solving a system by elimination

Solve

\begin{cases} x + 2y + z = 8 \\ 2x + y - z = 1 \\ 3x - y + 2z = 7\end{cases}

Solution

Step 1 — write the augmented matrix, coefficients on the left and right-hand sides on the right:

\left(\begin{array}{ccc|c} 1&2&1&8\\ 2&1&-1&1\\ 3&-1&2&7\end{array}\right)

Step 2 — clear the first column below the leading 1.

Row 2 minus 2×Row 1: (2-2,\ 1-4,\ -1-2\ |\ 1-16) = (0,\ -3,\ -3\ |\ -15)

Row 3 minus 3×Row 1: (3-3,\ -1-6,\ 2-3\ |\ 7-24) = (0,\ -7,\ -1\ |\ -17)

\left(\begin{array}{ccc|c} 1&2&1&8\\ 0&-3&-3&-15\\ 0&-7&-1&-17\end{array}\right)

Step 3 — tidy Row 2 by dividing by -3, which keeps the numbers small:

(0,\ 1,\ 1\ |\ 5)

Step 4 — clear the second column below it. Row 3 plus 7×Row 2:

(0,\ -7+7,\ -1+7\ |\ -17+35) = (0,\ 0,\ 6\ |\ 18)

\left(\begin{array}{ccc|c} 1&2&1&8\\ 0&1&1&5\\ 0&0&6&18\end{array}\right)

Step 5 — back-substitute, from the bottom up.

Row 3 says 6z = 18, so z = 3.

Row 2 says y + z = 5, so y = 5 - 3 = 2.

Row 1 says x + 2y + z = 8, so x = 8 - 4 - 3 = 1.

Answer: x=1, y=2, z=3.

Check in all three original equations, not one:

  • 1 + 4 + 3 = 8
  • 2 + 2 - 3 = 1
  • 3 - 2 + 6 = 7

What to notice. Every operation used — subtracting a multiple of one row from another, dividing a row by a number — is reversible, which is why the solution set never changed. That is the entire justification for elimination, and it is why the method is safe on a system of ten thousand equations just as much as on three.

Problem 4 — Determinant and inverse of a 2×2

For A = \begin{pmatrix}4 & 7\\ 2 & 6\end{pmatrix}, find \det A and A^{-1}, then use the inverse to solve A\mathbf{x} = \begin{pmatrix}1\\ 2\end{pmatrix}.

Solution

Step 1 — the determinant.

\det A = (4)(6) - (7)(2) = 24 - 14 = 10

Non-zero, so an inverse exists, and areas are multiplied by 10 with no flip.

Step 2 — the inverse. Swap the two diagonal entries, negate the other two, divide by the determinant:

A^{-1} = \frac{1}{10}\begin{pmatrix}6 & -7\\ -2 & 4\end{pmatrix} = \begin{pmatrix}0.6 & -0.7\\ -0.2 & 0.4\end{pmatrix}

Step 3 — check by multiplying. This takes ten seconds and catches every sign error:

\begin{pmatrix}4&7\\2&6\end{pmatrix}\begin{pmatrix}0.6&-0.7\\-0.2&0.4\end{pmatrix} = \begin{pmatrix} 2.4-1.4 & -2.8+2.8\\ 1.2-1.2 & -1.4+2.4\end{pmatrix} = \begin{pmatrix}1&0\\0&1\end{pmatrix} \; ✓

Step 4 — solve the system.

\mathbf{x} = A^{-1}\mathbf{b} = \begin{pmatrix}0.6&-0.7\\-0.2&0.4\end{pmatrix}\begin{pmatrix}1\\2\end{pmatrix} = \begin{pmatrix}0.6 - 1.4\\ -0.2+0.8\end{pmatrix} = \begin{pmatrix}-0.8\\ 0.6\end{pmatrix}

Answer: \det A = 10, and x = -0.8, y = 0.6.

Check in the original equations: 4(-0.8)+7(0.6) = -3.2+4.2 = 1 ✓ and 2(-0.8)+6(0.6) = -1.6+3.6 = 2

The practical caveat. This works fine for a 2\times2. For anything larger, computing the inverse and then multiplying is both slower and less accurate than elimination. Software solves A\mathbf{x}=\mathbf{b} directly; seeing inv(A) * b in real code is almost always a mistake.

Problem 5 — A 3×3 determinant, expanded cleverly

Find \det\begin{pmatrix} 2 & 0 & 1\\ 3 & -1 & 4\\ 5 & 0 & -2\end{pmatrix}.

Solution

Step 1 — pick the row or column with the most zeros. The middle column is (0, -1, 0) — two zeros, so two of the three terms vanish before we start. Expanding along it turns a nine-multiplication job into a two-multiplication one.

Step 2 — get the sign right. The sign pattern for a 3×3 is

\begin{pmatrix}+&-&+\\ -&+&-\\ +&-&+\end{pmatrix}

The only non-zero entry in the middle column is -1 at position (2,2), which carries a +.

Step 3 — expand. Delete row 2 and column 2, and take the determinant of what is left:

\det A = +(-1)\times\det\begin{pmatrix}2 & 1\\ 5 & -2\end{pmatrix}

= (-1)\big[(2)(-2) - (1)(5)\big] = (-1)(-4-5) = (-1)(-9) = 9

Answer: \det A = 9.

Check by expanding along the first row instead, which should give the same number:

2\det\begin{pmatrix}-1&4\\0&-2\end{pmatrix} - 0\det(\ldots) + 1\det\begin{pmatrix}3&-1\\5&0\end{pmatrix}

= 2(2 - 0) - 0 + 1(0+5) = 4 + 5 = 9 \; ✓

What it means. The transformation multiplies volumes by 9 and does not flip orientation, since the sign is positive.

Problem 6 — Eigenvalues and eigenvectors by hand

Find the eigenvalues and eigenvectors of A = \begin{pmatrix}4 & 1\\ 2 & 3\end{pmatrix}.

Solution

Step 1 — write the characteristic equation.

\det(A - \lambda I) = \det\begin{pmatrix}4-\lambda & 1\\ 2 & 3-\lambda\end{pmatrix} = 0

Step 2 — expand it.

(4-\lambda)(3-\lambda) - (1)(2) = 0

12 - 4\lambda - 3\lambda + \lambda^2 - 2 = 0

\lambda^2 - 7\lambda + 10 = 0

Notice the coefficients: 7 is the trace (4+3) and 10 is the determinant (12-2), exactly as §6 of 4.5 — eigenvalues promised.

Step 3 — solve.

(\lambda-5)(\lambda-2) = 0 \quad \Rightarrow \quad \lambda_1 = 5, \quad \lambda_2 = 2

Check immediately: the eigenvalues should sum to the trace (5+2 = 7 ✓) and multiply to the determinant (5\times2 = 10 ✓).

Step 4 — the eigenvector for \lambda = 5. Solve (A - 5I)\mathbf{v} = \mathbf{0}:

\begin{pmatrix}4-5 & 1\\ 2 & 3-5\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}-1 & 1\\ 2 & -2\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}0\\0\end{pmatrix}

The first row says -x + y = 0, so y = x. The second row says 2x - 2y = 0, which is the same statement doubled — and that redundancy is expected. If the two rows had said different things, the only solution would be zero and \lambda would not have been an eigenvalue at all.

Take x = 1:

\mathbf{v}_1 = \begin{pmatrix}1\\1\end{pmatrix}

Step 5 — the eigenvector for \lambda = 2.

\begin{pmatrix}2 & 1\\ 2& 1\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}0\\0\end{pmatrix}

Both rows say 2x + y = 0, so y = -2x. Take x = 1:

\mathbf{v}_2 = \begin{pmatrix}1\\-2\end{pmatrix}

Answers: \lambda_1 = 5 with \mathbf{v}_1 = (1,1); \lambda_2 = 2 with \mathbf{v}_2 = (1,-2).

Verify both.

A\begin{pmatrix}1\\1\end{pmatrix} = \begin{pmatrix}4+1\\2+3\end{pmatrix} = \begin{pmatrix}5\\5\end{pmatrix} = 5\begin{pmatrix}1\\1\end{pmatrix} \; ✓

A\begin{pmatrix}1\\-2\end{pmatrix} = \begin{pmatrix}4-2\\2-6\end{pmatrix} = \begin{pmatrix}2\\-4\end{pmatrix} = 2\begin{pmatrix}1\\-2\end{pmatrix} \; ✓

Any multiple of these vectors works equally well; (3,3) is just as valid an eigenvector as (1,1).

Problem 7 — Using diagonalisation to compute a large power

Using the matrix from Problem 6, compute A^{10} without doing nine matrix multiplications.

Solution

Step 1 — assemble P and D. The eigenvectors become the columns of P, in the same order as their eigenvalues appear in D:

P = \begin{pmatrix}1 & 1\\ 1 & -2\end{pmatrix}, \qquad D = \begin{pmatrix}5&0\\0&2\end{pmatrix}

Step 2 — invert P.

\det P = (1)(-2) - (1)(1) = -3

P^{-1} = \frac{1}{-3}\begin{pmatrix}-2 & -1\\ -1 & 1\end{pmatrix} = \frac13\begin{pmatrix}2&1\\1&-1\end{pmatrix}

Step 3 — use A^{k} = PD^kP^{-1}. The middle factor is easy because a diagonal matrix raised to a power just raises each diagonal entry:

D^{10} = \begin{pmatrix}5^{10} & 0\\ 0 & 2^{10}\end{pmatrix} = \begin{pmatrix}9765625 & 0\\ 0 & 1024\end{pmatrix}

Step 4 — multiply out. First PD^{10}:

\begin{pmatrix}1&1\\1&-2\end{pmatrix}\begin{pmatrix}9765625&0\\0&1024\end{pmatrix} = \begin{pmatrix}9765625 & 1024\\ 9765625 & -2048\end{pmatrix}

Then multiply by P^{-1} = \frac13\begin{pmatrix}2&1\\1&-1\end{pmatrix}:

Entry (1,1): \frac13\left[9765625(2) + 1024(1)\right] = \frac{19532274}{3} = 6510758

Entry (1,2): \frac13\left[9765625(1) + 1024(-1)\right] = \frac{9764601}{3} = 3254867

Entry (2,1): \frac13\left[9765625(2) + (-2048)(1)\right] = \frac{19529202}{3} = 6509734

Entry (2,2): \frac13\left[9765625(1) + (-2048)(-1)\right] = \frac{9767673}{3} = 3255891

A^{10} = \begin{pmatrix}6510758 & 3254867\\ 6509734 & 3255891\end{pmatrix}

Check with the determinant rule: \det(A^{10}) should equal (\det A)^{10} = 10^{10}. And by the eigenvalue rule, \det(A^{10}) = 5^{10}\times2^{10} = 10^{10}

What to notice. The entries are dominated by 5^{10}; the 2^{10} contribution is a thousand times smaller and shrinking with every further power. The largest eigenvalue takes over. That single observation is why a population settles into a fixed age distribution, why a Markov chain has a steady state, and why the power method finds the dominant eigenvector by nothing more than multiplying repeatedly — which, in a version with billions of rows, is how PageRank ranked the web.

Problem 8 — When a system has no unique answer

For which value of k does \begin{cases}2x + 3y = 7 \\ 4x + ky = 14\end{cases} fail to have a single solution? Describe what happens then.

Solution

Step 1 — a unique solution exists exactly when the determinant is non-zero.

\det\begin{pmatrix}2&3\\4&k\end{pmatrix} = 2k - 12

Step 2 — find where that vanishes.

2k - 12 = 0 \quad \Rightarrow \quad k = 6

Step 3 — see what actually happens at k=6. The system becomes

2x+3y = 7, \qquad 4x+6y = 14

The second equation is exactly twice the first. It is not a new constraint; it is the same line stated again. So instead of two lines crossing at a point, there is one line, and every point on it is a solution — infinitely many, described by y = \frac{7-2x}{3} for any x.

Step 4 — the near miss worth seeing. Suppose the second equation had been 4x+6y = 15 instead. The determinant is still zero, but now the equations say 2x+3y = 7 and 2x+3y = 7.5 — the same quantity equal to two different numbers. No solutions at all. Geometrically the lines are parallel and never meet.

Answer: k = 6. With the right-hand side 14 the system has infinitely many solutions; change that number and it has none.

What to notice. A zero determinant does not tell you which of the two failures you have. It tells you the transformation crushed the plane onto a line, and then everything depends on whether the target \mathbf{b} happens to lie on that line. This is the geometric meaning of the rank comparison in 4.1 — vectors §5.

Problem 9 — Fitting a straight line to data

Fit the least-squares line y = mx+c to the points (1,2), (2,3), (3,5), (4,6).

Solution

Step 1 — assemble the sums. With n = 4:

\sum x_i = 1+2+3+4 = 10

\sum y_i = 2+3+5+6 = 16

\sum x_iy_i = (1)(2)+(2)(3)+(3)(5)+(4)(6) = 2+6+15+24 = 47

\sum x_i^2 = 1+4+9+16 = 30

Step 2 — the gradient.

m = \frac{n\sum x_iy_i - \sum x_i\sum y_i}{n\sum x_i^2 - \left(\sum x_i\right)^2} = \frac{4(47) - (10)(16)}{4(30) - 100} = \frac{188-160}{120-100} = \frac{28}{20} = 1.4

Step 3 — the intercept.

c = \frac{\sum y_i - m\sum x_i}{n} = \frac{16 - 1.4(10)}{4} = \frac{16-14}{4} = 0.5

Answer: y = 1.4x + 0.5.

Step 4 — see how well it fits, by computing the residual at each point:

xactual ypredictedresidual
121.9+0.1
233.3-0.3
354.7+0.3
466.1-0.1

The residuals sum to zero, which is not luck: the least-squares conditions force it whenever the model contains an intercept term. The sum of their squares is 0.01+0.09+0.09+0.01 = 0.20, and no other straight line achieves a smaller value.

Where the formula came from. It is A^TA\hat{\mathbf{x}} = A^T\mathbf{b} with A holding a column of x's and a column of 1's. Writing out those two equations and solving them produces exactly the two expressions used above. The geometry underneath is the projection of Problem 1: the vector of observed y's cannot be reached by any straight line, so we take the closest reachable point, and closest means the residual vector is perpendicular to both columns of A.

Problem 10 — The cross product doing geometry

Find the area of the triangle with vertices A(1,0,2), B(3,2,1) and C(2,4,3), and a vector perpendicular to its plane.

Solution

Step 1 — build two edge vectors from the same corner.

\overrightarrow{AB} = B - A = (3-1,\ 2-0,\ 1-2) = (2, 2, -1)

\overrightarrow{AC} = C - A = (2-1,\ 4-0,\ 3-2) = (1, 4, 1)

Step 2 — take the cross product, component by component:

\overrightarrow{AB}\times\overrightarrow{AC} = \begin{pmatrix} (2)(1) - (-1)(4) \\ (-1)(1) - (2)(1) \\ (2)(4) - (2)(1)\end{pmatrix} = \begin{pmatrix} 2+4 \\ -1-2 \\ 8-2 \end{pmatrix} = \begin{pmatrix}6\\ -3\\ 6\end{pmatrix}

Step 3 — check it really is perpendicular to both, which catches any arithmetic slip:

(6)(2) + (-3)(2) + (6)(-1) = 12 - 6 - 6 = 0 \; ✓

(6)(1) + (-3)(4) + (6)(1) = 6 - 12 + 6 = 0 \; ✓

Step 4 — its length is the parallelogram's area.

\left\|\overrightarrow{AB}\times\overrightarrow{AC}\right\| = \sqrt{36+9+36} = \sqrt{81} = 9

Step 5 — the triangle is half of the parallelogram.

\text{Area} = \frac92 = 4.5

Answers: area 4.5 square units; (6,-3,6) — or any multiple, such as the tidier (2,-1,2) — is perpendicular to the plane.

Where this is used. Every surface in every 3D model carries a normal vector computed exactly this way, from two edges of a triangle. The lighting calculation then takes the dot product of that normal with the direction to the light, which is why a face turned away from a lamp comes out dark: the dot product goes negative.

Problem 11 — Gram–Schmidt in full

Turn \mathbf{v}_1 = (1,1,0) and \mathbf{v}_2 = (1,0,1) into an orthonormal pair.

Solution

Step 1 — normalise the first vector, and keep its direction.

\|\mathbf{v}_1\| = \sqrt{1+1+0} = \sqrt2

\mathbf{q}_1 = \frac{1}{\sqrt2}(1,1,0) = (0.7071,\ 0.7071,\ 0)

Step 2 — remove from \mathbf{v}_2 the part that points along \mathbf{q}_1. First the dot product:

\mathbf{v}_2\cdot\mathbf{q}_1 = (1)(0.7071)+(0)(0.7071)+(1)(0) = 0.7071

The part of \mathbf{v}_2 pointing along \mathbf{q}_1 is therefore 0.7071\,\mathbf{q}_1 = (0.5, 0.5, 0).

\mathbf{w}_2 = \mathbf{v}_2 - (0.5, 0.5, 0) = (0.5,\ -0.5,\ 1)

Step 3 — check the leftover is perpendicular to \mathbf{q}_1.

(0.5)(0.7071) + (-0.5)(0.7071) + (1)(0) = 0 \; ✓

Step 4 — normalise it.

\|\mathbf{w}_2\| = \sqrt{0.25+0.25+1} = \sqrt{1.5} = 1.2247

\mathbf{q}_2 = \frac{(0.5,-0.5,1)}{1.2247} = (0.4082,\ -0.4082,\ 0.8165)

Answers: \mathbf{q}_1 = \frac{1}{\sqrt2}(1,1,0) and \mathbf{q}_2 = \frac{1}{\sqrt6}(1,-1,2).

Final check — both have length 1 and are perpendicular:

\|\mathbf{q}_2\|^2 = 0.1667+0.1667+0.6667 = 1 \; ✓

\mathbf{q}_1\cdot\mathbf{q}_2 = (0.7071)(0.4082) + (0.7071)(-0.4082) + 0 = 0 \; ✓

What to notice. The procedure never changes the space the vectors span — \mathbf{q}_2 is built out of \mathbf{v}_1 and \mathbf{v}_2 only. It just replaces an awkward pair of directions with a pair at right angles that describes exactly the same plane. Everything after that is easier, because in a right-angled system a coordinate is found by a single dot product instead of by solving a system.

Problem 12 — Everything at once: a Markov chain

A town's residents choose between two supermarkets. Each month, 80% of shop A's customers stay and 20% switch to B; 30% of B's customers switch to A and 70% stay. Starting with 60% at A, what is the split after one month, and what happens in the long run?

Solution

Step 1 — build the transition matrix. Put the "where they end up" information in columns, so that multiplying by a state vector advances one month:

T = \begin{pmatrix} 0.8 & 0.3\\ 0.2 & 0.7\end{pmatrix}, \qquad \mathbf{s}_0 = \begin{pmatrix}0.6\\ 0.4\end{pmatrix}

Reading column 1: of A's customers, 0.8 stay at A and 0.2 go to B. Reading column 2: of B's, 0.3 go to A and 0.7 stay. Each column sums to 1, because every customer goes somewhere.

Step 2 — one month.

\mathbf{s}_1 = T\mathbf{s}_0 = \begin{pmatrix}0.8(0.6) + 0.3(0.4)\\ 0.2(0.6)+0.7(0.4)\end{pmatrix} = \begin{pmatrix}0.48+0.12\\ 0.12+0.28\end{pmatrix} = \begin{pmatrix}0.60\\ 0.40\end{pmatrix}

The split did not move at all. That is a strong hint, and it is worth stopping to see why rather than moving on.

Step 3 — the long run, done properly. A steady state is a vector unchanged by T:

T\mathbf{s} = \mathbf{s}

That is the eigenvector equation with \lambda = 1. So find it:

(T - I)\mathbf{s} = \begin{pmatrix}-0.2 & 0.3\\ 0.2 & -0.3\end{pmatrix}\begin{pmatrix}a\\b\end{pmatrix} = \begin{pmatrix}0\\0\end{pmatrix}

The first row gives -0.2a + 0.3b = 0, so a = 1.5b. The second row says the same thing negated, as expected.

Step 4 — apply the constraint that the shares must total 1.

a + b = 1 \quad \Rightarrow \quad 1.5b + b = 1 \quad \Rightarrow \quad b = 0.4, \quad a = 0.6

Answers: after one month the split is still 60/40, and 60/40 is the steady state — the town started exactly at equilibrium.

Step 5 — check the other eigenvalue, which tells you how fast any other start converges. The trace is 0.8+0.7 = 1.5 and the determinant is 0.56 - 0.06 = 0.5. Since the eigenvalues sum to the trace and one of them is 1:

\lambda_2 = 1.5 - 1 = 0.5

And their product should be the determinant: 1 \times 0.5 = 0.5

What that second eigenvalue means. Any deviation from the steady state gets multiplied by 0.5 every month, so it halves monthly and is effectively gone within a year. Had we started at 90/10, the deviation of +0.3 would decay as 0.3, 0.15, 0.075, \ldots towards nothing.

The general lesson. The largest eigenvalue of a transition matrix is always 1, and its eigenvector is the long-run distribution. The second largest controls the speed of getting there. Every question about "where does this settle and how fast" — customer churn, disease spread, a shuffled deck, a web crawler's ranking — is those two numbers.

Next: Part 5 — Calculus, where the fixed transformations of this Part give way to quantities that change, and 5.1 — limits derives every derivative and integral rule from first principles.