  We obtain a necessary and sufficient condition for a matrix $A$ to be
Birkhoff-James orthogonal to any subspace $\mathscr W$ of $\mathbb M_n(\mathbb
C)$. Using this we obtain an expression for the distance of $A$ from any unital
$C^*$ subalgebra of $\mathbb M_n(\mathbb C)$.
