Let $V$ be the vector space of all $n\times n$ matrices over $\mathbb{R}$, and define the scalar product of two matrices $A,B$ by

$\langle A,B\rangle=\operatorname{tr}(AB)$, where $\operatorname{tr}$ is the trace (sum of the diagonal elements). Describe the orthogonal complement of the subspace of diagonal matrices. What is the dimension of this orthogonal complement?

I do not understand what is the description of the "orthogonal complement of the subspace of diagonal matrices". In what concerns the dimension I remembered the theorem that states:$\dim W+\dim W^{\bot}=\dim V$ in which $W$ is a subspace of $V$.


1) How do I answer this question?

2) Could someone provide me a proof?

Thanks in advance!


  • 1
    $\begingroup$ The vector space of diagonal matrices has a canonical basis. You have to find the vectors from the canonical basis of $ M_n (\mathbb {R} ) $ that are orthogonal over those vectors. They generate the complement. $\endgroup$ – rafa Jun 27 '17 at 17:08
  • $\begingroup$ @rafa What is a canonical basis? $\endgroup$ – Pedro Gomes Jun 27 '17 at 17:10
  • $\begingroup$ the subspace of diagonal matrices: $\mathfrak D=\{D \mid D_{i,j}=0, \forall i\neq j\}$, its complement: $\mathfrak D^\perp = \{M\mid \langle M,D\rangle=0, \forall D \in \mathfrak D\}$. $\endgroup$ – Surb Jun 27 '17 at 17:11
  • 1
    $\begingroup$ What is the dimension of diagonal subspace. It is $n$, as I have written one of its basis in the answer. Any complement has dimension then $n^{2}-n$. $\endgroup$ – Riju Jun 27 '17 at 17:21
  • 1
    $\begingroup$ By the way is $\langle A,B \rangle = Tr(AB)$ an innerproduct? It doesn't seem so! $\endgroup$ – Riju Jun 27 '17 at 17:35

Let $E_{ij}$ denote the matrix with $1$ in $ij^{th}$ position and $0$ otherwise. For $1 \leq i \leq n$ and $1 \leq j \leq n$, this is a basis for $M_{n\times n}(\mathbb{R})$. And $E_{ii}(1\leq i \leq n)$ forms a basis for the diagonal subspace. Also $E_{ij}E_{kl}=\delta_{jk}E_{il}$, where $\delta_{jk}$ is $1$ if $j=k$, otherwise it is $0$. So the basis for the subspace is clearly a orthogonal basis. Now, the extended basis for the whole space is as described above. Now just use the Gram-schimdt Orthogonalization process to orthogonalize this basis keeping the basis for the subspace same. Whatever vectors you get except the $E_{ii}$'s is a basis for the complement.

  • $\begingroup$ I am not understanding your answer. Could you use matrix notation? I do not use Kronecker Delta stil. Those are the reasons I down voted. $\endgroup$ – Pedro Gomes Jun 27 '17 at 17:21
  • $\begingroup$ I just wrote what $\delta_{jk}$ means. $\endgroup$ – Riju Jun 27 '17 at 17:24
  • $\begingroup$ How do I apply Gram-Schmidt orthogonalization process in the diagonal basis in this specific case? How do you get $n^2-n$ as dimension of the complement, I mean the $n^2$? $\endgroup$ – Pedro Gomes Jun 27 '17 at 17:28
  • $\begingroup$ Ok what is the dimension of the vector space $M_{n \times n}(\mathbb{R})$? What is the dimension of the subspace? If $V=U \oplus W$, then $dim(V)=dim(U)+dim(W)$, follows from the dimension theorem. $\endgroup$ – Riju Jun 27 '17 at 17:31
  • $\begingroup$ Sorry but I have not yet covered that theorem. $\endgroup$ – Pedro Gomes Jun 27 '17 at 17:36

You can check by direct computation that a matrix $A=(a_{ij})_{1\le i,j\le n}$ is orthogonal to the diagonal matrix $D=(\lambda_1,\dots,\lambda_n)$ if and only if $$\lambda_1a_{11}+\dots+\lambda_n a_{nn}=0.$$ Hence it is orthogonal to all diagonal matrices if and only if $a_{11}=\dots= a_{nn}=0$, i.e. its diagonal elements are $0$. Clearly this subspace is isomorphic to $\mathbf R^{n^2-n}$.

  • $\begingroup$ How do you get $n^2-n$? $\endgroup$ – Pedro Gomes Jun 27 '17 at 18:11
  • 1
    $\begingroup$ This is the number of non-diagonal elements in an $n\times n$ matrix. $\endgroup$ – Bernard Jun 27 '17 at 18:15
  • $\begingroup$ By a ‘standard basis’, I suppose you mean matrices $E_{ij}$ with all coefficients equal to $0$, except it has $1$ in the $(i,j)$ position? $\endgroup$ – Bernard Jun 27 '17 at 18:20
  • $\begingroup$ yes, but I have already got it $\endgroup$ – Pedro Gomes Jun 27 '17 at 18:21
  • 1
    $\begingroup$ It's the same as what I said: you remove the $E_{ii}$s from this basis, and you obtain your basis of the orthogonal complement. $\endgroup$ – Bernard Jun 27 '17 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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