${f}\begin{pmatrix}x \\y \\\end{pmatrix}$=$\begin{pmatrix}x^2-y^2 \\2xy \end{pmatrix}$ is differentiable at each point I need help with understanding some steps of a task. I tried to solve the uncertainty by myself by using "Approach zero" but the problem is, that I am not able to write these kind of functions in "Approach zero". Maybe you could already help me out by showing how its done.

Show that the function $\mathbf{f}:\mathbb{R^2}\to\mathbb{R^2}$ with $$\mathbf{f}\begin{pmatrix}x \\y \\\end{pmatrix}=\begin{pmatrix}x^2-y^2 \\2xy \\\end{pmatrix}$$ is differentiable at each point in $\mathbb{R^2}$ and calculate its derivative.

My first question is how to type that in "Approach Zero" because I am 100% sure that I could find some posts dealing with this question using approach.
Here is the solution that I don't quite understand:
We now that $\frac{\partial(f_1,f_2)}{\partial(x,y)}\begin{pmatrix}x \\y \\\end{pmatrix}=\begin{pmatrix}2x&-2y \\2y&2x \\\end{pmatrix}$. Now we want to show, that this matrix is the total derivative d$\mathbf{f[x]}$. So we have to show that $\mathbf{f}$ is differentiable at each point with d$\mathbf{f[x]}$ being its derivative , which is the case, if $\lim\limits_{\mathbf{h}\to 0}\frac{\mathbf{f(x+h)-f(x)}-\frac{\partial(f_1,f_2)}{\partial(x,y)}\begin{pmatrix}x \\y \\\end{pmatrix}\mathbf{h}}{|\mathbf{h}|}=0$ But what is the solution doing:
|$\mathbf{f(x+h)-f(x)}-\frac{\partial(f_1,f_2)}{\partial(x,y)}(\mathbf{x})\mathbf{h}|=|\begin{pmatrix}h_1^2-h_2^2 \\2h_1h_2 \\\end{pmatrix}|=O(|\mathbf{h}|^2)$ for $\mathbf{h}\to O$ and therefore $\mathbf{f}$ is differentiable.
My question is why? Where does this whole thing come from. Why aren't we using this instead $\lim\limits_{\mathbf{h}\to 0}\frac{\mathbf{f(x+h)-f(x)}-\frac{\partial(f_1,f_2)}{\partial(x,y)}\begin{pmatrix}x \\y \\\end{pmatrix}\mathbf{h}}{|\mathbf{h}|}$. How does a substraction between a vector and a matrix even work? And where does this whole thing $|\begin{pmatrix}h_1^2-h_2^2 \\2h_1h_2 \\\end{pmatrix}|=O(|\mathbf{h}|^2)$ even come from? What even is this $O$ and why are we allowed to say that $\mathbf{f}$ is totally differentiable?
Is there anyone who could help me out? I would be very grateful.
 A: Here is a sketch of a solution: Let $\mathbf{x}=[x, y]^\intercal$ and $\mathbf{h}=[h, k]^\intercal$.
Notice that
$$(x+h)^2-(y+k)^2=x^2-y^2+2xh-2yk+h^2-k^2$$
and
$$2(x+h)(y+k)=2xy+2xk+2yk+2hk$$
Thus
\begin{align}
\mathbf{f}(\mathbf{x}+\mathbf{h})&=\begin{pmatrix}x^2-y^2\\ 2xy\end{pmatrix} + \begin{pmatrix} 2xh-2yk\\ 2xk+2yh\end{pmatrix}+ \begin{pmatrix} h^2-k^2\\ 2hk\end{pmatrix}  \\
&=\mathbf{f}(\mathbf{x})+\begin{pmatrix}2x & -2y\\ 2y & 2x\end{pmatrix}\begin{pmatrix}h 
\\k\end{pmatrix} + \begin{pmatrix} h^2-k^2\\ 2hk\end{pmatrix}
\end{align}
Set
$$\mathbf{r}(\mathbf{h})=\begin{pmatrix} h^2-k^2\\ 2hk\end{pmatrix}$$
Then
\begin{align}
\frac{\|\mathbf{r}(\mathbf{h})\|}{\|\mathbf{h}\|}=\sqrt{\frac{(h^2-k^2)^2+4h^2k^2}{h^2+k^2}}=\sqrt{\frac{(h^2+k^2)^2}{h^2+k^2}}=\sqrt{h^2+k^2}\xrightarrow{\|\mathbf{h}\|\rightarrow0}0
\end{align}

The rational is based on the meaning of differentiation. A function $\mathbf{f}$ is differentiable at a point $\mathbf{x}_0$ there is a linear transform $A_{\mathbf{x}_0}$ such that
\begin{align}
\mathbf{f}(\mathbf{x}_0+\mathbf{h})=\mathbf{f}(\mathbf{x}_0)+A_{\mathbf{x}_0}\mathbf{h} + \mathbf{r}(\mathbf{x}_0;\mathbf{h})\tag{1}\label{one}
\end{align}
where
\begin{align}
\lim_{\mathbf{h}\rightarrow\mathbf{0}}\frac{\|\mathbf{r}(\mathbf{x_0};\mathbf{h})\|}{\|\mathbf{h}\|}=0\tag{2}\label{two}
\end{align}
In the OP, the function $\mathbf{f}$ is independent of the point $\mathbf{x}$. This is not a surprise in this case since $\mathbf{f}$ is a quadratic function.
