4.5.42 · D1Linear Algebra (Full)

Foundations — Pseudoinverse

2,624 words12 min readBack to topic

This page assumes nothing. Before you meet the pseudoinverse on the parent page, we build every symbol it uses — one brick at a time, each brick resting on the one before. We will hold off writing the pseudoinverse's own symbol until §6, once the plain inverse it copies is on the table.


1. What a matrix even is (a machine that moves arrows)

We measure a matrix by its shape: means " rows, columns, all real numbers". Read it as out-size in-size: it eats an -number arrow and produces an -number arrow.

Figure s01 — the machine picture. The violet arrow is your input ; the machine sends it to the magenta output arrow ; the dashed orange arrow shows the move performed. Keep this picture in mind: everything on this page is about how (and whether) that move can be reversed.

Figure — Pseudoinverse

2. Columns, and where the output can land (column space)

Here is the single most useful way to read . If has columns (each column is itself an arrow), then

What this says: the output is a weighted sum of the columns, and the numbers in are the weights. So can only ever produce arrows you can build by mixing its columns.

Figure s02 — the reachable sheet. The magenta and violet arrows are the two columns of . The pale orange cloud is every arrow you can build by mixing them: that cloud is the column space. The lone navy dot marked sits off the sheet — no mix of columns reaches it, so has no exact solution.

Figure — Pseudoinverse

3. Length of an arrow, and the norm symbol

To say "closest" we need to measure distance. For an arrow :

The symbol (length squared) drops the square root: . We prefer the squared version because it has no ugly root, and "smallest length" and "smallest length-squared" happen at the same place.


4. The dot product and right angles ()

Stacking a row against a column multiplies matching entries and adds them — this is the dot product:

Figure s03 — the right-angle test. The magenta arrow and violet arrow meet at a corner marked by the little orange square (the standard "right angle" symbol). Their dot product is exactly . Read the picture as: dot product zero perpendicular.

Figure — Pseudoinverse

5. Projection: the shadow onto the sheet

Put these together and you get the star player.

On the parent page you will read " is the orthogonal projection onto the column space" (the symbol is named in §6 below). It means: feeding through then through the fair-undo machine doesn't return itself; it returns the shadow of on the reachable sheet. See Orthogonal Projection for the full picture.

Recall Why "closest" and "perpendicular" are the same thing

Why is the shortest error the perpendicular one? ::: Any slanted line from to the sheet is the hypotenuse of a right triangle whose short leg is the perpendicular drop, and a hypotenuse is always longer than a leg — so perpendicular wins.


6. The plain inverse , and its fair sibling

fails to exist in two situations:

Situation What goes wrong Picture
Not square () in-size out-size, so no "same-size undo" is even shaped right a rectangle, not a square grid
Square but squishes two different inputs give the same output, so you can't tell them apart to reverse the machine flattens the plane onto a line

7. The nullspace and row space — why many inputs can give the same output

When the machine "squishes", several different input arrows collapse onto the same output. The directions that get squished flat to zero have a name.

Why this creates many solutions. Suppose solves your problem. Take any nullspace arrow (so ). Then so also solves it. A whole family of solutions, one per nullspace arrow! The pseudoinverse's job in this case is to pick the one shortest member of that family — see §3's minimum-norm idea.

Figure s04 — squish and shortest choice. The machine flattens the whole plane onto the magenta line (its column space); the violet dashed line is the nullspace (arrows squished to zero). All the navy dots are inputs giving the same output; the filled orange dot is the shortest one — it sits perpendicular to the nullspace, exactly the minimum-norm answer returns.

Figure — Pseudoinverse

8. Rank — how much the machine flattens

Rank labels the three cases the parent solves:

  • Full column rank (rank , tall & thin): columns all independent — nothing wasted going in, and the nullspace is just the zero arrow.
  • Full row rank (rank , short & fat): output can reach everything — many inputs do it, so a nontrivial nullspace forces the minimum-norm choice.
  • Rank-deficient: some directions collapse to zero; only the Singular Value Decomposition survives.

9. Singular values — the stretch factors

A means one direction of the ellipse got squashed flat to a point — information destroyed, and that squashed direction is exactly a nullspace direction from §7. You can undo a stretch by by dividing by unless , because you cannot un-squash a point back into a line (there's no ). That is the whole reason the SVD pseudoinverse "leaves zeros as zeros". The are the eigenvalues of — see Eigenvalues and Eigenvectors.


Prerequisite map

Vector = arrow

Matrix = arrow-moving machine

Column space = reachable sheet

Norm = arrow length

Dot product = right-angle test

Projection = closest shadow

Inverse = perfect undo

Nullspace = squished directions

Row space and left nullspace

Rank = independent directions

Singular values = stretch factors

Pseudoinverse A plus


Equipment checklist

Test yourself below. Each item is written as prompt ::: answer — read only the left side, say your answer aloud, then check against the right.

A vector is
a list of numbers drawn as an arrow from the origin to a point.
tells me
the machine eats an -number arrow and outputs an -number arrow ( rows, columns).
read through columns is
a weighted sum of 's columns, weights from .
The column space is
all arrows reachable by mixing (scaling + adding) the columns of .
means
the length of arrow , , from Pythagoras.
means
the two arrows are perpendicular (meet at a right angle).
The normal equations come from
the error being perpendicular to every column, i.e. , giving .
Orthogonal projection of onto a sheet is
the point on the sheet closest to ; the leftover error is perpendicular to the sheet.
exists only when
is square and loses no information (doesn't squish two inputs together).
(the pseudoinverse) is
the best-possible replacement for that exists for every matrix; equals when that exists.
The nullspace of is
all input arrows with — the directions the machine squishes to zero.
Why do many solutions appear?
if and , then too — a whole family, one per nullspace arrow.
The row space is
the sheet swept by 's rows (the column space of ); sends outputs back into it.
The rank of is
the number of independent directions its columns span = dimension of the column space.
A singular value is
how much stretches along one natural direction; means that direction is squashed flat (a nullspace direction).
Why can't we invert a zero singular value?
dividing by zero is undefined and you cannot un-squash a flattened direction — that information is gone.

Connections