# Find orthogonal complement and its basis

Let $U=\mbox{span}\left\{ \begin{bmatrix} 1 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 1 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 1 & 0 \\ 1 & 1 \end{bmatrix}\right\}$. What is a basis of orthogonal complement $U^{\perp}$?

So far I have deduced from the theorem $$\mbox{dim}(U)+\mbox{dim}(U^{\perp})=\mbox{dim}(M_{2\times2})$$ that $\mbox{dim}(U^{\perp})=1$. Morover, if I pick a matrix $A\in M_{2\times 2}$ and conider $$\langle A, M\rangle=0\qquad \mbox{for all}\, M\in U$$ I may assume that $M$ is linear combination of elements from $U$ (span) for some constants. I cannot however deduce the general form of the orthogonal complement from the latter.

• What is the inner product on the space of matrices? – paf May 9 '18 at 20:01
• $\langle A, B \rangle=\mbox{tr}(A^T B)$ – zorro47 May 9 '18 at 20:02
• Note that $A\in U^{\perp}\iff A$ is orthogonal to each element of your basis of $U$. – paf May 9 '18 at 20:06
• So I may consider $\langle A, M_i \rangle =0$, where $M_i$ is the i-th element of span of $U$. This will give me some info about $A$, but how do you know it will give the whole orthogonal complement? – zorro47 May 9 '18 at 20:09
• Because I wrote an equivalence! Could you prove it? – paf May 9 '18 at 20:15

$X \in U^{\perp} \iff \langle X, Y \rangle=0 \> \> \forall \> Y \in U$
$\langle X, Y \rangle=\mbox{tr}(X^T Y)$
Let's take: $X=\begin{pmatrix} a & b \\ c & d \end{pmatrix}$
$$\text{tr} \Biggl( \begin{pmatrix} a & c \\ b & d \end{pmatrix} \begin{pmatrix} 1 & 1\\ 0 & 0 \end{pmatrix}\Biggl) = a + b = 0$$ $$\text{tr} \Biggl( \begin{pmatrix} a & c \\ b & d \end{pmatrix} \begin{pmatrix} 1 & 0\\ 1 & 0 \end{pmatrix}\Biggl) = a + c = 0$$ $$\text{tr} \Biggl( \begin{pmatrix} a & c \\ b & d \end{pmatrix} \begin{pmatrix} 1 & 0\\ 1 & 1 \end{pmatrix}\Biggl) = a + c + d = 0$$ If you solve you'll get $d=0 \land b=-a \land c=b$.
So $X=\begin{pmatrix} a & -a \\ -a & 0 \end{pmatrix}, \> a \neq 0$.