Lecture 24 · Week 6· 13:14

The dimension formula

The dim(U + W) formula, forced intersections, complements.

Play: Lecture 24: The dimension formula
Lecture · 13:14 · Open on YouTube · Report a problem with this video
TranscriptThe full text of the lecture. Click any sentence to play the video from there.

Today: two planes meet in a line

Welcome back. In lecture twenty two we combined two subspaces U and W of a vector space V in two ways: the sum U plus W, made of all vectors u plus w, and the intersection, made of the vectors that lie in both. Both are subspaces again. Today we ask how their dimensions are related. Take two planes through the origin in three dimensional space: the floor, where z is zero, and the wall, where x is zero. Each plane has dimension two, so together they bring two plus two, which is four directions. But the whole space has dimension only three. Where did the extra direction go?

The answer: the two planes share a line. That line is counted once in the floor, and again in the wall. Two plus two, minus the one shared direction, gives three. Here is the plan. We state and prove the dimension formula, which makes this count exact. We use it to find intersections, and to recognise direct sums. And we finish with complements: how to split a space into a subspace and a partner.

The dimension formula

Here is the theorem. Let U and W be finite dimensional subspaces of a vector space V over a field F. Then U plus W is finite dimensional, and the dimension of U plus W equals the dimension of U, plus the dimension of W, minus the dimension of U intersect W. Think of it as counting directions. Adding the dimensions of U and W counts the shared directions twice, once in each space. Subtracting the dimension of the intersection removes the double count. Check it on the two planes. The floor contains e one and e two, and the wall contains e three, so together they span the whole space, of dimension three.

So the formula says that the intersection has dimension two plus two minus three, which is one: a line. And indeed, the vectors in both planes are those with z equal to zero and x equal to zero. They are the multiples of e two. The theorem holds in any vector space, as long as U and W are finite dimensional. The space V itself may even be infinite dimensional, like the space of all polynomials.

Proof of the dimension formula

The proof builds one list that serves all three spaces at once. It is demanding, so take it slowly, and pause or rewatch it if you need to. The intersection is a subspace of U, and U is finite dimensional, so by lecture twenty three the intersection is finite dimensional too. Take a basis of it: x one up to x k. This list is independent and lies in U. By lecture twenty three, it extends to a basis of U: x one up to x k, followed by new vectors u one up to u m. So the dimension of U is k plus m.

In the same way, it extends to a basis of W: x one up to x k, followed by new vectors w one up to w p. So the dimension of W is k plus p. We claim that the whole list, the x's, the u's and the w's together, is a basis of U plus W. Then the dimension of U plus W is k plus m plus p. And that is k plus m, plus k plus p, minus k: exactly the formula. First, the list spans. Every vector in U plus W is u plus w, with u in U and w in W. Here u is a combination of the x's and the u's, and w is a combination of the x's and the w's. Add them, and we get a combination of the whole list. This also shows that U plus W is finite dimensional.

Second, the list is independent. Suppose a combination of it is zero: the sum of a i x i, plus the sum of b i u i, plus the sum of c i w i, equals zero. Move the w part to the other side. The sum of c i w i equals minus the sum of a i x i, minus the sum of b i u i. The left side lies in W, and the right side lies in U. So this vector lies in both: it is in the intersection. So it is a combination of the basis of the intersection: the sum of c i w i equals the sum of d i x i, for some scalars d i. Then the sum of d i x i, minus the sum of c i w i, is zero. The x's and the w's form a basis of W, so they are independent, and every c i is zero.

With the c's gone, we are left with the sum of a i x i, plus the sum of b i u i, equals zero. The x's and the u's form a basis of U, so every a i and every b i is zero too. So the whole list is independent. It is a basis of U plus W, and the formula is proved.

Using the formula

The formula ties four numbers together, so if we know three of them, we get the fourth. Here is an example in four dimensional space. Let U be spanned by u one, which is (one, zero, one, zero), and u two, which is (zero, one, zero, one). Let W be spanned by w one, which is (one, one, zero, zero), and w two, which is (zero, zero, one, one). In each pair, neither vector is a multiple of the other. So each pair is independent, and both U and W have dimension two.

A vector lies in the intersection when it is a u one plus b u two, and also c w one plus d w two. The first is the vector (a, b, a, b), and the second is the vector (c, c, d, d). Compare them entry by entry. In the first entry, a equals c. In the second, b equals c. In the third, a equals d. And in the fourth, b equals d. So all four scalars are equal. So the intersection consists of the multiples of the vector (one, one, one, one), and it has dimension one. Indeed, u one plus u two gives this vector, and so does w one plus w two.

Now the formula gives the rest. The dimension of U plus W is two plus two minus one, which is three. So the four vectors span only a three dimensional subspace, not all of four dimensional space. One direction is lost to the overlap. The same count works for polynomials. In P two, the polynomials of degree at most two, let U be spanned by one and x, and let W be spanned by x and x squared. Each of them has dimension two. Their sum contains one, x and x squared, so it is all of P two, with dimension three. So the intersection has dimension two plus two minus three, which is one. It contains x, so it consists exactly of the multiples of x.

Direct sums and forced intersections

Recall from lecture twenty two: the sum U plus W is direct, written U circle plus W, when every vector in it is u plus w in exactly one way. And this happens exactly when the intersection of U and W is just the zero vector. The dimension formula turns this into a count. Let U and W be finite dimensional subspaces of a vector space V over a field F. Then the sum is direct exactly when the dimension of U plus W equals the dimension of U plus the dimension of W. By the formula, these two numbers are equal exactly when the intersection has dimension zero. A subspace has dimension zero exactly when it is the zero subspace. And by the test from lecture twenty two, that happens exactly when the sum is direct.

A second consequence. Let V be a finite dimensional vector space over a field F, and let U and W be subspaces of V. If the dimensions of U and W add up to more than the dimension of V, then U and W share a nonzero vector. The reason: as subspaces of the finite dimensional V, U and W are finite dimensional, so the formula applies. And U plus W lies in V, so its dimension is at most the dimension of V. By the formula, the dimension of the intersection is the dimension of U, plus the dimension of W, minus the dimension of U plus W. That is at least the dimension of U, plus the dimension of W, minus the dimension of V, which is more than zero. A subspace of positive dimension is not the zero subspace, so the intersection contains a nonzero vector.

For example, any two planes through the origin in three dimensional space share at least a line, because two plus two is more than three. And in five dimensional space, any two subspaces of dimension three share at least a line. One warning. For three subspaces, this way of counting breaks down. Take the three lines in the plane spanned by the vector (one, zero), by the vector (zero, one), and by the vector (one, one). Any two of them meet only in zero, so the count would give one plus one plus one, which is three. But their sum is the plane, which has dimension two.

Complements

Finally, splitting a space into two parts. Let U be a subspace of a vector space V over a field F. A subspace W of V is called a complement of U in V if V is the direct sum of U and W. For example, in the plane, let U be the line spanned by the vector (two, one). The line spanned by the vector (minus one, two), is a complement. The two lines meet only in zero, so their sum is direct, with dimension one plus one, which is two. So their sum is the whole plane. But it is not the only complement. Every other line through the origin works just as well, so a subspace usually has many complements. Only the line U itself fails, because it meets U in a whole line.

Later in the course, an inner product will single out one special complement: the orthogonal complement. A word of caution: a complement is not the set of all vectors outside U. That set does not even contain zero, so it is never a subspace. Here is the theorem. Let V be a finite dimensional vector space over a field F, and let U be a subspace of V. Then U has a complement in V. And every complement W of U has dimension equal to the dimension of V minus the dimension of U.

Proof. U is a subspace of the finite dimensional V, so by lecture twenty three, U is finite dimensional. Take a basis u one up to u m of U. By lecture twenty three, it extends to a basis of V: u one up to u m, followed by new vectors w one up to w p. Let W be the span of the w's. Every vector of V is a combination of this whole basis. Its part along the u's lies in U, and its part along the w's lies in W. So V is U plus W. Now let v lie in both. Then v is a combination of the u's, and also a combination of the w's. Subtracting one from the other gives a combination of the whole basis that equals zero. So all the weights are zero, and v is zero. The sum is direct, so W is a complement.

Finally, take any complement W. It is a subspace of V, so it is finite dimensional too. The sum U plus W is all of V, and it is direct. So by the counting test for direct sums, the dimension of V is the dimension of U plus the dimension of W. So in the plane, every complement of a line is a line through the origin. In three dimensional space, a complement of a plane through the origin is a line through the origin that does not lie in it, and a complement of a line through the origin is a plane through the origin that does not contain it.

Summary

Let's summarise. For finite dimensional subspaces U and W, the dimension of U plus W is the dimension of U, plus the dimension of W, minus the dimension of their intersection. The proof extends one basis of the intersection to bases of both spaces. Since the formula ties four numbers together, it finds the dimension of a sum or of an intersection from the others. For finite dimensional U and W, the sum is direct exactly when the dimension of U plus W equals the dimension of U plus the dimension of W. And for subspaces of a finite dimensional V, when the dimensions add up to more than the dimension of V, the two subspaces must share a nonzero vector.

In a finite dimensional space, every subspace has a complement, usually many, and every complement has dimension equal to the dimension of V minus the dimension of U. Before the next lecture, read section four point six of the course book, try the problems on sheet six about the dimension formula and complements, and do the lecture check on this lecture's page at Open Semester dot com. Next time, we start week seven with coordinates: how a basis turns any finite dimensional vector space into a copy of F n. See you there.

Check yourself

3 questions, from warm-up to stretch

Work each one out on paper, type your answer and press Check. Stuck? Open a hint; the worked solution is there when you need it.

  1. Question 1 of 3 Warm-up

    and are subspaces of with , and . Find . Is ? Is the sum direct? Could some other subspaces of dimensions and in meet only in ?

    :
    The sum is direct:
    Dimensions and can meet only in :
    Hint 1 of 2

    Use the dimension formula (Theorem 4.6.1): .

    Hint 2 of 2

    A subspace of of dimension is all of (Theorem 4.5.17). For the last question, compare with (Proposition 4.6.6).

    Worked solution
    1. By Theorem 4.6.1, .
    2. is a subspace of of dimension , so (Theorem 4.5.17).
    3. has dimension , so it is not , and the sum is not direct. In counts: (Proposition 4.6.5).
    4. No: since , every subspace of dimension and every subspace of dimension in share at least a line (Proposition 4.6.6).
  2. Question 2 of 3 Core

    In let be spanned by and , and by and . Both have dimension . The intersection consists of the multiples of one vector . Find , and .

    Hint 1 of 2

    As in Example 4.6.3: a vector of the intersection is and also . Write both as columns and compare them entry by entry.

    Hint 2 of 2

    and . Once you know , the dimension formula gives .

    Worked solution
    1. A vector in both is . Entry by entry: , , and . So .
    2. With all four equal to , the vector is . So consists of the multiples of : and . Indeed .
    3. By Theorem 4.6.1, . The four vectors span only a -dimensional subspace of : one direction is lost to the overlap.
    4. Check: , so already span , and they are independent: forces , , then .
  3. Question 3 of 3 Stretch

    In let , a plane. What dimension does every complement of have? Decide for each subspace whether it is a complement of : , , .

    is a complement:
    is a complement:
    is a complement:
    Hint 1 of 2

    By Theorem 4.6.11, every complement has dimension . A complement must also meet only in (Definition 4.6.9).

    Hint 2 of 2

    The vectors of are . Check whether and have this form.

    Worked solution
    1. By Theorem 4.6.11, every complement of has : it is a line through the origin.
    2. : is in , so and . Not a complement.
    3. : needs , and , which is impossible, so . A nonzero multiple is not in either (otherwise times it would be), so . By Proposition 4.6.5, , so (Theorem 4.5.17), and . A complement.
    4. has dimension , so it is not a complement. Directly: is a nonzero vector in , as Proposition 4.6.6 forces, since .

Found a mistake, or something not working on this page? Report it and we'll fix it. See what we've corrected.