to prove that given a vector space U and its subspace W, dim U = dim W + dim (orthogonal complement of W), would this proof work?

suppose {w1,...,wk} is an orthonormal basis for W.
assuming that dim U = n, we can extend this basis to {w1,...,wk,w_k+1,...,wn} which is a basis for U.
then {w_k+1,...,wn} must be a basis for the orthogonal complement since W is in the span of {w1,...,wk}.
so our claim follows.

2. Originally Posted by squarerootof2
to prove that given a vector space U and its subspace W, dim U = dim W + dim (orthogonal complement of W), would this proof work?

suppose {w1,...,wk} is an orthonormal basis for W.
assuming that dim U = n, we can extend this basis to {w1,...,wk,w_k+1,...,wn} which is a basis for U.
then {w_k+1,...,wn} must be a basis for the orthogonal complement since W is in the span of {w1,...,wk}.
so our claim follows.
That is more or less correct. But you need to say that the orthonormal basis for W can be extended to an orthonormal basis for U. (This is possible, for example by using the Gram–Schmidt process.)