Orthogonal complement to subspace of $n \times n$ matrices with trace = $0$ For an inner product space $$W = \{A \in M_{n \times n}(\mathbb{R}) \mid tr(A)=0\}$$ with inner product $$\langle A,B\rangle:=tr(A^TB)=\sum_{i=1}^n\sum_{j=1}^na_{ij}b_{ij}$$ find $W^{\perp}$.
I know that $$\dim(W) = n^2 -1$$ and that $$W \oplus W^{\perp} = M$$
But I'm not sure of how to proceed. Would you be able to point me in the right direction? Many thanks!
 A: Alright! So, I think I have the answer to this problem.
WARNING: I'm a novice (and the OP), so the following may not be foolproof.
Some Explanation
As stated above, $\dim(W) = n^2 -1$ because $W$ is all the square matrices whose trace is equal to zero. For this to be true, we just need one entry along the diagonal of any matrix $A \in W$ to be such that it "cancels out" all the other entries combined (i.e. there needs to exists some $a_{kk}$ along the diagonal of all $A$ such that $-a_{kk} = \sum_{i=1}^{n} a_{ii}$). Because all the other entries can be chosen arbitrarily, there is all but one "degree of freedom" for the entries of any $A$.
Also, it is frequently proven elsewhere that for any vector space $V$, the direct sum of any subspace $S$ of $V$ and the orthogonal complement of that subspace $S^\perp$, is the vector space $V$ itself. Therefore, $\dim(V) = \dim(S) + \dim(S^\perp)$. (Please correct me if I'm forgetting some conditions here.)
Using all this information, we know that whatever our $W^\perp$ will be, its dimension $\dim(W^\perp)$ will come from $\dim(M) = \dim(W) + \dim(W^\perp)$.
The Answer
Looking at the definition of the inner product we have in this space, we know that for any $A \in W$ and any $C \in W^\perp$, $\langle A,C\rangle = tr(A^TC) = 0$, since $tr(A) = 0 = tr(A^T)$. Again, the entries along the diagonal of $A$ and $A^T$ are the same.
This leads to the idea that we need some $C$ which allows $tr(AC) = tr(A)$. Obviously, such a $C$ is the identity matrix, $I_{n \times n}$, which also has $\dim(C) = 1$. Therefore, $W^\perp = \lbrace C \in M_{n \times n}(\mathbb{R}) \mid C = I_{n \times n} \rbrace$.
