Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say I have the subspace

$$S=\{(X_1,X_2,X_3,X_4)\mid~~6X_1 - 2X_2 + 4X_3-10X_4 = 0\}$$

How do I go about finding the matrix which is the orthogonal projection onto this subspace?

share|cite|improve this question

The relation defining your space is $$ X \in S \quad \Leftrightarrow \quad \langle X, (6, -2, 4, -10) \rangle = 0 $$ where $\langle \cdot, \cdot \rangle$ is the dot product. So one very obvious guess of a vector that is orthogonal to all $X$ in $S$ is $(6, -2, 4, -10)$. The orthogonal complement of $S$ is, therefore, the space generated by $u = (6, -2, 4, -10)$. (By dimension counting, you know that $1$ generator is enough.) The projection operation is $$ P(X) = X - \frac{\langle X, u\rangle}{\langle u, u\rangle}u = X - \frac{uu^T}{u^Tu}X = \left(I - \frac{uu^T}{u^Tu}\right)X. $$

share|cite|improve this answer

Since your space has codimension $1$ (i.e., dimension $3$ in a $4$-dimensional space), the following recipe will work: find a vector $\tilde e_4$ orthogonal to your subspace (try $(6,-2,4,-10)$), extend to an orthogonal basis $(\tilde e_i)_{i=1,\ldots,4}$ an normalise $e_i=\tilde e_i/ |\tilde e_i|$. Now the coordinates of a vector on this basis are given by scalar products: $v=\sum_{i=1}^4\langle e_i,v\rangle e_i$, and if you leave out $e_4$ you get the orthogonal projection $\sum_{i=1}^3\langle e_i,v\rangle e_i$ of $v$ onto your subspace. In matrix form, take the matrix with columns the coordinates of the $e_i$, and multiply by the matrix with as first three rows the coordinates of $e_1,e_2,e_3$ and last row zero.

Additional exercise: try to find out how to avoid introducing the ugly square roots of the normalization (which should disappear in the final matrix, since your projection is defined over $\Bbb Q$).

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.