The orthogonal complement of a subset \(W\) of an inner product real vector space \(V\) is the set of all vectors \(u\) in \(V\) such that \(u\) is orthogonal to each element of \(W\).

#### An example of an orthogonal complement

As a starting point for our discussion, let us look at the following interesting example:

**Example**. Let \(V\) be an inner product real vector space and \(w\) be a nonzero vector in \(V\). Define a function \(f\) from \(V\) to \(\mathbb{R}\) by $$f(x) = w \cdot x.$$ The funtion \(f\) is, in fact, a linear function: $$f(rx + sy) = $$ $$w \cdot (rx + sy) = $$ $$r(w \cdot x) + s(w \cdot y) = $$ $$rf(x) + sf(y).$$ The kernel of \(f\) is the set of all vectors \(u\) in \(V\) such that \(w \cdot u = 0\). Therefore, \(\ker(f)\) is nothing but the orthogonal complement of \(w\).

For example, let \(w= (a, b, c)\) be a fixed three-dimensional real vector. The orthogonal complement of \(w\) is the set of all vectors in \(\mathbb{R}^3\) perpendicular to \(w\) which is $$P = \{(x,y,z): ax+by+cz = 0\}.$$ It is clear that \(P\) is a plane in \(\mathbb{R}^3\) passing through the origin and perpendicular to the vector \(w\).

#### The orthogonal complement properties

**Result**. Let \(U\) be the orthogonal complement of \(W\) in an inner product real vector space \(V\). Then, \(U\) has the following properties:

- \(U\) is a subspace of \(V\).
- The intersection of \(U\) with the subspace spanned by \(W\) is \(\{0\}\).
- If an element of \(V\) is additively decomposable into an element of \(U\) and an element in the subspace spanned by \(W\), then this decomposition is unique.

The proof of the above result is as follows:

(1): Let \(u_1\) and \(u_2\) be orthogonal to \(W\), i.e. This means that $$u_1 \cdot w = u_2 \cdot w = 0,$$ for each \(w\in W\). It is, then, obvious that $$(ru_1 + su_2) \cdot w = 0,$$ for each (w\in W\). Consequently, \(U\) is a subspace of \(V\).

(2): Let \(\langle W \rangle\) be the subspace of \(V\) spanned by \(W\). Each element of \(U\) is orthogonal to each element of \(\langle W \rangle\) because each element of \(U\) is orthogonal to each element of \( W \) and each element in \(\langle W \rangle\) is a linear combination of some elements in \(W\). Now, let a vector \(v\) is both in \(U\) and \(\langle W \rangle\). From this assumption, we obtain that \(v \cdot v = 0\). So, \(v\) is zero, i.e. $$ U \cap \langle W \rangle = \{0\}.$$

(3): Let \(v\) be a vector in \(V\) such that $$v = u_1 + w_1$$ and $$v = u_2 + w_2.$$ So, $$u_1 + w_1 = u_2 + w_2.$$ From this, we obtain that $$u_1 – u_2 = w_2 – w_1.$$ Since by (2), $$ U \cap \langle W \rangle = \{0\},$$ we see that \(u_1 – u_2\) and \(w_2 – w_1\) are zero. This shows that the mentioned decomposition is unique.

**Remark**. In some references, the orthogonal complement of \(W\) is denoted by \(W^{\perp}\). The solution of the following exercise is left to the reader.

**Exercise**. Let \(A\) be an \(m \times n\) real matrix. Then, the following statements hold:

- \(\hbox{Row}(A)^{\perp} = \hbox{Nul}(A).\)
- \(\hbox{Col}(A)^{\perp} = \hbox{Nul}(A^T).\)

For more on the column and row spaces of a real matrix refer to column space and rank.

#### Each element of a finite-dimensional real vector is additively decomposable into an element of a subspace and an element in its orthogonal subspace

**Exercise**. Let \(W\) be a subspace of \(\mathbb{R}^n\). Prove that $$\dim W + \dim W^{\perp} = n.$$

**Solution**. Let \(b_i\)s be a basis for \(W\) with $$\dim W = m \leq n.$$ Let \(A\) be an \(m \times n\) matrix with the rows \(b^T_i\)s. It is clear that \(W\) is the row space of \(A\). By the above exercise, we have: $$W^{\perp} = \hbox{Row}(A)^{\perp} = \hbox{Nul}(A).$$ By the rank-nullity theorem discussed in the past on the column space and rank, we have $$\dim W + \dim W^{\perp} = $$ $$\hbox{rank}(A) + \dim \hbox{Nul}(A) = n.$$

**Exercise**. Let \(W\) be the set of all five-dimensional real vectors $$(u,v,x,y,z)$$ of the form $$(0, r, r+s, s, 0),$$ where \(r\) and \(s\) are arbitrary real numbers. Find the orthogonal complement of \(W\).