Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Let the inner product of $V=M_3(\mathbb{R})$ to be $\langle A,B\rangle =\mathrm{trace} (A^tB)$.

I need to fine the distance between $X= \begin{pmatrix} 2 & 1 &0 \\ 0&-1 &2 \\ 1& 0 & 1 \end{pmatrix}$ and the subspace $U= \bigl\{A\mid \mathrm{trace}(A)=0\bigr\}$ of $V$.

From what I know I can find it by calculating $\left\lVert\frac{\langle w,A\rangle w}{\lVert w\rVert^2}\right\rVert$ where $\mathrm{span}(w)=U^\perp $, but how can I find $w$, and why should it be only one vector only?

share|cite|improve this question
Another way to look at this is to observe that $tr(A^TB)=\sum_{i,j}a_{ij}b_{ij}$. So you really have the usual inner product of $\mathbf{R}^9$. $U$ is the set of solutions of a single homogeneous linear equation, so has dimension 8. –  Jyrki Lahtonen Aug 8 '11 at 21:10

1 Answer 1

up vote 1 down vote accepted

The trace is a linear map from $V$ onto $\mathbb{R}$; that means that $U$ has dimension $8$, since it is equal to the kernel of this map.

The orthogonal complement will then be spanned by a single vector. You can find such a vector by finding one which is orthogonal to each vector in a basis for $U$. For example, you can take as your basis $E_{12}$, $E_{13}$, $E_{21}$, $E_{23}$, $E_{31}$, $E_{32}$, $E_{11}-E_{22}$, and $E_{11}-E_{13}$. This will give you information about $w$.

For instance, the fact that $\langle E_{12},w\rangle = 0$ tells you that the $(1,2)$ entry of $w$ must be equal to $0$. Using the rest of the basis, you should get all the information you need about the structure of $w$.

Or you could realize that there is a very special set of matrices $M$ such that for all $A$, $\mathrm{trace}(A)=0$ if and only if $\mathrm{trace}(M^tA) = 0$, and go from there. Hint. Do you know some family of matrices for which it is easy to compute the trace of $M^tA$ in terms of the trace of $A$?

share|cite|improve this answer
Ok, so beacuse $V=U\oplus U^\perp$ I can take $w=E_{11}+E_{22}+E_{33}$ for example? –  user6163 Aug 8 '11 at 19:27
Your $w$ is correct, your reasoning is not. For any finite dimensional space $V$ and finite dimensional subspace $U$, you have $V=U\oplus U^{\perp}$. The reason you can take $w$ as given here is because $\dim(U^{\perp})=1$, $w\perp U$, and $w\neq \mathbf{0}$. –  Arturo Magidin Aug 8 '11 at 19:33
should I make w orthonormal or orthogonal will do? –  user6163 Aug 8 '11 at 19:37
@Nir: Well, why don't you look at the formula you want to use and figure out whether it requires or assumes that $w$ is orthonormal or not? –  Arturo Magidin Aug 8 '11 at 19:38
OK............. –  user6163 Aug 8 '11 at 19:48

Your Answer


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