← Back to Table of Contents

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Γ—3 sliding window over a 5Γ—5 feature 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/βˆ‚input for 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.

← Back to Table of Contents


Last updated: May 2026