
Dimensionality Reduction: Motivation and Problem Setup
Suppose we measure 20,000 gene-expression values for each of 500 cells.
\(500\) cells \(\times\) \(20{,}000\) measurements per cell
Create a 2D view where we can look for:
Create a lower-dimensional representation that:
Both goals replace many measured features with fewer useful features.

This is a representation of handwritten digits—not cells—but it illustrates the kinds of clusters and other structure we might seek in cellular data.
A lower-dimensional representation can provide:
These benefits require the discarded variation to be less useful than the structure retained. Reduction is not automatically an improvement.
We seek a new representation with far fewer features:
high-dimensional observations \(\longrightarrow\) low-dimensional representation
But “make it simpler” does not say what a faithful simplification should retain.

Groups and neighborhoods. Keep nearby points close and distinct groups separate when those relationships matter.

Spread. Retain directions in which the observations vary rather than compressing meaningful variation.

Reconstruction. Prefer features that can recover points close to their original 2D locations when reconstruction matters.
How do we formalize these criteria?
We need the language of vectors, geometry, and linear transformations.
For cell \(i\), collect its \(d\) measured features into a vector:
\[ \boldsymbol{x}_i = \begin{bmatrix} x_{i1} & x_{i2} & \cdots & x_{id} \end{bmatrix}^{T} \in \mathbb{R}^{d} \]
Stack \(n\) observations as rows:
\[ X = \begin{bmatrix} ---\boldsymbol{x}_1^T---\\ ---\boldsymbol{x}_2^T---\\ \vdots\\ ---\boldsymbol{x}_n^T--- \end{bmatrix} \in \mathbb{R}^{n\times d} \]
rows \(=\) observations
columns \(=\) measured features

Both datasets have two measured features; only one needs two independent directions to describe its variation.
For each observation, seek
\[ f:\mathbb{R}^{d}\rightarrow\mathbb{R}^{k}, \qquad \boldsymbol{z}_i=f(\boldsymbol{x}_i), \qquad k\ll d, \]
where \(\boldsymbol{x}_i\in\mathcal{X}\subseteq\mathbb{R}^{d}\) contains the observed features and \(\boldsymbol{z}_i\in\mathcal{Z}\subseteq\mathbb{R}^{k}\) contains the reduced features.
For now, assume \(f\) is linear. Later, we will learn nonlinear representation functions—but linear transformations are the foundation for analyzing both.
To define, analyze, and choose this \(f\), we need linear algebra for geometry, transformations, and lower-dimensional structure.
We began with a need: make high-dimensional relationships inspectable without pretending every relationship survives.
We now have: