Understanding mathematics in derivation of vector form of Snell's law I am currently studying this answer on physics.stackexchange to a question on the vector form of Snell's law. The answer (by the user Frobenius) proceeds as follows:

Let a unit vector $\;\mathbf{n} = (\rm n_1,n_2,n_3)\,, \Vert\mathbf{n}\Vert = 1$. Any vector $\;\mathbf{r}\;$ could be decomposed in two components with respect to $\;\mathbf{n}\;$, see Figure-01 in the bottom
\begin{equation}
   \mathbf{r}=\mathbf{r}_\|+\mathbf{r}_\bot
   \tag{01}\label{01}
\end{equation}
one parallel and the other normal to axis $\mathbf{n}$ respectively
\begin{align}
   \mathbf{r}_\| &=\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{r}\right)\mathbf{n}
   \tag{02.1}\label{02.1}\\
   \mathbf{r}_\bot &=\left(\mathbf{n}\boldsymbol{\times}\mathbf{r}\right)\boldsymbol{\times}\mathbf{n}= \mathbf{r}-(\mathbf{n}\boldsymbol{\cdot}\mathbf{r})\mathbf{n}
   \tag{02.2}\label{02.2}
\end{align}
that is
\begin{equation}
   \mathbf{r}=\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{r}\right)\mathbf{n}+\left(\mathbf{n}\boldsymbol{\times}\mathbf{r}\right)\boldsymbol{\times} \mathbf{n}
   \tag{03}\label{03}
\end{equation}
The vectors $\;\mathbf{t},\mathbf{i}\;$ are decomposed as follows
\begin{equation}
   \mathbf{t}=\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)\mathbf{n}+\left(\mathbf{n}\boldsymbol{\times}\mathbf{t}\right)\boldsymbol{\times} \mathbf{n}
   \tag{04}\label{04}
\end{equation}
\begin{equation}
   \mathbf{i}=\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}+\left(\mathbf{n}\boldsymbol{\times}\mathbf{i}\right)\boldsymbol{\times}\mathbf{n}
   \tag{05}\label{05}
\end{equation}
Now, Snell's Law is expressed as
\begin{equation}
  \left(\mathbf{n}\boldsymbol{\times}\mathbf{t}\right)=\mu\left(\mathbf{n}\boldsymbol{\times}\mathbf{i}\right)
   \tag{06}\label{06}
\end{equation}
see Figure-02 in the bottom.
Equation \eqref{04} combined with \eqref{05} and \eqref{06} yields
\begin{equation}
   \mathbf{t}=\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)\mathbf{n}+\mu\left[\mathbf{i}-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}\right]
   \tag{07}\label{07}
\end{equation}
Taking norms in \eqref{07} and since the vector $\;\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)\mathbf{n}\;$ is normal to the vector $\;\left[\mathbf{i}-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}\right]\;$
\begin{equation}
   \Vert\mathbf{t}\Vert^2=\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)^2+\mu^2\Vert\mathbf{i}-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}\Vert^2
   \tag{08}\label{08}
\end{equation}
or
\begin{equation}
   1=\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)^2+\mu^2\left[1-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)^2\right]
   \tag{09}\label{09}
\end{equation}
so
\begin{equation}
   \left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)=\pm\sqrt{1-\mu^2\left[1-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)^2\right]}
   \tag{10}\label{10} 
\end{equation}
Since the angle between $\;\mathbf{n},\mathbf{t}\;$ is less than $\;\pi/2\;$ we keep the plus sign in \eqref{10} and \eqref{07} yields finally
\begin{equation}
   \mathbf{t}=\sqrt{1-\mu^2\left[1-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)^2\right]}\mathbf{n}+\mu\left[\mathbf{i}-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}\right]
   \tag{11}\label{11}
\end{equation}



How does the author get (08) and (09)?
For $\Vert\mathbf{t}\Vert^2=\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)^2+\mu^2\Vert\mathbf{i}-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}\Vert^2$, what happened to the $\mathbf{n}$ in $\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)\mathbf{n}$? Shouldn't it be $\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)^2 \mathbf{n}^2$?
 A: Let's begin with $(7)$ which reads
$$\mathbf{t}=\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)\mathbf{n}+\mu\left[\mathbf{i}-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}\right]\tag1$$
Then, expressing the square of the magnitude of $\mathbf{t}$, $\Vert\mathbf{t}\Vert^2$ by $\mathbf{t}\cdot \mathbf{t}$, we have from $(1)$
$$\Vert\mathbf{t}\Vert^2=\left(\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)\mathbf{n}+\mu\left[\mathbf{i}-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}\right]\right)\cdot \left(\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{t}\right)\mathbf{n}+\mu\left[\mathbf{i}-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}\right]\right)\tag2$$
Next, since $\mathbf{n}$ is a unit vector, then $\mathbf{n}\cdot \mathbf{n}=1$.
And since the term in brackets in $(2)$, $\left[\mathbf{i}-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}\right]$, is perpendicular to $\mathbf{n}$, we immediately have from $(2)$
$$\Vert\mathbf{t}\Vert^2=(\mathbf{n}\cdot \mathbf{t})^2+\mu^2\Vert\mathbf{\left[\mathbf{i}-\left(\mathbf{n}\boldsymbol{\cdot}\mathbf{i}\right)\mathbf{n}\right]}\Vert^2\tag3$$
Note that $(3)$ is identical to $(9)$ in the OP.  And we are done!
