Lecture 33
Auburn University
MATH 2660 - Spring 2026
April 6, 2026

Scan the QR code or go to join.iclicker.com/MBNJ.
Log in with our institution (Auburn - Mathematics & Statistics).
$$ % Colors
% Coordinate vectors and matrices
% Common sets
% Abstract vector symbols
% Norms / absolute value
% Optional: dot product spacing (looks nicer in slides)
% Operators $$
Image source: toward data science
To actually recognize digits, we build one SVD model for each digit \(d=0,1,\dots,9\).
For each digit \(d\), collect all training images with that label: \[ A_d=\begin{bmatrix} x^{(d)}_1 & x^{(d)}_2 & \cdots & x^{(d)}_{K_d} \end{bmatrix}\in\mathbb{R}^{784\times K_d}. \]
Step 1: Compute the mean image for digit \(d\) \[ \mu_d=\frac1{K_d}\sum_{j=1}^{K_d}x^{(d)}_j. \]
Step 2: Center the data \[ \widetilde A_d= \begin{bmatrix} x^{(d)}_1-\mu_d & x^{(d)}_2-\mu_d & \cdots & x^{(d)}_{K_d}-\mu_d \end{bmatrix}. \]
Step 3: Compute SVD \[ \widetilde A_d = U_d\Sigma_dV_d^T. \]
Step 4: Keep top \(r\) singular vectors \[ U_{d,r}=\begin{bmatrix}u^{(d)}_1 & \cdots & u^{(d)}_r\end{bmatrix}. \]
This defines a low-dimensional subspace for digit \(d\).
Now given a new image \(y\in\mathbb{R}^{784}\):
For each digit \(d=0,\dots,9\):
Step 5: Center using digit mean \[ z_d = y-\mu_d. \]
Step 6: Project onto subspace \[ p_d = U_{d,r}U_{d,r}^T z_d. \]
Step 7: Reconstruct \[ \widehat y_d = \mu_d + p_d. \]
Step 8: Compute reconstruction error \[ e_d = \|y-\widehat y_d\|_2 = \|z_d - U_{d,r}U_{d,r}^T z_d\|_2. \]
Step 9: Compare all errors \[ e_0, e_1, \dots, e_9 \]
Step 10: Predict label \[ \mathrm{label}(y) = \arg\min_{d} e_d. \]