Dimension of tracefree matrix subspace. Let $P\in M_n(\Bbb R)$ be an invertible matrix.
Find the dimension of the following subspace:
$$L = \{ X \in M_n(\Bbb R)|  tr(PX)=0\}$$
Don't know where to start. Any help?

The map
$f:X \rightarrow tr(PX)$ is linear from $M_n(\mathbb{R})$ to $\mathbb{R}$.
Your subspace $L$ is the kernel of $f$.
Since the image of $f$ has dimension 1 (take for example $X=P^{-1}$ to see that $f\neq0$).
You deduce that $\mathrm{dim}(L)=\mathrm{dim}(M_n(\mathbb{R}))-\mathrm{dim}(\mathbb{R})=n^2-1$.
