ECE 57000 — September 11, 2026
Next question: When can we recover an input from its transformed output?
\[ \operatorname{rank}(A)=\#\{j:\sigma_j>0\}\le\min(m,d) \]
For example:
\[ \Sigma=\begin{bmatrix}3&0&0\\0&1&0\\0&0&0\end{bmatrix} \qquad\Longrightarrow\qquad \operatorname{rank}(A)=2 \]
The null space contains all directions that map to zero:
\[ \operatorname{null}(A)=\{\boldsymbol{h}:A\boldsymbol{h}=\boldsymbol{0}\}. \]
For any nonzero \(\boldsymbol{h}\in\operatorname{null}(A)\):
\(\displaystyle A(\boldsymbol{x}+\boldsymbol{h})\)
\(=\)
\(\displaystyle A\boldsymbol{x}+A\boldsymbol{h}\)
(Distributivity)
\(\,\)
\(=\)
\(\displaystyle A\boldsymbol{x}\)
(Null direction)
In 1D, \(y=ax\) can be undone by \(x=y/a\) exactly when \(a\ne0\).
For square \(A=U\Sigma V^T\in\mathbb{R}^{d\times d}\):
\[ \text{all }\sigma_j>0 \quad\Longrightarrow\quad A^{-1}=V\Sigma^{-1}U^T, \qquad \Sigma^{-1}=\operatorname{diag}(1/\sigma_1,\ldots,1/\sigma_d). \]
\(\displaystyle A^{-1}A\)
\(=\)
\(\displaystyle (V\Sigma^{-1}U^T)(U\Sigma V^T)\)
(Substitute)
\(\,\)
\(=\)
\(\displaystyle V\Sigma^{-1}\Sigma V^T\)
(\(U^TU=I_d\))
\(\,\)
\(=\)
\(\displaystyle VV^T\)
(\(\Sigma^{-1}\Sigma=I_d\))
\(\,\)
\(=\)
\(\displaystyle I_d\)
(\(VV^T=I_d\))
\(\boldsymbol{y}=A\boldsymbol{x}\) maps \(d\) input coordinates to \(m\) output coordinates.
Recovering every \(\boldsymbol{x}\in\mathbb{R}^d\) requires \(\operatorname{rank}(A)=d\).
For any \(A=U\Sigma V^T\in\mathbb{R}^{m\times d}\), define:
\[ \underbrace{A^\dagger}_{d\times m} =\underbrace{V}_{d\times d}\underbrace{\Sigma^\dagger}_{d\times m}\underbrace{U^T}_{m\times m}. \]
\(\Sigma^\dagger\) has the transposed shape of \(\Sigma\), with zero off-diagonal entries:
\[ (\Sigma^\dagger)_{jj}= \begin{cases} 1/\sigma_j, & \sigma_j>0,\\ 0, & \sigma_j=0. \end{cases} \]
For \(\boldsymbol{y}=A\boldsymbol{x}\), recovery of every input means:
\[ \widehat{\boldsymbol{x}}=A^\dagger\boldsymbol{y}=\boldsymbol{x} \ \text{for all }\boldsymbol{x}\in\mathbb{R}^d \quad\Longleftrightarrow\quad A^\dagger A=I_d. \]
Let \(r=\operatorname{rank}(A)\) and \(V_r=[\boldsymbol{v}_1\;\cdots\;\boldsymbol{v}_r]\) contain its surviving input directions.
\(\displaystyle A^\dagger A\)
\(=\)
\(\displaystyle V\Sigma^\dagger U^TU\Sigma V^T\)
(Substitute)
\(\,\)
\(=\)
\(\displaystyle V(\Sigma^\dagger\Sigma)V^T\)
(\(U^TU=I_m\))
\(\,\)
\(=\)
\(\displaystyle V_rV_r^T\)
(Keep nonzero directions)
\(\Sigma^\dagger\Sigma\) has \(r\) diagonal ones and \(d-r\) zeros. Thus \(A^\dagger A=I_d\) exactly when \(r=d\): full column rank, requiring \(m\ge d\).
Inputs: \(\boldsymbol{x}=t\boldsymbol{u}\in\mathbb{R}^2\), \(\|\boldsymbol{u}\|_2=1\). Encoder: \(A=\boldsymbol{v}^T\), with \(\alpha=\boldsymbol{v}^T\boldsymbol{u}\ne0\).
Decode with \(B=\boldsymbol{u}/\alpha\): knowing the line lets us undo its nonzero scaling.
\[ \widehat{\boldsymbol{x}}=By=\frac{\boldsymbol{u}}{\alpha}(\alpha t)=t\boldsymbol{u}=\boldsymbol{x}. \]
If \(\boldsymbol{v}=\boldsymbol{u}\), then \(\alpha=1\), \(y=t\), and \(B=A^\dagger=\boldsymbol{u}\). In general, \(B\ne A^\dagger\).
A sensor-processing system uses \(A=U\operatorname{diag}(4,1,0)V^T\).
Can you recover every sensor input? What is the largest possible stretching factor? Could this operator preserve every pairwise distance? Explain which input direction is invisible to the system.
Rank \(2\); recovery is impossible in general; maximum scaling is \(4\). The direction \(\boldsymbol{v}_3\) disappears. All distances cannot be preserved.
What if the inputs are close to a line, but do not lie exactly on it?
\[ y=\boldsymbol{u}^T\boldsymbol{x},\qquad \widehat{\boldsymbol{x}}=\boldsymbol{u}y,\qquad \text{error}=\|\boldsymbol{x}-\widehat{\boldsymbol{x}}\|_2^2. \]
Which direction minimizes total reconstruction error?
David I. Inouye
Dynamic Content · Last Updated: September 11, 2026
Return to the cells described by many measured features.
What reconstruction error are we willing to accept in exchange for fewer features?
We will turn “reconstruct the data well” into a problem involving one matrix.
1. Define what a good reconstruction means — Next
Choose a representation size and measure reconstruction error.
2. Choose a convenient decoder basis.
An orthonormal basis can represent the same reconstruction subspace.
3. Find the best encoder for that decoder.
The closest point in the subspace determines the coordinates.
4. Formulate the subspace choice.
Combine these results into the PCA optimization problem.
For notation simplicity, we now call the raw data \(\widetilde X\) and the centered data \(X\).
\[ \boldsymbol{\mu}=\frac1n\sum_{i=1}^n\widetilde{\boldsymbol{x}}_i, \qquad X=\widetilde X-\boldsymbol{1}_n\boldsymbol{\mu}^T. \]
Add the mean back to reconstruct raw measurements: \(\widehat{\widetilde{\boldsymbol{x}}}_i=\boldsymbol{\mu}+\widehat{\boldsymbol{x}}_i\).
For one centered observation, use the same operator convention as \(\boldsymbol{y}=A\boldsymbol{x}\):
\[ \boldsymbol{z}_i=\underbrace{E}_{k\times d}\boldsymbol{x}_i, \qquad \widehat{\boldsymbol{x}}_i=\underbrace{D}_{d\times k}\boldsymbol{z}_i. \]
Stacking observations as rows gives:
\[ \underbrace{Z}_{n\times k} =\underbrace{X}_{n\times d}\underbrace{E^T}_{d\times k}, \qquad \underbrace{\widehat X}_{n\times d} =\underbrace{Z}_{n\times k}\underbrace{D^T}_{k\times d}. \]
The batch reconstruction is \(\widehat X=XE^TD^T\), with rank at most \(k\).
Choose a linear encoder and decoder to minimize squared reconstruction error:
\[ \min_{E,D}\|X-XE^TD^T\|_F^2. \]
The Frobenius norm measures the error across every entry:
\[ \|M\|_F^2=\sum_{i,j}M_{ij}^2, \qquad \|X-\widehat X\|_F^2 =\sum_{i=1}^n\|\boldsymbol{x}_i-\widehat{\boldsymbol{x}}_i\|_2^2. \]
We have an error measure. Now consider which reconstructions the decoder can produce.
1. Define what a good reconstruction means — Established
Choose a representation size and measure reconstruction error.
2. Choose a convenient decoder basis — Next
An orthonormal basis can represent the same reconstruction subspace.
3. Find the best encoder for that decoder.
The closest point in the subspace determines the coordinates.
4. Formulate the subspace choice.
Combine these results into the PCA optimization problem.
For a \(3\times2\) decoder, the familiar row dot products can be regrouped by column:
\[ \begin{bmatrix}d_{11}&d_{12}\\d_{21}&d_{22}\\d_{31}&d_{32}\end{bmatrix} \begin{bmatrix}z_1\\z_2\end{bmatrix} = \underbrace{\begin{bmatrix}d_{11}z_1+d_{12}z_2\\d_{21}z_1+d_{22}z_2\\d_{31}z_1+d_{32}z_2\end{bmatrix}}_{\text{one dot product per row}} = z_1\underbrace{\begin{bmatrix}d_{11}\\d_{21}\\d_{31}\end{bmatrix}}_{\boldsymbol{d}_1} +z_2\underbrace{\begin{bmatrix}d_{12}\\d_{22}\\d_{32}\end{bmatrix}}_{\boldsymbol{d}_2}. \]
For any number of columns: \(\widehat{\boldsymbol{x}}=D\boldsymbol{z}=\sum_{j=1}^k z_j\boldsymbol{d}_j\).
A line can use a unit vector \(\boldsymbol{u}\) or the scaled vector \(3\boldsymbol{u}\).
\[ \underbrace{\boldsymbol{u}}_{\text{unit basis}}\underbrace{t}_{\text{coordinate}} = \underbrace{(3\boldsymbol{u})}_{\text{scaled basis}}\underbrace{(t/3)}_{\text{adjusted coordinate}}. \]
Both describe the same point on the same line.
Both unit-vector pairs span the plane: either represents every \(\boldsymbol{x}=[x_1,x_2]^T\).
For \(\boldsymbol{b}_1=[1,0]^T\), \(\boldsymbol{b}_2=[1,1]^T/\sqrt2\):
\[ \boldsymbol{x}=(x_1-x_2)\boldsymbol{b}_1+\sqrt2\,x_2\boldsymbol{b}_2. \]
For \(\boldsymbol{w}_1=[1,0]^T\), \(\boldsymbol{w}_2=[0,1]^T\):
\[ \boldsymbol{x}=(\boldsymbol{w}_1^T\boldsymbol{x})\boldsymbol{w}_1 +(\boldsymbol{w}_2^T\boldsymbol{x})\boldsymbol{w}_2. \]
Same plane; simpler coordinates: an orthonormal basis gives each coefficient by a dot product.
Start with any encoder \(E_0\in\mathbb{R}^{k\times d}\) and decoder \(D_0\in\mathbb{R}^{d\times k}\), where \(k\le d\). Suppose \(D_0\) does not have orthonormal columns.
The thin QR decomposition writes \(D_0=WR\): \(W^TW=I_k\) and \(R\) is upper triangular. Here \(W\in\mathbb{R}^{d\times k}\) and \(R\in\mathbb{R}^{k\times k}\).
Can we choose \(D=W\) and a new \(E\) to keep every reconstruction the same?
\(\displaystyle D_0E_0\boldsymbol{x}\)
\(=\)
\(\displaystyle (WR)E_0\boldsymbol{x}\)
(QR of the original decoder)
\(\,\)
\(=\)
\(\displaystyle W(RE_0)\boldsymbol{x}\)
(Regroup the factors)
\(\,\)
\(=\)
\(\displaystyle DE\boldsymbol{x}\)
(Choose \(D=W\), \(E=RE_0\))
Same reconstruction for every input: an orthonormal decoder is without loss of generality. Next, fix \(D=W\) and find its best encoder.