Notation: $\textbf{w}$ is an M-dimensional vector of parameters (including the bias parameter), $\textbf{x}_n$ is an M-dimensional vector of the features of each training example, $\textbf{t}$ is an N-dimensional vector of target values - where $t_n$ is the output of the nth training example and finally, $\Phi$ is an $M \times N$ design matrix.
During studying linear regression, I naturally came across the derivation of the normal equation. In his book, Christopher M. Bishop begins by the log of the likelihood function given by:
$$ \frac{N}{2} \ln \beta - \frac{N}{2} \ln(2\pi) - \frac{\beta}{2}\sum_{n=1}^N\{t_n - \textbf{w}^T \phi(\textbf{x}_n)\}^2 \tag{1} $$
With the goal of calculating the maximum likelihood of the parameters, he then calculates the derivative with respect to $w$:
$$ \bigtriangledown p(\textbf{t}| \textbf{w},\beta) = \beta \sum_{n=1}^N\{t_n - \textbf{w}^T \phi(\textbf{x}_n)\}\phi(\textbf{x}_n)^T \tag 2 $$
After which he sets the derivative to zero, in order to maximise the likelihood function
$$ 0 = \sum_{n=1}^N t_n \phi(\textbf{x}_n)^T - \textbf{w}^T \bigg(\sum_{n=1}^N \phi(\textbf{x}_n)\phi(\textbf{x}_n)^T \bigg) \tag 3 $$
So far so good. But then, the result for the maximum likelihood of the parameters $w$ is written as:
$$ \textbf{w}_{ML} = (\Phi^T\Phi)^{-1} \Phi^T \textbf{t} \tag 4 $$
My own derivation from equation $(3)$ to equation $(4)$ goes along the following lines:
\begin{align*} \Phi^T \Phi \textbf{w} &= \Phi^T \textbf{t} \tag 5 \\ (\Phi^T \Phi)^{-1} \Phi^T \Phi \textbf{w} &= (\Phi^T \Phi)^{-1} \Phi^T \textbf{t} \tag 6 \\ \textbf{w} &= (\Phi^T \Phi)^{-1} \Phi^T \textbf{t} \tag 7 \end{align*}
My question is this: How does one go from equation $(3)$ to equation $(4)$. How does the supposed $ \textbf{w}^T \phi(\textbf{x}_n) \phi(\textbf{x}_n)$ become $\Phi^T \Phi \textbf{w}$ ? I do of course understand that given the dimensions of the matrix $\Phi$ and the vector $\textbf{w}$, that this is the only way to multiply the two entities. But what is the steps that one would follow in a formal derivation in order to reach such a result?