Appendix B β Math Foundations for Computer Vision
βYou donβt need to re-derive everything β but you need to know enough to read a paper and debug a model.β
Linear Algebra for CV
Planned content: Vectors and norms. Matrix multiplication:
[M, K] Γ [K, N] β [M, N]. Dot product as similarity. Cosine similarity. Outer product. Transpose. Inverse (and when it doesnβt exist). Eigendecomposition:Av = Ξ»v. SVD:A = UΞ£Vα΅β PCA, low-rank approximation. Rank. Determinant. Trace. Why these matter: attention is matrix multiplication, PCA is SVD, cosine similarity is used everywhere.
π Planned diagram: Matrix multiplication visualization β
[M, K] Γ [K, N]as dot products, showing row Γ column = element.
Convolution as Matrix Operations
Planned content: 2D convolution expressed as matrix multiplication (im2col trick): rearrange input patches into rows of a matrix, stack filter weights as rows β one matrix multiplication. Why PyTorch uses im2col + GEMM under the hood. Relationship to cross-correlation (convolution without flip). Fourier transform of convolution = element-wise multiplication.
π Planned diagram: im2col transformation β how a
3Γ3sliding window over a5Γ5feature map is rearranged into a matrix for fast GEMM.
Probability and Statistics
Planned content: Probability distributions: Gaussian, Categorical, Bernoulli, Beta. Maximum Likelihood Estimation (MLE). Bayesβ theorem. KL divergence:
D_KL(P||Q) = Ξ£ P log(P/Q). Jensen-Shannon divergence. Entropy. Cross-entropy as negative log-likelihood. ELBO (Evidence Lower Bound) for VAEs. Monte Carlo estimation.
π Planned diagram: KL divergence visualization β two distributions P and Q, showing where KL measures their difference.
Calculus and Optimization
Planned content: Chain rule: the backbone of backpropagation. Gradient descent:
ΞΈ β ΞΈ - Ξ· β_ΞΈ L. Stochastic gradient descent. Momentum. Adam/AdamW. Second-order methods (briefly). The Jacobian:βoutput/βinputfor a vector-valued function. Hessian and its role in optimization landscape. Why flat minima generalize better.
π Planned diagram: Backpropagation through a convolutional layer β showing how gradients flow from loss β output β kernel weights.
Geometry for CV
Planned content: Homogeneous coordinates. Projection matrix. Rotation matrices and SO(3). Quaternions for rotation. Rigid body transforms (rotation + translation). Fundamental and Essential matrices (stereo). Epipolar geometry. Camera calibration (intrinsics + extrinsics). Homography estimation.
π Planned diagram: Camera coordinate systems β world frame β camera frame β image plane β pixel coordinates, with transformation matrices at each step.
Fourier Transform for CV
Planned content: Discrete Fourier Transform (DFT). Frequency domain: low (coarse structure) vs. high (edges, texture) frequencies. 2D DFT of an image. Convolution theorem:
conv(f, g) = IDFT(DFT(f) Β· DFT(g)). Applications: fast convolution, frequency-based analysis, NeRF positional encoding.
π Planned diagram: Image and its 2D DFT magnitude spectrum β showing center = DC (low frequency), edges = high frequency. Filtered reconstructions.
Information Theory Basics
Planned content: Entropy:
H(X) = -Ξ£ p log p. Cross-entropy:H(P, Q) = -Ξ£ P log Q. Mutual information. Why cross-entropy = NLL of categorical distribution. The AUC-ROC area and information theory connection.
Last updated: May 2026