A basis turns every vector into a list of numbers, its coordinate vector $[\mathbf{x}]_{\mathcal B}$. Changing the basis changes the list — by multiplying by a change-of-coordinates matrix $P_{\mathcal C\leftarrow\mathcal B}$.
A street address only makes sense once you know the street plan; a GPS position only makes sense once you know which reference frame it is measured in. Vectors are the same. The numbers we write for a vector depend on the basis we use to describe it. The standard basis is convenient for writing things down, but it is often not the best basis for thinking: an engineer studying a tilted ramp prefers axes along and across the slope, an audio engineer prefers "sum and difference" of the two stereo channels, and an image-compression algorithm prefers a basis in which most coordinates are almost zero.
In Section 5.3 we saw that a basis gives each vector a unique list of weights. This section turns those weights into a tool. We define the coordinate vector $[\mathbf{x}]_{\mathcal B}$, show how a single matrix converts between standard and $\mathcal B$-coordinates, and then how to move between any two bases — the algebra behind rotated axes, colour spaces and data compression.
Coordinates Relative to a Basis
📘 Definition 5.9 — Coordinate vector
Let $\mathcal B=\{\mathbf{b}_1,\dots,\mathbf{b}_n\}$ be a basis of a vector space $V$, and let $\mathbf{x}\in V$. The coordinates of $\mathbf{x}$ relative to $\mathcal B$ (the $\mathcal B$-coordinates) are the unique weights $c_1,\dots,c_n$ with $\mathbf{x}=c_1\mathbf{b}_1+\dots+c_n\mathbf{b}_n$. The vector in $\mathbb{R}^n$
$$[\mathbf{x}]_{\mathcal B}=\begin{bmatrix}c_1\\\vdots\\c_n\end{bmatrix}$$
is the coordinate vector of $\mathbf{x}$ relative to $\mathcal B$, and the map $\mathbf{x}\mapsto[\mathbf{x}]_{\mathcal B}$ is the coordinate mapping determined by $\mathcal B$.
The weights are unique by Theorem 5.11, which is exactly why the definition makes sense. Notice that the order of the basis vectors matters: swapping $\mathbf{b}_1$ and $\mathbf{b}_2$ swaps $c_1$ and $c_2$. For the standard basis $\mathcal E=\{\mathbf{e}_1,\dots,\mathbf{e}_n\}$ of $\mathbb{R}^n$, $[\mathbf{x}]_{\mathcal E}=\mathbf{x}$.
✏️ Example 1 — From coordinates to the vector
Let $\mathcal B=\{\mathbf{b}_1,\mathbf{b}_2\}$ with $\mathbf{b}_1=\begin{bmatrix}1\\1\end{bmatrix}$, $\mathbf{b}_2=\begin{bmatrix}-1\\2\end{bmatrix}$. If $[\mathbf{x}]_{\mathcal B}=\begin{bmatrix}3\\2\end{bmatrix}$, find $\mathbf{x}$.
💡 Show solution▶
Meaning $[\mathbf{x}]_{\mathcal B}=(3,2)$ means "$3$ steps of $\mathbf{b}_1$, then $2$ steps of $\mathbf{b}_2$".
Matrix form The same computation is $\begin{bmatrix}1&-1\\1&2\end{bmatrix}\begin{bmatrix}3\\2\end{bmatrix}=\begin{bmatrix}1\\7\end{bmatrix}$: the matrix whose columns are the basis vectors converts $\mathcal B$-coordinates into standard coordinates.
The change-of-coordinates matrix $P_{\mathcal B}$
📐 Theorem 5.21 — Converting between $\mathcal B$-coordinates and standard coordinates in $\mathbb{R}^n$
Let $\mathcal B=\{\mathbf{b}_1,\dots,\mathbf{b}_n\}$ be a basis of $\mathbb{R}^n$ and let $P_{\mathcal B}=\begin{bmatrix}\mathbf{b}_1&\mathbf{b}_2&\cdots&\mathbf{b}_n\end{bmatrix}$, the change-of-coordinates matrix from $\mathcal B$ to the standard basis. Then $P_{\mathcal B}$ is invertible and, for every $\mathbf{x}\in\mathbb{R}^n$,
$$\mathbf{x}=P_{\mathcal B}[\mathbf{x}]_{\mathcal B},\qquad [\mathbf{x}]_{\mathcal B}=P_{\mathcal B}^{-1}\mathbf{x}.$$
Why. $P_{\mathcal B}[\mathbf{x}]_{\mathcal B}=c_1\mathbf{b}_1+\dots+c_n\mathbf{b}_n=\mathbf{x}$ by the definition of matrix–vector multiplication. The columns of $P_{\mathcal B}$ form a basis of $\mathbb{R}^n$, so $P_{\mathcal B}$ is invertible by the Invertible Matrix Theorem (Theorem 5.20). In practice, to find $[\mathbf{x}]_{\mathcal B}$ we usually row reduce $[P_{\mathcal B}\,|\,\mathbf{x}]$ rather than compute $P_{\mathcal B}^{-1}$.
✏️ Example 2 — From the vector to its coordinates
Let $\mathcal B=\left\{\begin{bmatrix}1\\0\\1\end{bmatrix},\begin{bmatrix}1\\1\\0\end{bmatrix},\begin{bmatrix}0\\1\\1\end{bmatrix}\right\}$ and $\mathbf{x}=\begin{bmatrix}4\\3\\5\end{bmatrix}$. Find $[\mathbf{x}]_{\mathcal B}$.
💡 Show solution▶
Set up Solve $P_{\mathcal B}\mathbf{c}=\mathbf{x}$: $$\left[\begin{array}{ccc|c}1&1&0&4\\0&1&1&3\\1&0&1&5\end{array}\right]\xrightarrow{R_3\to R_3-R_1}\left[\begin{array}{ccc|c}1&1&0&4\\0&1&1&3\\0&-1&1&1\end{array}\right]\xrightarrow{R_3\to R_3+R_2}\left[\begin{array}{ccc|c}1&1&0&4\\0&1&1&3\\0&0&2&4\end{array}\right].$$
Back-substitute $c_3=2$, $c_2=3-c_3=1$, $c_1=4-c_2=3$. So $[\mathbf{x}]_{\mathcal B}=\begin{bmatrix}3\\1\\2\end{bmatrix}$.
Check $3(1,0,1)+1(1,1,0)+2(0,1,1)=(4,3,5)$. ✓
Interactive 1 — Two Views of the Same Vector
Left: the ordinary plane with a basis $\mathbf{b}_1$ (red), $\mathbf{b}_2$ (blue) and its slanted grid. Right: the same plane "seen through $\mathcal B$" — the coordinate mapping straightens the slanted grid into a square one, and $\mathbf{x}$ lands at $[\mathbf{x}]_{\mathcal B}$. Drag $\mathbf{x}$ or the tips of $\mathbf{b}_1$, $\mathbf{b}_2$ on the left (they snap to a half-unit grid), or press Play.
The coordinate mapping is just as useful in spaces such as $P_n$ or $M_{m\times n}$: once a basis is fixed, every polynomial or matrix becomes a column of numbers, and every computation can be done in $\mathbb{R}^n$.
📐 Theorem 5.22 — The coordinate mapping
Let $\mathcal B$ be a basis of an $n$-dimensional vector space $V$. The coordinate mapping $\mathbf{x}\mapsto[\mathbf{x}]_{\mathcal B}$ from $V$ to $\mathbb{R}^n$ is one-to-one, onto $\mathbb{R}^n$, and linear:
$$[\mathbf{u}+\mathbf{w}]_{\mathcal B}=[\mathbf{u}]_{\mathcal B}+[\mathbf{w}]_{\mathcal B},\qquad[c\mathbf{u}]_{\mathcal B}=c[\mathbf{u}]_{\mathcal B}\quad\text{for all }\mathbf{u},\mathbf{w}\in V,\ c\in\mathbb{R}.$$
Consequently, a set in $V$ is linearly independent (or spans $V$) exactly when the set of its coordinate vectors does so in $\mathbb{R}^n$.
This is the theorem that justified our trick in Section 5.3 of replacing polynomials by their coefficient columns. (A one-to-one, onto, linear map is called an isomorphism — Chapter 6 studies such maps.)
✏️ Example 3 — Coordinates of a polynomial
$\mathcal B=\{1,\ 1+x,\ 1+x+x^2\}$ is a basis of $P_2$. Find $[p]_{\mathcal B}$ for $p(x)=3+2x-x^2$.
Solve Compare coefficients from the top: $c_3=-1$; $c_2+c_3=2\Rightarrow c_2=3$; $c_1+c_2+c_3=3\Rightarrow c_1=1$. So $[p]_{\mathcal B}=\begin{bmatrix}1\\3\\-1\end{bmatrix}$.
Check $1+3(1+x)-(1+x+x^2)=3+2x-x^2$. ✓
Changing Between Two Bases
Suppose a vector is known in $\mathcal B$-coordinates and we want its coordinates relative to another basis $\mathcal C$. We could go via the standard basis, but there is a single matrix that does the whole job. Since the coordinate mapping is linear,
$$[\mathbf{x}]_{\mathcal C}=[c_1\mathbf{b}_1+\dots+c_n\mathbf{b}_n]_{\mathcal C}=c_1[\mathbf{b}_1]_{\mathcal C}+\dots+c_n[\mathbf{b}_n]_{\mathcal C}=\begin{bmatrix}[\mathbf{b}_1]_{\mathcal C}&\cdots&[\mathbf{b}_n]_{\mathcal C}\end{bmatrix}[\mathbf{x}]_{\mathcal B}.$$
📐 Theorem 5.23 — Change of basis
Let $\mathcal B=\{\mathbf{b}_1,\dots,\mathbf{b}_n\}$ and $\mathcal C=\{\mathbf{c}_1,\dots,\mathbf{c}_n\}$ be bases of a vector space $V$. There is a unique $n\times n$ matrix $P_{\mathcal C\leftarrow\mathcal B}$ such that
$$[\mathbf{x}]_{\mathcal C}=P_{\mathcal C\leftarrow\mathcal B}\,[\mathbf{x}]_{\mathcal B}\quad\text{for every }\mathbf{x}\in V .$$
Its columns are the $\mathcal C$-coordinate vectors of the vectors of $\mathcal B$: $\ P_{\mathcal C\leftarrow\mathcal B}=\begin{bmatrix}[\mathbf{b}_1]_{\mathcal C}&[\mathbf{b}_2]_{\mathcal C}&\cdots&[\mathbf{b}_n]_{\mathcal C}\end{bmatrix}$. It is invertible, and $\left(P_{\mathcal C\leftarrow\mathcal B}\right)^{-1}=P_{\mathcal B\leftarrow\mathcal C}$.
Read the arrow from right to left: $P_{\mathcal C\leftarrow\mathcal B}$ eats $\mathcal B$-coordinates and produces $\mathcal C$-coordinates. When $\mathcal C$ is the standard basis $\mathcal E$ of $\mathbb{R}^n$, $P_{\mathcal E\leftarrow\mathcal B}=P_{\mathcal B}$.
🧭 Problem-solving strategy — finding $P_{\mathcal C\leftarrow\mathcal B}$ in $\mathbb{R}^n$
Each column $[\mathbf{b}_j]_{\mathcal C}$ solves $P_{\mathcal C}\mathbf{y}=\mathbf{b}_j$. All $n$ systems have the same coefficient matrix, so solve them together.
Form the $n\times2n$ matrix $\begin{bmatrix}\mathbf{c}_1&\cdots&\mathbf{c}_n&|&\mathbf{b}_1&\cdots&\mathbf{b}_n\end{bmatrix}$ and row reduce: $$\begin{bmatrix}\ \mathcal C\ \,|\,\ \mathcal B\ \end{bmatrix}\ \sim\ \begin{bmatrix}\ I\ \,|\,\ P_{\mathcal C\leftarrow\mathcal B}\ \end{bmatrix}.$$
Check one column: $P_{\mathcal C}\times(\text{column } j)$ should equal $\mathbf{b}_j$.
For the reverse direction, use $P_{\mathcal B\leftarrow\mathcal C}=\left(P_{\mathcal C\leftarrow\mathcal B}\right)^{-1}$, or row reduce $[\,\mathcal B\,|\,\mathcal C\,]$.
✏️ Example 4 — Change of basis between two non-standard bases
In $\mathbb{R}^2$ let $\mathcal B=\{\mathbf{b}_1,\mathbf{b}_2\}$ with $\mathbf{b}_1=\begin{bmatrix}1\\3\end{bmatrix}$, $\mathbf{b}_2=\begin{bmatrix}2\\1\end{bmatrix}$ and $\mathcal C=\{\mathbf{c}_1,\mathbf{c}_2\}$ with $\mathbf{c}_1=\begin{bmatrix}1\\1\end{bmatrix}$, $\mathbf{c}_2=\begin{bmatrix}1\\2\end{bmatrix}$. (a) Find $P_{\mathcal C\leftarrow\mathcal B}$. (b) If $[\mathbf{x}]_{\mathcal B}=\begin{bmatrix}2\\1\end{bmatrix}$, find $[\mathbf{x}]_{\mathcal C}$. (c) Find $P_{\mathcal B\leftarrow\mathcal C}$.
💡 Show solution▶
(a) Row reduce $$\left[\begin{array}{cc|cc}1&1&1&2\\1&2&3&1\end{array}\right]\xrightarrow{R_2\to R_2-R_1}\left[\begin{array}{cc|cc}1&1&1&2\\0&1&2&-1\end{array}\right]\xrightarrow{R_1\to R_1-R_2}\left[\begin{array}{cc|cc}1&0&-1&3\\0&1&2&-1\end{array}\right],$$ so $P_{\mathcal C\leftarrow\mathcal B}=\begin{bmatrix}-1&3\\2&-1\end{bmatrix}$.
(b) $$[\mathbf{x}]_{\mathcal C}=\begin{bmatrix}-1&3\\2&-1\end{bmatrix}\begin{bmatrix}2\\1\end{bmatrix}=\begin{bmatrix}1\\3\end{bmatrix}.$$ Check through standard coordinates: $\mathbf{x}=2\mathbf{b}_1+\mathbf{b}_2=(4,7)$ and $\mathbf{c}_1+3\mathbf{c}_2=(1+3,\ 1+6)=(4,7)$ ✓.
(c) $\det P_{\mathcal C\leftarrow\mathcal B}=1-6=-5$, so $$P_{\mathcal B\leftarrow\mathcal C}=\left(P_{\mathcal C\leftarrow\mathcal B}\right)^{-1}=\frac{1}{-5}\begin{bmatrix}-1&-3\\-2&-1\end{bmatrix}=\begin{bmatrix}\tfrac15&\tfrac35\\[2pt]\tfrac25&\tfrac15\end{bmatrix}.$$ Check: it sends $(1,3)$ back to $\left(\tfrac15+\tfrac95,\ \tfrac25+\tfrac35\right)=(2,1)$ ✓.
⚠️ Common mistakes with change of basis
1. Putting the bases the wrong way round. Row reduce $[\,\mathcal C\,|\,\mathcal B\,]$ to get $P_{\mathcal C\leftarrow\mathcal B}$ — the target basis goes on the left. Getting it backwards gives the inverse matrix.
2. Confusing $\mathbf{x}$ with $[\mathbf{x}]_{\mathcal B}$. In Example 4, $[\mathbf{x}]_{\mathcal B}=(2,1)$ but $\mathbf{x}=(4,7)$. Always label which basis a list of numbers refers to.
3. Using $P_{\mathcal B}$ instead of $P_{\mathcal B}^{-1}$. $P_{\mathcal B}$ takes $\mathcal B$-coordinates to standard coordinates; to find $\mathcal B$-coordinates you need $P_{\mathcal B}^{-1}$ (or a row reduction).
Applications: Rotated Axes and Better Bases for Data
If the coordinate axes are rotated anticlockwise through an angle $\theta$, the new axes point along the unit vectors $\mathbf{u}_1=(\cos\theta,\sin\theta)$ and $\mathbf{u}_2=(-\sin\theta,\cos\theta)$. With $\mathcal B=\{\mathbf{u}_1,\mathbf{u}_2\}$, the point with standard coordinates $(x,y)$ has new coordinates $(x',y')=[\mathbf{x}]_{\mathcal B}$. Here $P_{\mathcal B}$ is a rotation matrix, and its inverse is simply its transpose (Chapter 8 explains why), so
$$\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}\begin{bmatrix}x'\\y'\end{bmatrix},\qquad\begin{bmatrix}x'\\y'\end{bmatrix}=\begin{bmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}.$$
✏️ Example 5 — Axes along a ramp
A ramp rises $3$ m for every $4$ m of horizontal run, so its angle $\theta$ satisfies $\cos\theta=\tfrac45$, $\sin\theta=\tfrac35$. Take new axes along the ramp ($x'$) and perpendicular to it ($y'$). (a) A point is at $(5,10)$ m in ordinary coordinates. Find its ramp coordinates. (b) A point has ramp coordinates $(5,-5)$ m. Find its ordinary coordinates.
💡 Show solution▶
Basis $\mathbf{u}_1=\left(\tfrac45,\tfrac35\right)$, $\mathbf{u}_2=\left(-\tfrac35,\tfrac45\right)$, so $P_{\mathcal B}=\dfrac15\begin{bmatrix}4&-3\\3&4\end{bmatrix}$ and $P_{\mathcal B}^{-1}=P_{\mathcal B}^{T}=\dfrac15\begin{bmatrix}4&3\\-3&4\end{bmatrix}$.
(a) $$\begin{bmatrix}x'\\y'\end{bmatrix}=\frac15\begin{bmatrix}4&3\\-3&4\end{bmatrix}\begin{bmatrix}5\\10\end{bmatrix}=\frac15\begin{bmatrix}20+30\\-15+40\end{bmatrix}=\begin{bmatrix}10\\5\end{bmatrix}\ \text{m}:$$ $10$ m along the ramp and $5$ m above it.
Check Rotation preserves length: $\sqrt{5^2+10^2}=\sqrt{125}=\sqrt{10^2+5^2}$ ✓ and $\sqrt{7^2+1^2}=\sqrt{50}=\sqrt{5^2+5^2}$ ✓.
Interactive 2 — The Rotated-Axes Converter
The point $P$ stays fixed while the green axes $x'$, $y'$ rotate through $\theta$. The dashed segments drop from $P$ perpendicular to each new axis, and their feet give the new coordinates $(x',y')$. Press Play to sweep $\theta$ from $0^\circ$ to $90^\circ$, or set the angle of Example 5.
angle $\theta$—
$(x,y)$—
$(x',y')$—
$P_{\mathcal B}^{-1}=P_{\mathcal B}^{T}$—
Rotations are not the only useful change of basis. Whenever the standard coordinates of some data are strongly related to each other, a different basis can separate "what is common" from "what is different".
✏️ Example 6 — A brightness–colour basis for RGB colours
A screen colour is a vector $(R,G,B)$ of red, green and blue intensities ($0$–$255$). Use the basis $\mathcal W=\{\mathbf{w},\mathbf{r},\mathbf{y}\}$ with $\mathbf{w}=(1,1,1)$ ("grey level"), $\mathbf{r}=(1,-1,0)$ ("red versus green") and $\mathbf{y}=(1,1,-2)$ ("yellow versus blue"). (a) Find $[\mathbf{x}]_{\mathcal W}$ for the brown colour $\mathbf{x}=(200,120,40)$. (b) Halve the two colour coordinates (keeping the grey level) and convert back. What happens to the colour?
💡 Show solution▶
Shortcut The three basis vectors are mutually perpendicular ($\mathbf{w}\cdot\mathbf{r}=0$, $\mathbf{w}\cdot\mathbf{y}=0$, $\mathbf{r}\cdot\mathbf{y}=1-1+0=0$). Dotting $\mathbf{x}=a\mathbf{w}+b\mathbf{r}+c\mathbf{y}$ with each basis vector isolates one coefficient: $$a=\frac{\mathbf{x}\cdot\mathbf{w}}{\mathbf{w}\cdot\mathbf{w}},\quad b=\frac{\mathbf{x}\cdot\mathbf{r}}{\mathbf{r}\cdot\mathbf{r}},\quad c=\frac{\mathbf{x}\cdot\mathbf{y}}{\mathbf{y}\cdot\mathbf{y}}.$$ (Row reducing $[\,\mathcal W\,|\,\mathbf{x}\,]$ gives the same answer; Chapter 8 develops this shortcut.)
(b) $120\mathbf{w}+20\mathbf{r}+20\mathbf{y}=(120+20+20,\ 120-20+20,\ 120-40)=(160,120,80)$. The average brightness is unchanged ($120$) but the colour is less saturated — a greyer brown. Image editors' "saturation" sliders and video formats such as YCbCr work in bases of this kind.
8 Write $p$ in powers of $u=x-1$ ($x=u+1$): $1+4(u+1)+3(u+1)^2=1+4u+4+3u^2+6u+3=8+10u+3u^2$. So $[p]_{\mathcal B}=(8,10,3)$. Check: $8+10(x-1)+3(x-1)^2=1+4x+3x^2$ ✓.
II
The change-of-coordinates matrix $P_{\mathcal B}$.
1 For $\mathcal B=\{(3,1),(5,2)\}$, write down $P_{\mathcal B}$, find $P_{\mathcal B}^{-1}$, and use it to find $[\mathbf{x}]_{\mathcal B}$ for $\mathbf{x}=(1,1)$.
2 With the same $\mathcal B$, find $[\mathbf{x}]_{\mathcal B}$ for $\mathbf{x}=(4,-2)$.
3 Explain why $P_{\mathcal B}$ is always invertible when $\mathcal B$ is a basis of $\mathbb{R}^n$.
4 For which basis $\mathcal B$ of $\mathbb{R}^n$ is $P_{\mathcal B}=I_n$?
5 If $[\mathbf{x}]_{\mathcal B}=\mathbf{0}$, what is $\mathbf{x}$? Why?
3 Its columns are $n$ independent vectors in $\mathbb{R}^n$, so $\operatorname{rank}P_{\mathcal B}=n$ and the Invertible Matrix Theorem applies.
4 Only the standard basis $\{\mathbf{e}_1,\dots,\mathbf{e}_n\}$ in its usual order, because the columns of $P_{\mathcal B}$ are the basis vectors.
5 $\mathbf{x}=0\mathbf{b}_1+\dots+0\mathbf{b}_n=\mathbf{0}$. The coordinate mapping is one-to-one, so $\mathbf{0}$ is the only vector with zero coordinates.
III
Change of basis between two bases.
1 $\mathcal B=\{(1,2),(1,3)\}$ and $\mathcal C=\{(1,0),(1,1)\}$. Find $P_{\mathcal C\leftarrow\mathcal B}$.
2 For the bases of part 1, find $P_{\mathcal B\leftarrow\mathcal C}$.
3 For the bases of part 1, if $[\mathbf{x}]_{\mathcal B}=(2,-1)$, find $[\mathbf{x}]_{\mathcal C}$ and $\mathbf{x}$.
4 In $\mathbb{R}^3$ let $\mathcal C=\{(1,0,0),(1,1,0),(1,1,1)\}$ and $\mathcal B=\{(1,2,3),(0,1,1),(2,0,1)\}$. Find $P_{\mathcal C\leftarrow\mathcal B}$.
5 In $P_2$ let $\mathcal B=\{1,x,x^2\}$ and $\mathcal C=\{1,\ 1+x,\ 1+x+x^2\}$. Find $P_{\mathcal C\leftarrow\mathcal B}$.
6 Use part 5 to find $[q]_{\mathcal C}$ for $q(x)=3-2x+4x^2$.
7 Show that if $\mathcal A$, $\mathcal B$, $\mathcal C$ are bases of $V$, then $P_{\mathcal A\leftarrow\mathcal C}=P_{\mathcal A\leftarrow\mathcal B}P_{\mathcal B\leftarrow\mathcal C}$.
Check: row reduce $[\,\mathcal C\,|\,\mathcal B\,]$ in $\mathbb{R}^2$ (exact fractions)
$P_{\mathcal C\leftarrow\mathcal B}$—
$P_{\mathcal B\leftarrow\mathcal C}$—
💡 Show solutions▶
1 $\left[\begin{array}{cc|cc}1&1&1&1\\0&1&2&3\end{array}\right]\xrightarrow{R_1\to R_1-R_2}\left[\begin{array}{cc|cc}1&0&-1&-2\\0&1&2&3\end{array}\right]$, so $P_{\mathcal C\leftarrow\mathcal B}=\begin{bmatrix}-1&-2\\2&3\end{bmatrix}$. (Check: $-(1,0)+2(1,1)=(1,2)$ ✓.)
2 $\det=-3+4=1$, so $P_{\mathcal B\leftarrow\mathcal C}=\begin{bmatrix}3&2\\-2&-1\end{bmatrix}$.
4 For any $\mathbf{v}=(v_1,v_2,v_3)$: $[\mathbf{v}]_{\mathcal C}=(v_1-v_2,\ v_2-v_3,\ v_3)$ (solve from the bottom). Applying this to each $\mathbf{b}_j$: $$P_{\mathcal C\leftarrow\mathcal B}=\begin{bmatrix}-1&-1&2\\-1&0&-1\\3&1&1\end{bmatrix}.$$ Check column 1: $-(1,0,0)-(1,1,0)+3(1,1,1)=(1,2,3)$ ✓.
5 $1=1\cdot\mathbf{c}_1$; $x=(1+x)-1$; $x^2=(1+x+x^2)-(1+x)$. So $$P_{\mathcal C\leftarrow\mathcal B}=\begin{bmatrix}1&-1&0\\0&1&-1\\0&0&1\end{bmatrix}.$$
7 For every $\mathbf{x}$: $P_{\mathcal A\leftarrow\mathcal B}P_{\mathcal B\leftarrow\mathcal C}[\mathbf{x}]_{\mathcal C}=P_{\mathcal A\leftarrow\mathcal B}[\mathbf{x}]_{\mathcal B}=[\mathbf{x}]_{\mathcal A}$. The matrix $P_{\mathcal A\leftarrow\mathcal C}$ is the unique matrix with this property (apply both to $[\mathbf{c}_j]_{\mathcal C}=\mathbf{e}_j$ to compare columns), so the two are equal. Taking $\mathcal A=\mathcal C$ shows $P_{\mathcal C\leftarrow\mathcal B}P_{\mathcal B\leftarrow\mathcal C}=I$.
IV
Applications.
1 The axes are rotated through $\theta=45^\circ$. Find the new coordinates $(x',y')$ of the point $(2,4)$.
2 Axes are rotated through the angle with $\cos\theta=\tfrac{5}{13}$, $\sin\theta=\tfrac{12}{13}$. Find the new coordinates of $(13,0)$.
3 With the axes of part 2, find the ordinary coordinates of the point whose new coordinates are $(1,1)$.
4 Rotate the axes through $45^\circ$ and rewrite the curve $xy=1$ in the new coordinates. What kind of curve is it?
5Audio. A stereo sample has left and right voltages $(L,R)=(0.8,\ 0.2)$ V. In the "mid–side" basis $\{(1,1),(1,-1)\}$ find its coordinates (the mid and side signals).
6Colour. Using the basis $\mathcal W$ of Example 6, find the coordinates of the colour $(90,150,60)$ and say which coordinate is negative and what that means.
7Data compression. The Haar basis of $\mathbb{R}^4$ is $\{(1,1,1,1),\ (1,1,-1,-1),\ (1,-1,0,0),\ (0,0,1,-1)\}$. Find the Haar coordinates of the four pixel brightnesses $(6,4,5,1)$.
4 $x=\dfrac{x'-y'}{\sqrt2}$, $y=\dfrac{x'+y'}{\sqrt2}$, so $xy=\dfrac{x'^2-y'^2}{2}=1$, i.e. $x'^2-y'^2=2$: a hyperbola whose axes are the new coordinate axes.
5 $m+s=0.8$, $m-s=0.2$: mid $m=0.5$ V, side $s=0.3$ V. (Mid is the average of the channels; side measures how different they are — FM radio and many audio codecs transmit these.)
6 $a=\tfrac{300}{3}=100$, $b=\tfrac{90-150}{2}=-30$, $c=\tfrac{90+150-120}{6}=20$: $[\mathbf{x}]_{\mathcal W}=(100,-30,20)$. Check: $100(1,1,1)-30(1,-1,0)+20(1,1,-2)=(90,150,60)$ ✓. The negative "red versus green" coordinate means the colour leans towards green.
7 The Haar vectors are mutually perpendicular, so $c_1=\tfrac{6+4+5+1}{4}=4$, $c_2=\tfrac{6+4-5-1}{4}=1$, $c_3=\tfrac{6-4}{2}=1$, $c_4=\tfrac{5-1}{2}=2$. Coordinates $(4,1,1,2)$. Check: $4(1,1,1,1)+(1,1,-1,-1)+(1,-1,0,0)+2(0,0,1,-1)=(6,4,5,1)$ ✓. The first coordinate is the average brightness; the others record differences — in smooth images they are small and can be stored with few bits.
🔬 Research–Teaching NexusResearch-tutored · optional, about 30 minutes
Research question. How can a change of basis make a digital image smaller without visibly changing it?
Why it matters. Photos, video calls, medical scans and satellite images are all compressed before they are stored or sent. Formats such as JPEG and JPEG 2000 change each block of pixels to a new basis (cosine or wavelet vectors) in which most coordinates are close to zero, then store only the large ones. The Haar basis is the simplest wavelet basis and shows the whole idea in a few lines of arithmetic.
What to do.
Sample case: one row of eight grey levels from a photo is $52,55,61,66,70,61,64,73$. Split it into two blocks of four: $(52,55,61,66)$ and $(70,61,64,73)$.
Find the Haar coordinates of each block (Exercise IV.7 shows the method).
"Compress": set to zero every coordinate with absolute value less than $2$, then convert back to pixel values with $P_{\mathcal B}$.
Count how many numbers you kept and find the largest error in grey levels. Would a viewer notice an error of that size on a $0$–$255$ scale?
Tools: Calculator or spreadsheet; optionally Python with numpy on a real greyscale image
Hand in: A half-page note with both coordinate vectors, the reconstructed pixels, the number of stored values and the maximum error, plus one sentence on the trade-off between size and quality.
Going further. Repeat with thresholds $1$, $3$ and $5$ and plot "values kept" against "maximum error". Look up how JPEG uses the discrete cosine basis on $8\times8$ blocks.
Instructor note: block 1 has Haar coordinates $\left(\tfrac{117}{2},-5,-\tfrac32,-\tfrac52\right)$ and block 2 has $\left(67,-\tfrac32,\tfrac92,-\tfrac92\right)$. Dropping the two coordinates $-\tfrac32$ leaves $6$ of $8$ values and reconstructs $(53.5,53.5,61,66)$ and $(71.5,62.5,62.5,71.5)$ — a maximum error of $1.5$ grey levels. Students should see that the basis, not the data, was changed.
🧪 Self-check quiz
0/5 correct
Q1. For $\mathcal B=\{(1,1),(1,-1)\}$ and $\mathbf{x}=(3,1)$, $[\mathbf{x}]_{\mathcal B}=$
Q2. The columns of $P_{\mathcal B}$ are
Q3. Row reducing $[\,\mathcal C\,|\,\mathcal B\,]$ to $[\,I\,|\,M\,]$ gives $M=$
Q4. If $[\mathbf{x}]_{\mathcal C}=P_{\mathcal C\leftarrow\mathcal B}[\mathbf{x}]_{\mathcal B}$, then $[\mathbf{x}]_{\mathcal B}=$
Q5. In $P_1$ with $\mathcal B=\{1+x,\ 1-x\}$, the coordinate vector of $p(x)=2+3x$ is