Skip to content

subspace

linear-algebra · scripts/linear-algebra/subspace.m

: theta = subspace (A, B)

Largest principal angle (in radians) between the ranges of A and B.

The columns of the two matrices span the subspaces and need not be orthonormal. The angle is computed from the projection residual, which is accurate also for very small angles.