In linear algebra, a complement to a subspace of a vector space is another subspace which forms an internal direct sum. Two such spaces are mutually complementary.
Formally, if U is a subspace of V, then W is a complement of U if and only if V is the direct sum of U and W, , that is:
Equivalently, every element of V can be expressed uniquely as a sum of an element of U and an element of W. The complementarity relation is symmetric, that is, if W is a complement of U then U is also a complement of W.
If V is finite-dimensional then for complementary subspaces U, W we have
In general a subspace does not have a unique complement (although the zero subspace and V itself are the unique complements each of the other). However, if V is in addition an inner product space, then there is a unique orthogonal complement