How to find distance between matrix $A$
$$A = \left( \begin{matrix}1 & 2\\ 6 & 6\end{matrix} \right)$$
and the span of the following matrices $B$, $C$ and $D$?
$$B = \begin{pmatrix} 6 & 3\\ 3 & 3\end{pmatrix}, \qquad C = \begin{pmatrix} 1 & 1\\ 4 & 3\end{pmatrix}, \qquad D = \begin{pmatrix} 5 & 3\\ 6 & 5\end{pmatrix} $$
If the (Frobenius) dot product of two matrices is
$$ \langle X,Y \rangle = \mbox{tr} \left( X^T Y \right)$$
I found dot product of these matrices, not sure what to do next
$$B*C = 18+12=30$$ $$C*D = 29+18=47$$ $$B*D = 48+24 =72$$
$$\left( \begin{matrix}6 & 3\\ 3 & 3\end{matrix} \right) \left( \begin{matrix}\alpha_1\\ \beta_1\end{matrix} \right) \left( \begin{matrix}1 & 1\\ 4 & 3\end{matrix} \right)\left( \begin{matrix}\alpha_2\\ \beta_2\end{matrix} \right) \left( \begin{matrix}5 & 3\\ 6 & 5\end{matrix} \right)\left( \begin{matrix}\alpha_3\\ \beta_3\end{matrix} \right)$$ is the span.
If you look at matrices $B,C,D$ you'll find that they linearly dependent, because you can write
$ D = \dfrac{2}{3} B + C $
Therefore,
$\text{Span}(B, C, D) = \text{Span}(B,C) $
So, let the matrix $E$ be the projection of matrix $A$ onto the span of $B, C$, then
$E = c_1 B + c_2 C $
we want $E - A $ to be orthogonal to $B$, $C$, i.e.
$ (c_1 B + c_2 C - A) . B = 0 $
$ (c_1 B + c_2 C - A) . C = 0 $
which are three equations in $c_1, c_2, c_3$. Evaluating gives
$ 63 c_1 + 30 c_2 = 48 $
$ 30 c_1 + 27 c_2 = 45 $
Solving yields $c_1 = - \dfrac{6}{89}, c_2 = \dfrac{155}{89} $
So that
$E = \dfrac{1}{89} \begin{bmatrix} 119&&137\\602&&447\end{bmatrix}$
Finally the distance will be
$ d = \sqrt{ \langle (E - A), (E-A) \rangle } $