math.wiki
Linear algebra › Vectors in n dimensions › Coordinates in a basis and change of basis
Open on the map
Linear Algebra

Coordinates in a basis and change of basis

A point on a slanted tile grid can be named by its screen position or by its tile steps. How do you turn one description into the other, and between two different grids?

Where you are 8 in Vectors in n dimensions

Why this exists

Pehuen is drawing a pixel-art game on a slanted tile grid, in the spirit of isometric art. The engine stores every position as a screen vector, so many units right and so many units up. Amancay, who designs the levels, never thinks that way: a gem sits “two tiles along one edge, three along the other”. One tile edge is \mathbf{b}_1 = (2, 1) on screen and the other is \mathbf{b}_2 = (1, 3), so her gem is at

2\mathbf{b}_1 + 3\mathbf{b}_2 = (4, 2) + (3, 9) = (7, 11).

The game needs both directions of translation: tile steps to screen position for drawing, and screen position to tile steps when a player clicks. Then Kuyen brings in a second tile set with different edges, and every level has to be converted from one grid to the other. All three jobs are the same idea. A basis is a coordinate grid, the coordinates of a vector are its steps on that grid, and an invertible matrix carries one set of coordinates to another.

Definition

Let V be a subspace of \mathbb{R}^n and \mathcal{B} = \{\mathbf{b}_1, \dots, \mathbf{b}_k\} a basis of V, taken in this order (Basis and dimension). For \mathbf{x} in V, the coordinate vector of \mathbf{x} relative to \mathcal{B} is the column of weights

[\mathbf{x}]_{\mathcal{B}} = \begin{bmatrix} c_1 \\ \vdots \\ c_k \end{bmatrix} \quad \text{where} \quad \mathbf{x} = c_1\mathbf{b}_1 + \dots + c_k\mathbf{b}_k.

The rule \mathbf{x} \mapsto [\mathbf{x}]_{\mathcal{B}}, from V to \mathbb{R}^k, is the coordinate map. In prose a column is written as a list, [\mathbf{x}]_{\mathcal{B}} = (2, 3).

When \mathcal{B} is a basis of all of \mathbb{R}^n, its vectors as columns form the n \times n matrix P_{\mathcal{B}} = \begin{bmatrix} \mathbf{b}_1 & \cdots & \mathbf{b}_n \end{bmatrix}.

If \mathcal{C} is a second basis of the same V, the change-of-coordinates matrix from \mathcal{B} to \mathcal{C} is the k \times k matrix whose columns are the \mathcal{C}-coordinates of the \mathcal{B} vectors:

P_{\mathcal{C} \leftarrow \mathcal{B}} = \begin{bmatrix} [\mathbf{b}_1]_{\mathcal{C}} & \cdots & [\mathbf{b}_k]_{\mathcal{C}} \end{bmatrix}.

Intuition

The standard basis draws the square grid, and on it a vector’s coordinates are its entries. Any other basis draws a slanted grid: lines through the multiples of \mathbf{b}_1 and \mathbf{b}_2 and their sums, tiling the plane with copies of one parallelogram. Coordinates are walking instructions on that grid.

\mathbf{b}_1
\mathbf{b}_2
\mathbf{x}
Figure 1Two steps along \mathbf{b}_1 and three along \mathbf{b}_2 reach \mathbf{x} = (7, 11), so [\mathbf{x}]_{\mathcal{B}} = (2, 3).

The matrix P_{\mathcal{B}} is a translator. Fed tile steps (c_1, c_2), it returns c_1\mathbf{b}_1 + c_2\mathbf{b}_2, the screen position, because multiplying a matrix by a vector combines its columns with those weights (Multiplying a matrix by a vector). Going back, from screen to tiles, undoes P_{\mathcal{B}}, so it is multiplication by P_{\mathcal{B}}^{-1}. Changing grids is the two trips in a row: from \mathcal{B}-steps out to the screen, then from the screen into \mathcal{C}-steps. The vector never moves; only its description changes.

Results

1. Coordinates are unique. Relative to a basis of V, each \mathbf{x} in V has exactly one coordinate vector.

2. From coordinates to the vector and back. If \mathcal{B} is a basis of \mathbb{R}^n, then P_{\mathcal{B}} is invertible and, for every \mathbf{x} in \mathbb{R}^n,

P_{\mathcal{B}}[\mathbf{x}]_{\mathcal{B}} = \mathbf{x}, \qquad [\mathbf{x}]_{\mathcal{B}} = P_{\mathcal{B}}^{-1}\mathbf{x}.

3. The coordinate map is linear and one-to-one onto. For \mathbf{x}, \mathbf{y} in V and a scalar c, [\mathbf{x} + \mathbf{y}]_{\mathcal{B}} = [\mathbf{x}]_{\mathcal{B}} + [\mathbf{y}]_{\mathcal{B}} and [c\mathbf{x}]_{\mathcal{B}} = c[\mathbf{x}]_{\mathcal{B}}. Different vectors have different coordinates, and every list in \mathbb{R}^k is the coordinate vector of some \mathbf{x} in V. So a list in V is independent exactly when its coordinate vectors are (Exercise 7).

4. Converting between bases. For bases \mathcal{B}, \mathcal{C} of V, P_{\mathcal{C} \leftarrow \mathcal{B}} is the only matrix with [\mathbf{x}]_{\mathcal{C}} = P_{\mathcal{C} \leftarrow \mathcal{B}}[\mathbf{x}]_{\mathcal{B}} for every \mathbf{x} in V. When V = \mathbb{R}^n,

P_{\mathcal{C} \leftarrow \mathcal{B}} = P_{\mathcal{C}}^{-1}P_{\mathcal{B}},

and row reducing \begin{bmatrix} P_{\mathcal{C}} & P_{\mathcal{B}} \end{bmatrix} to \begin{bmatrix} I & M \end{bmatrix} produces M = P_{\mathcal{C} \leftarrow \mathcal{B}}.

5. The converting matrix is invertible. P_{\mathcal{C} \leftarrow \mathcal{B}} is invertible with inverse P_{\mathcal{B} \leftarrow \mathcal{C}}, and for three bases P_{\mathcal{D} \leftarrow \mathcal{C}}P_{\mathcal{C} \leftarrow \mathcal{B}} = P_{\mathcal{D} \leftarrow \mathcal{B}}. Conversely, every invertible k \times k matrix is P_{\mathcal{C} \leftarrow \mathcal{D}} for some basis \mathcal{D} (Example 7).

Why it is true

Result 1. Basis and dimension states this; here is the proof. A basis spans V, so some weights exist. If \mathbf{x} = \sum c_i\mathbf{b}_i = \sum d_i\mathbf{b}_i, subtracting gives \sum (c_i - d_i)\mathbf{b}_i = \mathbf{0}. The \mathbf{b}_i are independent, so every c_i - d_i = 0. Spanning gives existence; independence gives uniqueness.

Result 2. By the column view of a product, P_{\mathcal{B}}\mathbf{c} = c_1\mathbf{b}_1 + \dots + c_n\mathbf{b}_n, so P_{\mathcal{B}}[\mathbf{x}]_{\mathcal{B}} = \mathbf{x} is the definition of coordinates read as a matrix equation. The n columns of the square matrix P_{\mathcal{B}} are independent, so it has a pivot in every column, hence in every row, and it reduces to I; such a matrix is invertible (Finding an inverse by row reducing A next to I). Multiply P_{\mathcal{B}}[\mathbf{x}]_{\mathcal{B}} = \mathbf{x} on the left by P_{\mathcal{B}}^{-1}.

Result 3. If \mathbf{x} = \sum c_i\mathbf{b}_i and \mathbf{y} = \sum d_i\mathbf{b}_i, then \mathbf{x} + \mathbf{y} = \sum (c_i + d_i)\mathbf{b}_i and c\mathbf{x} = \sum (cc_i)\mathbf{b}_i, and by Result 1 these weights are the coordinates. Equal coordinates name the same combination, hence the same vector. Any (c_1, \dots, c_k) is the coordinate vector of \sum c_i\mathbf{b}_i, which lies in V because a subspace is closed under combinations.

Result 4. Let \mathbf{x} = \sum c_j\mathbf{b}_j. By Result 3, [\mathbf{x}]_{\mathcal{C}} = \sum c_j[\mathbf{b}_j]_{\mathcal{C}}, which is P_{\mathcal{C} \leftarrow \mathcal{B}} times (c_1, \dots, c_k) = [\mathbf{x}]_{\mathcal{B}}. Only one matrix does this: taking \mathbf{x} = \mathbf{b}_j, whose \mathcal{B}-coordinates are \mathbf{e}_j, shows column j of any such matrix must be [\mathbf{b}_j]_{\mathcal{C}}. In \mathbb{R}^n, Result 2 gives [\mathbf{x}]_{\mathcal{C}} = P_{\mathcal{C}}^{-1}\mathbf{x} = P_{\mathcal{C}}^{-1}P_{\mathcal{B}}[\mathbf{x}]_{\mathcal{B}}. The row operations that turn P_{\mathcal{C}} into I amount to multiplying on the left by P_{\mathcal{C}}^{-1} (Finding an inverse by row reducing A next to I), so done to the whole block they turn P_{\mathcal{B}} into P_{\mathcal{C}}^{-1}P_{\mathcal{B}}.

Result 5. In \mathbb{R}^n, P_{\mathcal{B} \leftarrow \mathcal{C}}P_{\mathcal{C} \leftarrow \mathcal{B}} = P_{\mathcal{B}}^{-1}P_{\mathcal{C}}P_{\mathcal{C}}^{-1}P_{\mathcal{B}} = I, and the product in the other order is I the same way. For three bases, P_{\mathcal{D}}^{-1}P_{\mathcal{C}}P_{\mathcal{C}}^{-1}P_{\mathcal{B}} = P_{\mathcal{D}}^{-1}P_{\mathcal{B}}. For a basis of a smaller subspace, P_{\mathcal{B}} is not square and the same facts are proved from Result 4 alone (Exercise 18). The meaning is simple: converting to \mathcal{C} and back changes nothing, so the second trip undoes the first.

Worked examples

Examples 1 to 3 belong to the first day; Examples 4 to 7 to the second.

Example 1

Day 1: tile steps and screen positions

Pehuen’s grid has \mathcal{B} = \{(2, 1), (1, 3)\}. (a) A sprite has [\mathbf{x}]_{\mathcal{B}} = (2, 3). Where is it on screen? (b) A player clicks the screen point \mathbf{y} = (1, 8). Find [\mathbf{y}]_{\mathcal{B}}. (c) Find the coordinates of \mathbf{z} = (1, 0) and say what they mean on the grid.

Solution

(a) By Result 2, \mathbf{x} = P_{\mathcal{B}}[\mathbf{x}]_{\mathcal{B}}:

\begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix}\begin{bmatrix} 2 \\ 3 \end{bmatrix} = \begin{bmatrix} 7 \\ 11 \end{bmatrix}.

That is the walk in the first figure.

(b) The two vectors are not multiples, so \mathcal{B} is a basis of \mathbb{R}^2. By the formula for a 2 \times 2 inverse (Inverse of a 2 by 2 matrix, and solving with it), with 2 \cdot 3 - 1 \cdot 1 = 5,

\begin{aligned} P_{\mathcal{B}}^{-1} &= \frac{1}{5}\begin{bmatrix} 3 & -1 \\ -1 & 2 \end{bmatrix}, \\ P_{\mathcal{B}}^{-1}\begin{bmatrix} 1 \\ 8 \end{bmatrix} &= \frac{1}{5}\begin{bmatrix} -5 \\ 15 \end{bmatrix} = \begin{bmatrix} -1 \\ 3 \end{bmatrix}. \end{aligned}

So [\mathbf{y}]_{\mathcal{B}} = (-1, 3). Check: -(2, 1) + 3(1, 3) = (1, 8).

(c) P_{\mathcal{B}}^{-1}(1, 0) = \left(\tfrac{3}{5}, -\tfrac{1}{5}\right), the first column of P_{\mathcal{B}}^{-1}. Every screen point has \mathcal{B}-coordinates, but the tile corners are exactly the points whose coordinates are integers, and \mathbf{z} sits inside a tile.

Example 2

Day 1: a basis of \mathbb{R}^3 from the columns of a matrix

Let \mathcal{U} = \{\mathbf{u}_1, \mathbf{u}_2, \mathbf{u}_3\} be the columns of

P = \begin{bmatrix} 1 & 0 & 2 \\ 1 & 1 & 3 \\ 0 & 1 & 2 \end{bmatrix}.

Show \mathcal{U} is a basis of \mathbb{R}^3, find P^{-1}, and find [\mathbf{x}]_{\mathcal{U}} for \mathbf{x} = (5, 9, 7).

Solution

Row reduce P with I beside it. R_2 - R_1, then R_3 - R_2:

\left[\begin{array}{ccc|ccc} 1 & 0 & 2 & 1 & 0 & 0 \\ 0 & 1 & 1 & -1 & 1 & 0 \\ 0 & 0 & 1 & 1 & -1 & 1 \end{array}\right].

Three pivots, so the columns are independent and, three of them in \mathbb{R}^3, a basis. Clearing above the last pivot with R_2 - R_3 and R_1 - 2R_3 leaves

P^{-1} = \begin{bmatrix} -1 & 2 & -2 \\ -2 & 2 & -1 \\ 1 & -1 & 1 \end{bmatrix}.

Then

P^{-1}\begin{bmatrix} 5 \\ 9 \\ 7 \end{bmatrix} = \begin{bmatrix} -5 + 18 - 14 \\ -10 + 18 - 7 \\ 5 - 9 + 7 \end{bmatrix} = \begin{bmatrix} -1 \\ 1 \\ 3 \end{bmatrix},

so [\mathbf{x}]_{\mathcal{U}} = (-1, 1, 3). Check: -(1, 1, 0) + (0, 1, 1) + 3(2, 3, 2) = (5, 9, 7). Once P^{-1} is known, every further vector costs one product; its columns are [\mathbf{e}_1]_{\mathcal{U}}, [\mathbf{e}_2]_{\mathcal{U}}, [\mathbf{e}_3]_{\mathcal{U}}.

Example 3

Day 1: coordinates on a plane in \mathbb{R}^3

Kuyen tilts a level into the plane V: x - y + z = 0 in \mathbb{R}^3, with basis \mathcal{B} = \{(1, 1, 0), (1, 0, -1)\}. Find [\mathbf{x}]_{\mathcal{B}} for \mathbf{x} = (4, 1, -3), and explain why (1, 0, 0) has no coordinates.

Solution

Both vectors satisfy the equation and are not multiples, and the plane has dimension 2, so \mathcal{B} is a basis of V. A combination is

c_1(1, 1, 0) + c_2(1, 0, -1) = (c_1 + c_2,\ c_1,\ -c_2).

Matching (4, 1, -3): c_1 = 1, c_2 = 3, and the first entry checks, 1 + 3 = 4. So [\mathbf{x}]_{\mathcal{B}} = (1, 3), a list of two numbers for a vector with three entries: the coordinate map sends V to \mathbb{R}^2, and by Result 3 it turns the plane into a copy of \mathbb{R}^2. Here P_{\mathcal{B}} is 3 \times 2 and has no inverse, so coordinates come from solving.

For (1, 0, 0) the entries force c_1 = 0 and c_2 = 0, and then the first entry is 0, not 1. No weights work, because 1 - 0 + 0 \neq 0: the vector is not in V, and coordinates relative to \mathcal{B} exist only for vectors of V.

Example 4

Day 2: converting to a second tile set

Amancay’s second grid uses \mathcal{C} = \{(1, 1), (1, 2)\}. Find P_{\mathcal{C} \leftarrow \mathcal{B}} for Pehuen’s \mathcal{B} = \{(2, 1), (1, 3)\}, and convert the sprite with [\mathbf{x}]_{\mathcal{B}} = (2, 3).

Solution

By Result 4, P_{\mathcal{C} \leftarrow \mathcal{B}} = P_{\mathcal{C}}^{-1}P_{\mathcal{B}}. Here 1 \cdot 2 - 1 \cdot 1 = 1, so

\begin{aligned} P_{\mathcal{C}}^{-1} &= \begin{bmatrix} 2 & -1 \\ -1 & 1 \end{bmatrix}, \\ P_{\mathcal{C} \leftarrow \mathcal{B}} &= \begin{bmatrix} 2 & -1 \\ -1 & 1 \end{bmatrix}\begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix} \\ &= \begin{bmatrix} 3 & -1 \\ -1 & 2 \end{bmatrix}. \end{aligned}

The columns say \mathbf{b}_1 = 3\mathbf{c}_1 - \mathbf{c}_2 and \mathbf{b}_2 = -\mathbf{c}_1 + 2\mathbf{c}_2; for instance 3(1, 1) - (1, 2) = (2, 1). Then

[\mathbf{x}]_{\mathcal{C}} = \begin{bmatrix} 3 & -1 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 2 \\ 3 \end{bmatrix} = \begin{bmatrix} 3 \\ 4 \end{bmatrix},

and 3(1, 1) + 4(1, 2) = (7, 11), the same screen point as before.

\mathbf{c}_1
\mathbf{c}_2
\mathbf{x}
Figure 2The same point \mathbf{x} = (7, 11) on the second grid is four steps along \mathbf{c}_2 and three along \mathbf{c}_1, so [\mathbf{x}]_{\mathcal{C}} = (3, 4). The order of the steps does not matter.
Example 5

Day 2: going back

Find P_{\mathcal{B} \leftarrow \mathcal{C}} for the bases of Example 4 in two ways. Then find the \mathcal{B}-coordinates of the points with [\mathbf{y}]_{\mathcal{C}} = (1, 3) and [\mathbf{w}]_{\mathcal{C}} = (1, 0).

Solution

By Result 5 it is the inverse of P_{\mathcal{C} \leftarrow \mathcal{B}}, whose entries give 3 \cdot 2 - (-1)(-1) = 5:

P_{\mathcal{B} \leftarrow \mathcal{C}} = \frac{1}{5}\begin{bmatrix} 2 & 1 \\ 1 & 3 \end{bmatrix}.

Directly, P_{\mathcal{B}}^{-1}P_{\mathcal{C}} = \tfrac{1}{5}\begin{bmatrix} 3 & -1 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} 1 & 1 \\ 1 & 2 \end{bmatrix} gives the same matrix. Then [\mathbf{y}]_{\mathcal{B}} = \tfrac{1}{5}(2 + 3, 1 + 9) = (1, 2); check, \mathbf{y} = (1, 1) + 3(1, 2) = (4, 7) = (2, 1) + 2(1, 3). And [\mathbf{w}]_{\mathcal{B}} = \left(\tfrac{2}{5}, \tfrac{1}{5}\right).

So P_{\mathcal{C} \leftarrow \mathcal{B}} has integer entries and its inverse does not. On the grids: every corner of a \mathcal{B} tile is a corner of a \mathcal{C} tile, but not the other way. A \mathcal{B} tile has area 5 and a \mathcal{C} tile area 1, so the coarse grid’s corners are a fifth of the fine grid’s.

Example 6

Day 2: two bases of \mathbb{R}^3 by one row reduction

With \mathcal{U} the columns of P from Example 2, let \mathcal{W} = \{(1, 1, 1), (1, 0, 1), (1, 2, 0)\}. Find P_{\mathcal{U} \leftarrow \mathcal{W}}, and convert [\mathbf{x}]_{\mathcal{W}} = (1, 1, 1).

Solution

By Result 4, row reduce \begin{bmatrix} P & P_{\mathcal{W}} \end{bmatrix}:

\left[\begin{array}{ccc|ccc} 1 & 0 & 2 & 1 & 1 & 1 \\ 1 & 1 & 3 & 1 & 0 & 2 \\ 0 & 1 & 2 & 1 & 1 & 0 \end{array}\right].

The same four operations as in Example 2 (R_2 - R_1, R_3 - R_2, R_2 - R_3, R_1 - 2R_3) turn P into I. On the right they give

P_{\mathcal{U} \leftarrow \mathcal{W}} = \begin{bmatrix} -1 & -3 & 3 \\ -1 & -3 & 2 \\ 1 & 2 & -1 \end{bmatrix},

which is P^{-1}P_{\mathcal{W}}; with P^{-1} already known, that product is a second route. (Reducing P_{\mathcal{W}} alone gives three pivots, so \mathcal{W} is a basis.) Check the second column: -3(1, 1, 0) - 3(0, 1, 1) + 2(2, 3, 2) = (1, 0, 1). Finally

[\mathbf{x}]_{\mathcal{U}} = P_{\mathcal{U} \leftarrow \mathcal{W}}(1, 1, 1) = (-1, -2, 2),

the row sums of the matrix. Indeed \mathbf{x} = (1, 1, 1) + (1, 0, 1) + (1, 2, 0) = (3, 3, 2), and -(1, 1, 0) - 2(0, 1, 1) + 2(2, 3, 2) = (3, 3, 2).

Example 7

Day 2: which matrices convert coordinates

Kuyen wants a third grid \mathcal{D} with P_{\mathcal{C} \leftarrow \mathcal{D}} = M = \begin{bmatrix} 2 & 1 \\ 1 & 1 \end{bmatrix}, with Amancay’s \mathcal{C}. Find \mathcal{D}. Then show no grid has P_{\mathcal{C} \leftarrow \mathcal{D}} = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}.

Solution

The columns of P_{\mathcal{C} \leftarrow \mathcal{D}} are [\mathbf{d}_1]_{\mathcal{C}} and [\mathbf{d}_2]_{\mathcal{C}}, so

\begin{aligned} \mathbf{d}_1 &= 2\mathbf{c}_1 + \mathbf{c}_2 = (3, 4), \\ \mathbf{d}_2 &= \mathbf{c}_1 + \mathbf{c}_2 = (2, 3). \end{aligned}

In matrix form P_{\mathcal{D}} = P_{\mathcal{C}}M = \begin{bmatrix} 3 & 2 \\ 4 & 3 \end{bmatrix}, which has 3 \cdot 3 - 2 \cdot 4 = 1 \neq 0, so it is invertible and \mathcal{D} is a basis.

For the second matrix the same recipe gives \mathbf{d}_1 = \mathbf{c}_1 + 2\mathbf{c}_2 = (3, 5) and \mathbf{d}_2 = 2\mathbf{c}_1 + 4\mathbf{c}_2 = (6, 10) = 2\mathbf{d}_1, a dependent list. In general P_{\mathcal{D}} = P_{\mathcal{C}}M is invertible exactly when M is, so the invertible matrices are exactly the change-of-coordinates matrices, as Result 5 says.

Boundaries

  • Coordinates need a basis. A dependent spanning list gives some vectors many weight lists (Exercise 10); an independent list that does not span gives some vectors none.
  • A basis is an ordered list here. Reordering it reorders every coordinate vector (Exercise 9).
  • [\mathbf{x}]_{\mathcal{B}} exists only for \mathbf{x} in the space \mathcal{B} spans (Example 3).
  • [\mathbf{x}]_{\mathcal{B}} = P_{\mathcal{B}}^{-1}\mathbf{x} and P_{\mathcal{C} \leftarrow \mathcal{B}} = P_{\mathcal{C}}^{-1}P_{\mathcal{B}} need bases of all of \mathbb{R}^n. For a basis of a smaller subspace P_{\mathcal{B}} is n \times k with k < n and has no inverse; coordinates come from solving, and P_{\mathcal{C} \leftarrow \mathcal{B}} from its columns (Exercise 17).
  • P_{\mathcal{C} \leftarrow \mathcal{B}} needs \mathcal{B} and \mathcal{C} to be bases of the same space.

Where this goes next

A Linear transformation has a matrix in the standard basis, but nothing forces that choice. Described in the coordinates of another basis, the same transformation has the matrix P_{\mathcal{B}}^{-1}AP_{\mathcal{B}}, and choosing the basis well can make that matrix diagonal. That is Diagonalization, where a basis of eigenvectors turns a transformation into plain scaling along each direction. The coordinate map also gives a working rule used everywhere: any question about independence, span or dimension inside a subspace can be moved to \mathbb{R}^k and answered by row reduction there.

Exercises

Day 1: coordinates in a basis

  1. Let \mathcal{B} = \{(1, 2), (3, 1)\}. (a) If [\mathbf{x}]_{\mathcal{B}} = (2, -1), find \mathbf{x}. (b) Find [\mathbf{y}]_{\mathcal{B}} for \mathbf{y} = (8, 1).
  2. For \mathcal{B} of Exercise 1, write P_{\mathcal{B}} and P_{\mathcal{B}}^{-1}, and use them to find the coordinates of (5, 0) and (0, 5).
  3. Show that (1, 0, 1), (1, 1, 0), (0, 1, 1) is a basis of \mathbb{R}^3 and find the coordinates of (3, 5, 4) relative to it.
  4. Let Q = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 1 & 3 & 3 \end{bmatrix}. Find Q^{-1} by row reduction, then the coordinates of (2, 1, 4) and of \mathbf{e}_3 relative to the columns of Q.
  5. Show that (1, 2, 0), (0, 1, 1) is a basis of the plane 2x - y + z = 0, find the coordinates of (3, 7, 1), and explain why (1, 1, 1) has none.
  6. On Pehuen’s grid \mathcal{B} = \{(2, 1), (1, 3)\}, which of the screen points (0, 5), (3, 2), (2, -4) are tile corners?

Day 1: reasoning

  1. Let \mathcal{B} be a basis of V. Prove that vectors \mathbf{x}_1, \dots, \mathbf{x}_m in V are independent exactly when [\mathbf{x}_1]_{\mathcal{B}}, \dots, [\mathbf{x}_m]_{\mathcal{B}} are.
  2. Explain why [\mathbf{b}_j]_{\mathcal{B}} = \mathbf{e}_j, and why, for a basis of \mathbb{R}^n, column j of P_{\mathcal{B}}^{-1} is [\mathbf{e}_j]_{\mathcal{B}}.
  3. Let \mathcal{B}' list Pehuen’s vectors in the other order, (1, 3) then (2, 1). Find [(7, 11)]_{\mathcal{B}'} and explain how [\mathbf{x}]_{\mathcal{B}'} relates to [\mathbf{x}]_{\mathcal{B}} for every \mathbf{x}.
  4. The list (2, 1), (4, 2) is not a basis of \mathbb{R}^2. Show that (5, 5) is no combination of it and that (6, 3) is a combination in more than one way, and say which half of Result 1 fails each time.

Day 2: change of basis

  1. Let \mathcal{B} = \{(1, 2), (3, 1)\} and \mathcal{C} = \{(1, 0), (1, 1)\}. Find P_{\mathcal{C} \leftarrow \mathcal{B}} and [\mathbf{x}]_{\mathcal{C}} when [\mathbf{x}]_{\mathcal{B}} = (2, -1).
  2. For the bases of Exercise 11, find P_{\mathcal{B} \leftarrow \mathcal{C}} and the \mathcal{B}-coordinates of the vector with \mathcal{C}-coordinates (1, 3).
  3. Let \mathcal{Q} be the columns of Q in Exercise 4 and \mathcal{W} the basis of Exercise 3. Find P_{\mathcal{Q} \leftarrow \mathcal{W}} by row reducing \begin{bmatrix} Q & P_{\mathcal{W}} \end{bmatrix}, and convert [\mathbf{x}]_{\mathcal{W}} = (1, 2, 3).
  4. Kuyen’s grid is \mathcal{D} = \{(1, -1), (1, 1)\}. Find P_{\mathcal{D} \leftarrow \mathcal{B}} for Pehuen’s \mathcal{B}, and the \mathcal{D}-coordinates of the sprite with \mathcal{B}-coordinates (2, 3).
  5. With \mathcal{C} = \{(1, 1), (1, 2)\} and \mathcal{D} of Exercise 14, find P_{\mathcal{D} \leftarrow \mathcal{C}} and check that P_{\mathcal{D} \leftarrow \mathcal{C}}P_{\mathcal{C} \leftarrow \mathcal{B}} equals your answer to Exercise 14.
  6. With \mathcal{C} = \{(1, 0), (1, 1)\}, find the basis \mathcal{D} for which P_{\mathcal{C} \leftarrow \mathcal{D}} = \begin{bmatrix} 2 & 1 \\ 3 & 2 \end{bmatrix}.
  7. On the plane 2x - y + z = 0 take \mathcal{B} = \{(1, 2, 0), (0, 1, 1)\} and \mathcal{C} = \{(1, 1, -1), (1, 3, 1)\}. Find the 2 \times 2 matrix P_{\mathcal{C} \leftarrow \mathcal{B}} and convert [\mathbf{x}]_{\mathcal{B}} = (3, 1).

Day 2: reasoning

  1. Let \mathcal{B}, \mathcal{C}, \mathcal{D} be bases of a subspace V. Using only Result 4, prove P_{\mathcal{B} \leftarrow \mathcal{B}} = I and P_{\mathcal{D} \leftarrow \mathcal{C}}P_{\mathcal{C} \leftarrow \mathcal{B}} = P_{\mathcal{D} \leftarrow \mathcal{B}}, and deduce that P_{\mathcal{C} \leftarrow \mathcal{B}} is invertible.
  2. Prove that if P_{\mathcal{C} \leftarrow \mathcal{B}} = I then \mathcal{B} = \mathcal{C}, and that a matrix that is not invertible is never a change-of-coordinates matrix.
  3. Prove that [\mathbf{x}]_{\mathcal{B}} = \mathbf{x} for every \mathbf{x} in \mathbb{R}^n exactly when \mathcal{B} is the standard basis.
Answers
  1. (a) \mathbf{x} = (-1, 3): 2(1, 2) - (3, 1). (b) [\mathbf{y}]_{\mathcal{B}} = (-1, 3): c_1 + 3c_2 = 8 and 2c_1 + c_2 = 1 give c_1 = -1, c_2 = 3.
  2. P_{\mathcal{B}} = \begin{bmatrix} 1 & 3 \\ 2 & 1 \end{bmatrix}, \displaystyle P_{\mathcal{B}}^{-1} = \frac{1}{5}\begin{bmatrix} -1 & 3 \\ 2 & -1 \end{bmatrix} (here 1 - 6 = -5). Coordinates (-1, 2) and (3, -1): -(1, 2) + 2(3, 1) = (5, 0), 3(1, 2) - (3, 1) = (0, 5).
  3. Coordinates (1, 2, 3). Adding the three equations c_1 + c_2 = 3, c_2 + c_3 = 5, c_1 + c_3 = 4 gives c_1 + c_2 + c_3 = 6, then c_3 = 3, c_1 = 1, c_2 = 2. Every vector is reached the same way, so the list spans, and three spanning vectors in \mathbb{R}^3 are a basis.
  4. Q^{-1} = \begin{bmatrix} 0 & -3 & 1 \\ 1 & 2 & -1 \\ -1 & -1 & 1 \end{bmatrix}, from R_3 - R_1, R_3 - R_2, R_2 - R_3, R_1 - R_3, R_1 - 2R_2. Coordinates of (2, 1, 4): (1, 0, 1); of \mathbf{e}_3: (1, -1, 1), the third column of Q^{-1}.
  5. Coordinates (3, 1). Both vectors satisfy the equation and are not multiples; the plane has dimension 2. Matching c_1(1, 2, 0) + c_2(0, 1, 1) = (c_1, 2c_1 + c_2, c_2) gives c_1 = 3, c_2 = 1, and 6 + 1 = 7. (1, 1, 1) gives 2 - 1 + 1 = 2 \neq 0, so it is not in the plane.
  6. (0, 5) and (2, -4). With P_{\mathcal{B}}^{-1} from Example 1, the coordinates are (-1, 2), \left(\tfrac{7}{5}, \tfrac{1}{5}\right) and (2, -2); only integer coordinates are corners.
  7. By Result 3, \sum a_i\mathbf{x}_i = \mathbf{0} exactly when \sum a_i[\mathbf{x}_i]_{\mathcal{B}} = [\mathbf{0}]_{\mathcal{B}} = \mathbf{0}, since the map is linear and only \mathbf{0} has zero coordinates. So the two lists have the same dependence relations.
  8. \mathbf{b}_j = 0\mathbf{b}_1 + \dots + 1\mathbf{b}_j + \dots + 0\mathbf{b}_n, and by Result 1 these weights are the coordinates. Column j of P_{\mathcal{B}}^{-1} is P_{\mathcal{B}}^{-1}\mathbf{e}_j = [\mathbf{e}_j]_{\mathcal{B}} by Result 2.
  9. [(7, 11)]_{\mathcal{B}'} = (3, 2). The same combination with the terms listed in the other order, so the two entries of [\mathbf{x}]_{\mathcal{B}} always swap.
  10. a(2, 1) + b(4, 2) = (2a + 4b, a + 2b) always has first entry twice the second, and (5, 5) does not: existence fails, because the list does not span. (6, 3) = 3(2, 1) = 1(2, 1) + 1(4, 2): uniqueness fails, because the list is dependent.
  11. P_{\mathcal{C} \leftarrow \mathcal{B}} = \begin{bmatrix} -1 & 2 \\ 2 & 1 \end{bmatrix}, columns [(1, 2)]_{\mathcal{C}} and [(3, 1)]_{\mathcal{C}}, since (1, 2) = -(1, 0) + 2(1, 1) and (3, 1) = 2(1, 0) + (1, 1). [\mathbf{x}]_{\mathcal{C}} = (-4, 3), and -4(1, 0) + 3(1, 1) = (-1, 3) as in Exercise 1.
  12. \displaystyle P_{\mathcal{B} \leftarrow \mathcal{C}} = \frac{1}{5}\begin{bmatrix} -1 & 2 \\ 2 & 1 \end{bmatrix}, the inverse of the matrix in Exercise 11 (-1 - 4 = -5). Coordinates (1, 1): the vector is (1, 0) + 3(1, 1) = (4, 3) = (1, 2) + (3, 1).
  13. P_{\mathcal{Q} \leftarrow \mathcal{W}} = \begin{bmatrix} 1 & -3 & -2 \\ 0 & 3 & 1 \\ 0 & -2 & 0 \end{bmatrix}, by the operations of Exercise 4 on \begin{bmatrix} Q & P_{\mathcal{W}} \end{bmatrix}. [\mathbf{x}]_{\mathcal{Q}} = (-11, 9, -4); check, Q(-11, 9, -4) = (3, 5, 4).
  14. \displaystyle P_{\mathcal{D} \leftarrow \mathcal{B}} = \frac{1}{2}\begin{bmatrix} 1 & -2 \\ 3 & 4 \end{bmatrix}, from \displaystyle P_{\mathcal{D}}^{-1} = \frac{1}{2}\begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix} times P_{\mathcal{B}}. Coordinates (-2, 9): -2(1, -1) + 9(1, 1) = (7, 11).
  15. \displaystyle P_{\mathcal{D} \leftarrow \mathcal{C}} = P_{\mathcal{D}}^{-1}P_{\mathcal{C}} = \frac{1}{2}\begin{bmatrix} 0 & -1 \\ 2 & 3 \end{bmatrix}. Times \begin{bmatrix} 3 & -1 \\ -1 & 2 \end{bmatrix} it gives \displaystyle \frac{1}{2}\begin{bmatrix} 1 & -2 \\ 3 & 4 \end{bmatrix}.
  16. \mathcal{D} = \{(5, 3), (3, 2)\}: \mathbf{d}_1 = 2(1, 0) + 3(1, 1) and \mathbf{d}_2 = (1, 0) + 2(1, 1). The matrix has 4 - 3 = 1 \neq 0, so \mathcal{D} is a basis.
  17. \displaystyle P_{\mathcal{C} \leftarrow \mathcal{B}} = \frac{1}{2}\begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}: (1, 2, 0) = \tfrac{1}{2}(1, 1, -1) + \tfrac{1}{2}(1, 3, 1) and (0, 1, 1) = -\tfrac{1}{2}(1, 1, -1) + \tfrac{1}{2}(1, 3, 1). [\mathbf{x}]_{\mathcal{C}} = (1, 2): \mathbf{x} = (3, 7, 1) = (1, 1, -1) + 2(1, 3, 1).
  18. I satisfies [\mathbf{x}]_{\mathcal{B}} = I[\mathbf{x}]_{\mathcal{B}}, and Result 4 says only one matrix does, so P_{\mathcal{B} \leftarrow \mathcal{B}} = I. The product P_{\mathcal{D} \leftarrow \mathcal{C}}P_{\mathcal{C} \leftarrow \mathcal{B}} sends [\mathbf{x}]_{\mathcal{B}} to P_{\mathcal{D} \leftarrow \mathcal{C}}[\mathbf{x}]_{\mathcal{C}} = [\mathbf{x}]_{\mathcal{D}} for every \mathbf{x}, so by uniqueness it is P_{\mathcal{D} \leftarrow \mathcal{B}}. Taking \mathcal{D} = \mathcal{B} gives P_{\mathcal{B} \leftarrow \mathcal{C}}P_{\mathcal{C} \leftarrow \mathcal{B}} = I, and swapping the roles gives the other order.
  19. If P_{\mathcal{C} \leftarrow \mathcal{B}} = I, column j says [\mathbf{b}_j]_{\mathcal{C}} = \mathbf{e}_j, so \mathbf{b}_j = \mathbf{c}_j for each j. A change-of-coordinates matrix has an inverse by Result 5, so a matrix without one is not such a matrix.
  20. [\mathbf{x}]_{\mathcal{B}} = \mathbf{x} for all \mathbf{x} means P_{\mathcal{B}}^{-1} = I (compare columns, using \mathbf{x} = \mathbf{e}_j), so P_{\mathcal{B}} = I and \mathbf{b}_j = \mathbf{e}_j. Conversely the standard basis has P_{\mathcal{B}} = I.
kg1128 · updated 2026-10-22 · CC-BY-SA-4.0