The next result gives a simple condition for testing whether a sum of two subspaces is a direct sum.
Direct sum of two subspaces
Suppose and are subspaces of . Then
The symbol means “if and only if ”; this symbol could also be read to mean “is equivalent to”.
Proof.
First, we show that if we assume is a direct sum, we must have .
Suppose is a direct sum. Suppose some element is in both and , or . Then, we can write the zero vector as , where and . Since is a direct sum, the only way for us express as a sum of vectors from and is if both vectors are . Thus, we have . Thus, , completing the proof in one direction.
Now we want to prove the other direction; assuming that , we want to show that is a direct sum.
Suppose , and
To complete the proof, we only need to show that , which we showed above for the condition for direct sums. The equation above implies that . Since we are dealing with subspaces that are closed under scalar multiplication, means that as well, which in turn means . Since our beginning assumption was , we must have , which by the equation above implies that , completing the proof.
The result above deals only with the case of two subspaces. When asking about a possible direct sum with more than two subspaces, it is not enough to test that each pair of the subspaces intersect only at . To see this, consider the the non-direct sum example above. In that non-example of a direct sum, we have .