Linear Algebra · M301

Week 4 Recap

Four things to be able to do without hesitation: build a standard matrix, decide one-to-one, decide onto, and step a population forward with a transition matrix. Each example below is meant to be tried first and checked afterwards.

The facts in one place

1. Standard matrix

Example 1

(a) Let \(T:\mathbb{R}^3\to\mathbb{R}^2\) be given by \(T(x_1,x_2,x_3) = (x_1 - 2x_2 + x_3,\; 4x_2 - x_3)\). Find the standard matrix of \(T\).

(b) Let \(S:\mathbb{R}^2\to\mathbb{R}^2\) first reflect each point through the \(x_2\)-axis and then rotate it counterclockwise by \(90^\circ\). Find the standard matrix of \(S\).

(a) Read off the coefficient of each variable in each output coordinate. Column 1 holds the coefficients of \(x_1\), column 2 those of \(x_2\), column 3 those of \(x_3\):

\[ A = \begin{bmatrix} 1 & -2 & 1 \\ 0 & 4 & -1 \end{bmatrix}. \]

Check the size: \(T\) goes from \(\mathbb{R}^3\) to \(\mathbb{R}^2\), so \(A\) must be \(2\times 3\). It is. A second check: \(A\mathbf e_1 = (1,0)\), and putting \(x_1 = 1, x_2 = x_3 = 0\) into the formula also gives \((1,0)\).

(b) Follow \(\mathbf e_1\) and \(\mathbf e_2\) through both stages, in order.

\(\mathbf e_1 = (1,0)\): reflecting through the \(x_2\)-axis flips the first coordinate, giving \((-1,0)\). Rotating \((-1,0)\) by \(90^\circ\) counterclockwise gives \((0,-1)\).

\(\mathbf e_2 = (0,1)\): reflecting leaves it at \((0,1)\). Rotating \((0,1)\) by \(90^\circ\) counterclockwise gives \((-1,0)\).

\[ A = \begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix}. \]

This matrix sends \((x_1,x_2)\) to \((-x_2,-x_1)\), which is the reflection through the line \(x_2 = -x_1\). Two transformations in a row turned out to be a single, simpler one.

2. One-to-one and onto

Example 2

For each matrix, decide whether the transformation \(\mathbf x\mapsto A\mathbf x\) is one-to-one and whether it is onto the codomain.

\[ \text{(a)}\ \begin{bmatrix} 1 & -1 & 0 \\ 0 & 1 & 1 \end{bmatrix} \qquad \text{(b)}\ \begin{bmatrix} 1 & 2 \\ 2 & 4 \\ 0 & 1 \end{bmatrix} \qquad \text{(c)}\ \begin{bmatrix} 1 & 2 \\ 3 & 6 \end{bmatrix} \]

Each answer comes from counting pivots, and in every case the shape rule already settles one of the two questions.

(a) A \(2\times 3\) matrix: the domain is \(\mathbb{R}^3\), the codomain \(\mathbb{R}^2\). Three columns but at most 2 pivots, so one column has no pivot and the transformation is not one-to-one. The matrix is already in echelon form with pivots in positions \((1,1)\) and \((2,2)\), so every row has a pivot and the transformation is onto \(\mathbb{R}^2\).

(b) A \(3\times 2\) matrix. Only 2 columns for 3 rows, so it is not onto \(\mathbb{R}^3\). Are the columns independent? \((1,2,0)\) and \((2,4,1)\) are not multiples of each other, because the third entries force any multiple of the first column to have third entry 0. So the columns are independent and the transformation is one-to-one.

(c) Square, so the shape rule says nothing. The second column is twice the first, so the columns are dependent: not one-to-one. Two dependent vectors span only a line, not \(\mathbb{R}^2\): not onto. For a square matrix these two properties always fail or hold together, because "a pivot in every column" and "a pivot in every row" mean the same thing when the numbers of rows and columns agree.

sizepivotsone-to-oneonto
(a)2 × 32noyes
(b)3 × 22yesno
(c)2 × 21nono
Example 3

Let \(T:\mathbb{R}^2\to\mathbb{R}^3\) be linear with \(T(\mathbf e_1) = (1, 1, 0)\) and \(T(\mathbf e_2) = (2, 2, 0)\). Without writing any matrix, find two different vectors with the same image. Then say what this tells you about \(T\).

Since \(T(\mathbf e_2) = 2\,T(\mathbf e_1)\), linearity gives \(T(\mathbf e_2) = T(2\mathbf e_1)\). So \(\mathbf e_2 = (0,1)\) and \(2\mathbf e_1 = (2,0)\) are two different vectors with the same image \((2,2,0)\). Hence \(T\) is not one-to-one.

The same fact in the language of the theorem: \(T(2\mathbf e_1 - \mathbf e_2) = \mathbf 0\) with \(2\mathbf e_1 - \mathbf e_2 \ne \mathbf 0\), so the equation \(T(\mathbf x) = \mathbf 0\) has a nontrivial solution. And in the language of columns: the standard matrix has columns \((1,1,0)\) and \((2,2,0)\), which are dependent.

It is also not onto \(\mathbb{R}^3\), for two separate reasons: the shape (2 columns, 3 rows), and the fact that every image has third coordinate 0.

3. Transition matrices from a diagram

Each diagram below shows a population split among a few groups. An arrow from one circle to another carries the fraction of that group that moves there in one period; the loop on a circle carries the fraction that stays. A pair of groups with no arrow between them exchanges nobody. The rule is always the same: column \(j\) of \(M\) lists the arrows leaving circle \(j\), in the order of the groups.

Example 4 (two groups)

A gym has two membership types. Take group 1 to be Basic and group 2 to be Premium. This month there are 800 Basic and 200 Premium members.

Basic Premium 0.10 0.25 0.90 0.75

(a) Write the transition matrix \(M\). (b) Find the numbers next month and the month after. (c) A manager is handed next month's numbers only. Can she work out this month's numbers from them?

(a) Column 1 is what leaves the Basic circle: 0.90 back to Basic (the loop), 0.10 to Premium. Column 2 is what leaves the Premium circle: 0.25 to Basic, 0.75 back to Premium (the loop).

\[ M = \begin{bmatrix} 0.90 & 0.25 \\ 0.10 & 0.75 \end{bmatrix}, \qquad \mathbf x_0 = \begin{bmatrix} 800 \\ 200 \end{bmatrix}. \]

Both columns add to 1, as the two arrows leaving each circle must.

(b)

\[ \mathbf x_1 = M\mathbf x_0 = \begin{bmatrix} 0.90(800) + 0.25(200) \\ 0.10(800) + 0.75(200) \end{bmatrix} = \begin{bmatrix} 720 + 50 \\ 80 + 150 \end{bmatrix} = \begin{bmatrix} 770 \\ 230 \end{bmatrix}, \]

\[ \mathbf x_2 = M\mathbf x_1 = \begin{bmatrix} 0.90(770) + 0.25(230) \\ 0.10(770) + 0.75(230) \end{bmatrix} = \begin{bmatrix} 693 + 57.5 \\ 77 + 172.5 \end{bmatrix} = \begin{bmatrix} 750.5 \\ 249.5 \end{bmatrix}. \]

Both add to 1,000. The half members are a feature of the model, not an error; round only when reporting.

(c) This is the question "is \(\mathbf x\mapsto M\mathbf x\) one-to-one?". The columns \((0.90, 0.10)\) and \((0.25, 0.75)\) are not multiples of each other, so they are independent and exactly one \(\mathbf x_0\) produces a given \(\mathbf x_1\). Yes, she can recover this month's numbers by solving \(M\mathbf x = (770, 230)\).

Example 5 (three groups)

A campus has three cafeterias. Each week, students who ate mostly at one cafeteria may switch to another. Take the groups in the order North, Central, South. This week 300 students eat mostly at North, 500 at Central and 200 at South.

North Central South 0.2 0.1 0.1 0.1 0.3 0.7 0.8 0.7

(a) Write the transition matrix \(M\). What does the missing arrow from South to North become in the matrix? (b) Find next week's numbers. (c) Check, without any computation, that the total cannot change.

(a) Read one circle at a time, listing where its arrows go in the order North, Central, South.

Leaving North: 0.7 stays (loop), 0.2 to Central, 0.1 to South. Column 1 is \((0.7, 0.2, 0.1)\).

Leaving Central: 0.1 to North, 0.8 stays, 0.1 to South. Column 2 is \((0.1, 0.8, 0.1)\).

Leaving South: no arrow to North, 0.3 to Central, 0.7 stays. Column 3 is \((0, 0.3, 0.7)\). A missing arrow is simply a zero entry.

\[ M = \begin{bmatrix} 0.7 & 0.1 & 0 \\ 0.2 & 0.8 & 0.3 \\ 0.1 & 0.1 & 0.7 \end{bmatrix}, \qquad \mathbf x_0 = \begin{bmatrix} 300 \\ 500 \\ 200 \end{bmatrix}. \]

(b) One row at a time:

\[ \begin{aligned} \text{North} &= 0.7(300) + 0.1(500) + 0(200) = 210 + 50 + 0 = 260, \\ \text{Central} &= 0.2(300) + 0.8(500) + 0.3(200) = 60 + 400 + 60 = 520, \\ \text{South} &= 0.1(300) + 0.1(500) + 0.7(200) = 30 + 50 + 140 = 220. \end{aligned} \]

So \(\mathbf x_1 = (260, 520, 220)\), total 1,000.

(c) Every column adds to 1: \(0.7+0.2+0.1\), \(0.1+0.8+0.1\), \(0+0.3+0.7\). In the diagram that is the statement that the arrows leaving any circle, loop included, account for all of its members. Nobody is created or lost, so the total is preserved. The row sums, by contrast, need not be 1, and here they are not.

Example 6 (four groups)

A bike-share scheme has four stations A, B, C, D arranged in a ring. Each day, of the bikes at any station, 0.6 stay there, 0.3 move to the next station clockwise and 0.1 move to the next station counterclockwise. No bike goes directly to the station across the ring. Take the groups in the order A, B, C, D. This morning the stations hold 100, 200, 300 and 400 bikes.

A B C D 0.3 0.1 0.3 0.1 0.3 0.1 0.3 0.1 0.6 0.6 0.6 0.6

(a) Write the transition matrix \(M\) and say which entries are zero and why. (b) Find tomorrow morning's numbers. (c) The matrix has a pattern: each column is the previous column shifted down by one place. Explain in one sentence why the diagram forces this.

(a) Leaving A: 0.6 stays, 0.3 to B (clockwise), nothing to C, 0.1 to D (counterclockwise). Column 1 is \((0.6, 0.3, 0, 0.1)\). The same reading for B, C and D gives

\[ M = \begin{bmatrix} 0.6 & 0.1 & 0 & 0.3 \\ 0.3 & 0.6 & 0.1 & 0 \\ 0 & 0.3 & 0.6 & 0.1 \\ 0.1 & 0 & 0.3 & 0.6 \end{bmatrix}, \qquad \mathbf x_0 = \begin{bmatrix} 100 \\ 200 \\ 300 \\ 400 \end{bmatrix}. \]

The zeros sit in positions \((3,1)\), \((4,2)\), \((1,3)\) and \((2,4)\): A and C exchange nobody, and neither do B and D. Those are the two diagonals of the square with no arrows on them. Every column still adds to 1.

(b) Row by row, skipping the zero terms:

\[ \begin{aligned} A &= 0.6(100) + 0.1(200) + 0.3(400) = 60 + 20 + 120 = 200, \\ B &= 0.3(100) + 0.6(200) + 0.1(300) = 30 + 120 + 30 = 180, \\ C &= 0.3(200) + 0.6(300) + 0.1(400) = 60 + 180 + 40 = 280, \\ D &= 0.1(100) + 0.3(300) + 0.6(400) = 10 + 90 + 240 = 340. \end{aligned} \]

So \(\mathbf x_1 = (200, 180, 280, 340)\), total 1,000.

(c) Every station treats its neighbours the same way, so relabelling the stations by rotating the ring one step changes nothing in the diagram; in the matrix, that rotation is exactly "move each column one place down (and wrap around)". A model with the same rules at every node always produces this kind of matrix.