I just started working on the Navier-Stokes equations. I consider the following paper Seibold A compact and fast Matlab code solving the incompressible Navier-Stokes equations on rectangular domains (2008). $$ \begin{align} u_{t}+p_{x} & =-\left(u^{2}\right)_{x}-\left(uv\right)_{y}+\frac{1}{Re}\left(u_{xx}+u_{yy}\right)\label{eq:1}\\ v_{t}+p_{y} & =-\left(uv\right)_{x}-\left(v^{2}\right)_{y}+\frac{1}{Re}\left(v_{xx}+v_{yy}\right)\label{eq:2}\\ u_{x}+v_{y} & =0\label{eq:3} \end{align} $$ It is said that in the above equations nonlinear terms on the right hand side are equal to $$ \begin{align*} \left(u^{2}\right)_{x}+\left(uv\right)_{y} & =uu_{x}+vu_{y}\\ \left(uv\right)_{x}-\left(v^{2}\right)_{y} & =uv_{x}+vv_{y} \end{align*} $$
and can be written as $$ \left(\mathbf{u}\cdot\nabla\right)\mathbf{u} $$
My questions are:
I do not understand how the nonlinear terms are equal to $$ \begin{align*} =uu_{x}+vu_{y}\\ =uv_{x}+vv_{y} \end{align*} $$ and how they can be written as $$ \left(\mathbf{u}\cdot\nabla\right)\mathbf{u} $$
I saw in a paper, the authors have written the nonlinear terms $$ \begin{align*} \left(u^{2}\right)_{x}+\left(uv\right)_{y} & =uu_{x}+vu_{y}\\ \left(uv\right)_{x}-\left(v^{2}\right)_{y} & =uv_{x}+vv_{y} \end{align*} $$ as $$ \nabla\cdot\left(\mathbf{u}\mathbf{u}\right) $$ where $ \mathbf{u} $ is velocity vector. How they did do it?
If somebody could explain these issues, I would be very appreciative.