Unit 1, lesson 7

Direct Sums and Projections

Direct sums and why their vectors split uniquely, how a complementary subspace defines a projection, why idempotent maps are exactly these projections, and how oblique projections differ from orthogonal ones.

  • Video 7
  • Sums, Direct Sums and Projections

Split the vector (3,2)(3, 2) in the plane into a piece on the horizontal axis and a piece on the line y=xy = x. There is only one way to do it, namely (1,0)+(2,2)(1, 0) + (2, 2), so the horizontal piece is (1,0)(1, 0) and not the perpendicular shadow (3,0)(3, 0). Keeping that horizontal piece is still a projection, only not a perpendicular one. This lesson finds the exact condition for such a split to be unique, builds the projection it defines, and shows that the linear maps from a space to itself with P2=PP^2 = P are precisely these projections.

Key terms

Uniqueness of decomposition

Definition Let UU and WW be subspaces of a vector space VV over F\mathbb{F}, where F\mathbb{F} is R\mathbb{R} or C\mathbb{C}. A decomposition of v∈Vv \in V along UU and WW is a way of writing v=u+wv = u + w with u∈Uu \in U and w∈Ww \in W. Assume U+W=VU + W = V, so that every vector of VV has at least one decomposition. Then every vector of VV has exactly one decomposition if and only if

U∩W={0}.U \cap W = \{0\}.

The space VV need not be finite-dimensional. For the proof, suppose first that U∩W={0}U \cap W = \{0\} and v=u1+w1=u2+w2v = u_1 + w_1 = u_2 + w_2. Then u1−u2=w2−w1u_1 - u_2 = w_2 - w_1 lies in UU and in WW, so it is 00, which gives u1=u2u_1 = u_2 and w1=w2w_1 = w_2. Conversely, suppose decompositions are unique and let c∈U∩Wc \in U \cap W. Then 0=0+00 = 0 + 0 and 0=c+(−c)0 = c + (-c) are both decompositions of 00, with c∈Uc \in U and −c∈W-c \in W. By uniqueness they agree, so c=0c = 0. The hypothesis U+W=VU + W = V supplies existence and cannot be dropped. Zero intersection by itself only says that a vector has at most one decomposition.

In plain words Two different splits of the same vector differ by a vector that both subspaces contain. If zero is the only such vector, the split cannot change. So it is enough to check that 0=u+w0 = u + w with u∈Uu \in U and w∈Ww \in W forces u=0u = 0 and w=0w = 0.

Example Tuples such as (x,y,z)(x, y, z) stand for column vectors. In R3\mathbb{R}^3 let UU be the xyxy-plane and WW the xzxz-plane. Their sum is R3\mathbb{R}^3, but they share the xx-axis, and indeed

(1,2,3)=(1,2,0)+(0,0,3)=(0,2,0)+(1,0,3).\begin{aligned} (1, 2, 3) &= (1, 2, 0) + (0, 0, 3) \\[0.4em] &= (0, 2, 0) + (1, 0, 3). \end{aligned}

The two UU parts differ by (1,0,0)(1, 0, 0), a vector in U∩WU \cap W. Existence can fail in the opposite way. The xx-axis and the yy-axis of R3\mathbb{R}^3 meet only in 00, yet their sum is the xyxy-plane, and (0,0,1)(0, 0, 1) has no decomposition along them at all.

Direct sum

Definition Let UU and WW be subspaces of a vector space VV over F\mathbb{F}, where F\mathbb{F} is R\mathbb{R} or C\mathbb{C}. The space VV is the direct sum of UU and WW, written

V=U⊕W,V = U \oplus W,

when U+W=VU + W = V and U∩W={0}U \cap W = \{0\}. By the theorem on uniqueness of decomposition this means that every v∈Vv \in V can be written in exactly one way as v=u+wv = u + w with u∈Uu \in U and w∈Ww \in W. Equivalently, the addition map from the product space U×WU \times W to VV, sending (u,w)(u, w) to u+wu + w, is a linear bijection. It is surjective exactly when U+W=VU + W = V, and its kernel is the set of pairs (c,−c)(c, -c) with c∈U∩Wc \in U \cap W.

If VV is finite-dimensional, the dimension formula

dim⁡(U+W)=dim⁡U+dim⁡W−dim⁡(U∩W)\begin{aligned} &\dim(U + W) \\[0.4em] &\quad = \dim U + \dim W \\[0.4em] &\qquad - \dim(U \cap W) \end{aligned}

gives dim⁡V=dim⁡U+dim⁡W\dim V = \dim U + \dim W for a direct sum, and a basis of UU followed by a basis of WW is a basis of VV. Conversely, still with VV finite-dimensional, if U∩W={0}U \cap W = \{0\} and dim⁡U+dim⁡W=dim⁡V\dim U + \dim W = \dim V, then U+WU + W is a subspace of VV with the full dimension, so U+W=VU + W = V and the sum is direct.

In plain words A direct sum cuts the whole space into two subspaces that share nothing but zero, so every vector has one UU part and one WW part. The word direct refers to this uniqueness. It says nothing about the two subspaces meeting at a right angle.

Example In R2\mathbb{R}^2 let U=span⁡{(1,0)}U = \operatorname{span}\{(1, 0)\} and W=span⁡{(1,1)}W = \operatorname{span}\{(1, 1)\}. Every vector splits as

(x,y)=(x−y,0)+(y,y),(x, y) = (x - y, 0) + (y, y),

so U+W=R2U + W = \mathbb{R}^2. If a(1,0)=b(1,1)a(1, 0) = b(1, 1), the second entries give b=0b = 0 and then a=0a = 0, so U∩W={0}U \cap W = \{0\}. Hence R2=U⊕W\mathbb{R}^2 = U \oplus W and 1+1=21 + 1 = 2, although the two lines meet at a 45∘45^\circ angle. The vector (3,2)(3, 2) splits as (1,0)+(2,2)(1, 0) + (2, 2). Direct sums are not limited to arrows. The real n×nn \times n matrices are the direct sum of the symmetric and the skew-symmetric matrices, through

A=12(A+AT)+12(A−AT),\begin{aligned} A &= \tfrac{1}{2}\big(A + A^{\mathsf{T}}\big) \\[0.4em] &\quad + \tfrac{1}{2}\big(A - A^{\mathsf{T}}\big), \end{aligned}

and a matrix that is both satisfies A=AT=−AA = A^{\mathsf{T}} = -A, so A=0A = 0. For n=2n = 2,

[1243]=[1333]+[0−110],\begin{aligned} \begin{bmatrix} 1 & 2 \\ 4 & 3 \end{bmatrix} &= \begin{bmatrix} 1 & 3 \\ 3 & 3 \end{bmatrix} \\[0.4em] &\quad + \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}, \end{aligned}

and the dimensions add up as 3+1=43 + 1 = 4.

Complementary subspace

Definition Let UU be a subspace of a vector space VV over F\mathbb{F}, where F\mathbb{F} is R\mathbb{R} or C\mathbb{C}. A subspace WW of VV is a complement of UU in VV, or complementary to UU, if V=U⊕WV = U \oplus W. The relation is symmetric, so UU is then also a complement of WW. If VV is finite-dimensional, every subspace UU has a complement. One comes from extending a basis u1,…,uku_1, \dots, u_k of UU to a basis u1,…,uk,w1,…,wmu_1, \dots, u_k, w_1, \dots, w_m of VV and taking

W=span⁡{w1,…,wm}.W = \operatorname{span}\{w_1, \dots, w_m\}.

The full list spans VV, so U+W=VU + W = V, and a nonzero vector in both subspaces would give a nontrivial linear relation among the basis vectors, so U∩W={0}U \cap W = \{0\}. In a finite-dimensional VV every complement of UU has dimension dim⁡V−dim⁡U\dim V - \dim U. If U={0}U = \{0\}, its only complement is VV, and if U=VU = V, its only complement is {0}\{0\}. Otherwise there are infinitely many. If u≠0u \ne 0 lies in UU and w1,…,wmw_1, \dots, w_m is a basis of one complement, then span⁡{w1+tu,w2,…,wm}\operatorname{span}\{w_1 + tu, w_2, \dots, w_m\} is a complement for every scalar tt, and different values of tt give different complements.

In plain words A complement supplies exactly the directions that UU is missing, with no overlap. It is a subspace, not the set of vectors outside UU, which does not even contain 00. Nothing requires it to be perpendicular to UU.

Example In R2\mathbb{R}^2 let UU be the xx-axis. A line span⁡{(a,b)}\operatorname{span}\{(a, b)\} with (a,b)≠(0,0)(a, b) \ne (0, 0) is a complement of UU exactly when b≠0b \ne 0. Then (a,b)(a, b) is not on the xx-axis, the two lines meet only in 00, and 1+1=21 + 1 = 2. So the yy-axis, the line y=xy = x and the line y=2xy = 2x are all complements of UU, and so is every other line through the origin except the xx-axis itself. In R3\mathbb{R}^3 a complement of the plane z=0z = 0 is any line through the origin that does not lie in that plane, such as span⁡{(1,1,1)}\operatorname{span}\{(1, 1, 1)\}.

Projection along a complement

Definition Let V=U⊕WV = U \oplus W, where VV is a vector space over F\mathbb{F} and F\mathbb{F} is R\mathbb{R} or C\mathbb{C}. For v∈Vv \in V let v=u+wv = u + w be its unique decomposition with u∈Uu \in U and w∈Ww \in W. The projection onto UU along WW is the map P ⁣:V→VP \colon V \to V given by P(v)=uP(v) = u. It has the following properties.

  1. The map PP is linear. If v=u+wv = u + w and v′=u′+w′v' = u' + w' are decompositions and a,b∈Fa, b \in \mathbb{F}, then

    av+bv′=(au+bu′)+(aw+bw′)\begin{aligned} av + bv' &= (au + bu') \\[0.4em] &\quad + (aw + bw') \end{aligned}

    with au+bu′∈Uau + bu' \in U and aw+bw′∈Waw + bw' \in W. By uniqueness this is the decomposition of av+bv′av + bv', so P(av+bv′)=aP(v)+bP(v′)P(av + bv') = aP(v) + bP(v').

  2. Every u∈Uu \in U satisfies P(u)=uP(u) = u and every w∈Ww \in W satisfies P(w)=0P(w) = 0. Hence im⁡P=U\operatorname{im} P = U and W⊆ker⁡PW \subseteq \ker P. Conversely, if P(v)=0P(v) = 0, then the UU part of vv is 00 and vv lies in WW, so ker⁡P=W\ker P = W.

  3. The square P2=P∘PP^2 = P \circ P equals PP, because P(v)P(v) already lies in UU, where PP acts as the identity.

The map I−PI - P, where II is the identity map of VV, sends vv to ww and is the projection onto WW along UU. The projection depends on WW as well as on UU. The same UU with a different complement gives a different map.

In plain words Split each vector into its UU part and its WW part, keep the UU part and discard the WW part. Vectors already in UU are kept as they are, so doing it a second time changes nothing.

Example For U=span⁡{(1,0)}U = \operatorname{span}\{(1, 0)\} and W=span⁡{(1,1)}W = \operatorname{span}\{(1, 1)\}, the split (x,y)=(x−y,0)+(y,y)(x, y) = (x - y, 0) + (y, y) gives P(x,y)=(x−y,0)P(x, y) = (x - y, 0). Its matrix and its square are

P=[1−100],P2=[1−100][1−100]=P.\begin{aligned} P &= \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix}, \\[0.4em] P^2 &= \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix} \\[0.4em] &= P. \end{aligned}

So P(3,2)=(1,0)P(3, 2) = (1, 0), and the discarded part (3,2)−(1,0)=(2,2)(3, 2) - (1, 0) = (2, 2) lies in WW. The output is zero exactly when x=yx = y, so ker⁡P=W\ker P = W. The complementary projection I−PI - P has rows (0,1)(0, 1) and (0,1)(0, 1) and sends (x,y)(x, y) to (y,y)(y, y), the WW part.

Idempotent map

Definition Let VV be a vector space over F\mathbb{F}, where F\mathbb{F} is R\mathbb{R} or C\mathbb{C}. A linear map P∈Hom⁡(V,V)P \in \operatorname{Hom}(V, V) is idempotent if P2=PP^2 = P, that is, P(P(v))=P(v)P(P(v)) = P(v) for every v∈Vv \in V. The theorem on idempotent maps says that if PP is idempotent, then

V=im⁡P⊕ker⁡P,V = \operatorname{im} P \oplus \ker P,

and P(x)=xP(x) = x for every x∈im⁡Px \in \operatorname{im} P. So PP is the projection onto im⁡P\operatorname{im} P along ker⁡P\ker P. Since every projection along a complement is idempotent, the idempotent linear maps from VV to itself are exactly the projections along complements. No finite-dimensional hypothesis is needed.

For the proof, write every v∈Vv \in V as

v=P(v)+(v−P(v)).v = P(v) + \big(v - P(v)\big).

The first term lies in im⁡P\operatorname{im} P, and P(v−P(v))=P(v)−P2(v)=0P\big(v - P(v)\big) = P(v) - P^2(v) = 0, so the second lies in ker⁡P\ker P. Hence im⁡P+ker⁡P=V\operatorname{im} P + \ker P = V. If z∈im⁡P∩ker⁡Pz \in \operatorname{im} P \cap \ker P, write z=P(x)z = P(x). Then z=P(x)=P2(x)=P(z)=0z = P(x) = P^2(x) = P(z) = 0. Finally, for x=P(y)x = P(y) in the image, P(x)=P2(y)=P(y)=xP(x) = P^2(y) = P(y) = x.

An image and a kernel that form a direct sum do not by themselves make a map a projection. On any nonzero VV the map T=2IT = 2I has image VV and kernel {0}\{0\}, which form a direct sum, yet T2=4I≠TT^2 = 4I \ne T. A linear map TT from VV to itself is idempotent exactly when it fixes every vector of its image, since T2(v)=T(T(v))T^2(v) = T\big(T(v)\big) and T(v)T(v) lies in the image.

In plain words An idempotent map does all its work the first time. Each vector splits into the part the map keeps and the part it sends to zero, and the two parts never overlap. What makes it a projection is that it leaves its own outputs alone.

Example Take the real matrix

P=[2−21−1].P = \begin{bmatrix} 2 & -2 \\ 1 & -1 \end{bmatrix}.

Multiplying row by column,

P2=[4−2−4+22−1−2+1]=P,P^2 = \begin{bmatrix} 4 - 2 & -4 + 2 \\ 2 - 1 & -2 + 1 \end{bmatrix} = P,

so PP is idempotent. Both columns are multiples of (2,1)(2, 1), so im⁡P=span⁡{(2,1)}\operatorname{im} P = \operatorname{span}\{(2, 1)\}. Both rows give x=yx = y for the kernel, so ker⁡P=span⁡{(1,1)}\ker P = \operatorname{span}\{(1, 1)\}. For v=(5,2)v = (5, 2) the split is

[52]=[63]+[−1−1],\begin{bmatrix} 5 \\ 2 \end{bmatrix} = \begin{bmatrix} 6 \\ 3 \end{bmatrix} + \begin{bmatrix} -1 \\ -1 \end{bmatrix},

where P(v)=(6,3)=3(2,1)P(v) = (6, 3) = 3(2, 1) is fixed by PP and (−1,−1)(-1, -1) is sent to 00. So PP is the projection onto the line through (2,1)(2, 1) along the line through (1,1)(1, 1).

Oblique projection

Definition Let PP be an idempotent real n×nn \times n matrix, so that Rn=im⁡P⊕ker⁡P\mathbb{R}^n = \operatorname{im} P \oplus \ker P, and use the dot product on Rn\mathbb{R}^n. The matrix PP is the orthogonal projection onto im⁡P\operatorname{im} P when every vector of ker⁡P\ker P is perpendicular to every vector of im⁡P\operatorname{im} P, that is, when ker⁡P=(im⁡P)⊥\ker P = (\operatorname{im} P)^{\perp}. The first condition says ker⁡P⊆(im⁡P)⊥\ker P \subseteq (\operatorname{im} P)^{\perp}, and this inclusion is an equality because both subspaces have dimension n−dim⁡im⁡Pn - \dim \operatorname{im} P. Otherwise PP is an oblique projection onto im⁡P\operatorname{im} P along ker⁡P\ker P. For an orthogonal projection the residual v−Pvv - Pv is perpendicular to im⁡P\operatorname{im} P, and PvPv is the point of im⁡P\operatorname{im} P closest to vv. Indeed, for every u∈im⁡Pu \in \operatorname{im} P the vector Pv−uPv - u also lies in im⁡P\operatorname{im} P, so the Pythagorean theorem gives

∥v−u∥2=∥v−Pv∥2+∥Pv−u∥2,\begin{aligned} \lVert v - u \rVert^2 &= \lVert v - Pv \rVert^2 \\[0.4em] &\quad + \lVert Pv - u \rVert^2, \end{aligned}

which is smallest exactly when u=Pvu = Pv. An oblique projection loses that property for some vectors, because some of its residuals are not perpendicular to the image.

Being a projection uses no inner product at all, while being orthogonal depends on the dot product. An idempotent real matrix is an orthogonal projection exactly when it is symmetric. If PT=PP^{\mathsf{T}} = P, then for x∈im⁡Px \in \operatorname{im} P and y∈ker⁡Py \in \ker P,

x⋅y=(Px)⋅y=x⋅(PTy)=x⋅(Py)=0.\begin{aligned} x \cdot y &= (Px) \cdot y = x \cdot (P^{\mathsf{T}} y) \\[0.4em] &= x \cdot (Py) = 0. \end{aligned}

Conversely, if ker⁡P\ker P is perpendicular to im⁡P\operatorname{im} P, splitting v′v' as Pv′+(v′−Pv′)Pv' + (v' - Pv') gives (Pv)⋅v′=(Pv)⋅(Pv′)(Pv) \cdot v' = (Pv) \cdot (Pv'), and in the same way v⋅(Pv′)=(Pv)⋅(Pv′)v \cdot (Pv') = (Pv) \cdot (Pv'). So (Pv)⋅v′=v⋅(Pv′)(Pv) \cdot v' = v \cdot (Pv') for all vv and v′v', which means PT=PP^{\mathsf{T}} = P. In particular an idempotent real matrix that is not symmetric is always oblique. Over C\mathbb{C}, with ⟨x,y⟩=x∗y\langle x, y \rangle = x^{*}y in place of the dot product, the same argument shows that an idempotent complex matrix is an orthogonal projection exactly when P∗=PP^{*} = P. Later lessons extend this to general inner products.

In plain words Every projection slides vectors along its kernel until they land in its image. An orthogonal projection always slides at a right angle to its image. An oblique one slides some vectors at a slant, and those vectors do not land on the nearest point.

Example Two different matrices project R2\mathbb{R}^2 onto the xx-axis,

Q=[1000],P=[1−100].\begin{aligned} Q &= \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \\[0.4em] P &= \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix}. \end{aligned}

The matrix QQ projects along the yy-axis and PP along the line y=xy = x. For v=(3,2)v = (3, 2), the orthogonal projection gives Qv=(3,0)Qv = (3, 0) with residual (0,2)(0, 2), which is perpendicular to the axis and has length 22. The oblique projection gives Pv=(1,0)Pv = (1, 0) with residual (2,2)(2, 2), which is not perpendicular to the axis, since (2,2)⋅(1,0)=2≠0(2, 2) \cdot (1, 0) = 2 \ne 0, and has length 22≈2.832\sqrt{2} \approx 2.83. The two maps have the same image but different kernels, so they are different maps, although they agree on the xx-axis. As the test predicts, QQ is symmetric and PP is not.

Check yourself

  1. Is R3\mathbb{R}^3 the direct sum of the plane z=0z = 0 and the line spanned by (1,1,1)(1, 1, 1)? If it is, decompose (2,3,5)(2, 3, 5).
Show the answer

Yes. A vector t(1,1,1)t(1, 1, 1) lies in the plane only when t=0t = 0, so the intersection is {0}\{0\}, and the dimensions add up as 2+1=32 + 1 = 3. So the sum is direct and equals R3\mathbb{R}^3. Write (2,3,5)=(a,b,0)+t(1,1,1)(2, 3, 5) = (a, b, 0) + t(1, 1, 1). The third entry forces t=5t = 5, and then a=−3a = -3 and b=−2b = -2, so

(2,3,5)=(−3,−2,0)+(5,5,5).\begin{aligned} (2, 3, 5) &= (-3, -2, 0) \\[0.4em] &\quad + (5, 5, 5). \end{aligned}
  1. The map T(x,y)=(2x,0)T(x, y) = (2x, 0) on R2\mathbb{R}^2 has the xx-axis as its image and the yy-axis as its kernel, and R2\mathbb{R}^2 is the direct sum of these two lines. Is TT the projection onto the xx-axis along the yy-axis?
Show the answer

No. Applying it twice gives T2(x,y)=T(2x,0)=(4x,0)T^2(x, y) = T(2x, 0) = (4x, 0), so T2≠TT^2 \ne T and the map is not idempotent. A projection fixes every vector of its image, but T(1,0)=(2,0)T(1, 0) = (2, 0). The projection onto the xx-axis along the yy-axis is (x,y)↦(x,0)(x, y) \mapsto (x, 0). An image and a kernel that form a direct sum are not enough to make a map a projection.

  1. Let UU be the plane x+y+z=0x + y + z = 0 in R3\mathbb{R}^3 and W=span⁡{(1,0,0)}W = \operatorname{span}\{(1, 0, 0)\}. Show that R3=U⊕W\mathbb{R}^3 = U \oplus W, find the matrix of the projection onto UU along WW, and decide whether it is an orthogonal projection.
Show the answer

The vector (1,0,0)(1, 0, 0) is not in UU, since 1+0+0≠01 + 0 + 0 \ne 0. So U∩W={0}U \cap W = \{0\}, and 2+1=32 + 1 = 3 gives R3=U⊕W\mathbb{R}^3 = U \oplus W. Write (x,y,z)=(x−t,y,z)+t(1,0,0)(x, y, z) = (x - t, y, z) + t(1, 0, 0). The first part lies in UU when (x−t)+y+z=0(x - t) + y + z = 0, so t=x+y+zt = x + y + z and P(x,y,z)=(−y−z,y,z)P(x, y, z) = (-y - z, y, z), with matrix

P=[0−1−1010001].P = \begin{bmatrix} 0 & -1 & -1 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}.

Each output lies in UU, and a vector of UU has x=−y−zx = -y - z, so PP fixes it. Hence P2=PP^2 = P, and P(x,y,z)=0P(x, y, z) = 0 exactly when y=z=0y = z = 0, so ker⁡P=W\ker P = W. For example P(1,2,3)=(−5,2,3)P(1, 2, 3) = (-5, 2, 3), and the discarded part (6,0,0)(6, 0, 0) lies in WW.

The projection is oblique. The kernel vector (1,0,0)(1, 0, 0) and the vector (−1,1,0)(-1, 1, 0) of UU have dot product −1≠0-1 \ne 0, and the matrix is not symmetric. The orthogonal projection onto UU moves along (1,1,1)(1, 1, 1) instead and sends (1,2,3)(1, 2, 3) to (−1,0,1)(-1, 0, 1).

How this lesson connects