# Dimension of an orthonormal basis

I'm currently completing an assignment for my linear algebra class, and I feel that I don't completely understand the dimension of an orthonormal basis. For reference, this is the question I am dealing with:

Let W = {(2a+4c, 2b-c+d, 2b-2c+2d, 2a+5c-d, a+b+c+d) ∈ $\mathbb R^5$ | a, b, c, d ∈ $\mathbb R$}

a) Find an ordered basis for W. What is the dimension of W? What is the dimension of W⊥?

b) Find an orthonormal basis for W.

I already proved that W is a subspace of $\mathbb R^5$. Furthermore, I was able to obtain an ordered basis for W of

B = {(2,0,0,2,1),(0,2,2,0,1),(4,-1,-2,5,1)}

If this is a correct basis, then obviously dim(W) = 3. Now, this is where my mistunderstanding lies.

Using the Gram-Schmidt Process to find an orthogonal basis (and then normalizing this result to obtain an orthonormal basis) will give you the same number of vectors in the orthogonal basis as the original basis. This is according to my book. So, does this mean that dimW⊥ = dim(W)? I read somewhere else online, however, that dimW + dimW⊥ = dim(V), where W is a subspace of V. So, is dim(W⊥) = 3? Or is it 5-3 = 2? (As W is a subspace of $\mathbb R^5$). I am clearly misunderstanding a concept here. Any help would be greatly appreciated!

You are simply confusing the orthonormal basis for W which can be found by GS process starting by the basis you already have found (are you aware about that) with the subspace orthogonal to $W$ and indicated with $W\perp$ which has dimension equal to $n-dim(W)$.