Choose a basis of , extend it to a basis of , and extend again to a basis of by adding . Define
Every member of the full basis lies in or , so the sum of vector subspaces is . If , express it in both displayed bases. Uniqueness of the coordinates in the full basis forces its and coefficients to vanish. Thus . The reverse inclusion is built into the construction, proving . This is a subspace supplement with a prescribed intersection.
For the matrix example, let
The skew-symmetric matrices are exactly , and the traceless matrices form . A suitable answer is
The matrix trace of is , so . Every real matrix has the decomposition
whose first term lies in and second in . Therefore , as required.