Linear operator's linearity $$f:R^n \to R^3 \ \ \ \ \ \ \ \ \ f(x,y,z)=(x-z,y,az^2)$$  
I have to find $n$ and $a$ such that $f$ is a linear operator.
$$x-z=0$$
$$y=0$$
$$az^2=0$$  
I found $n$ to be 3.
For $az^2$ to be equal to $0$, either $z$ is $0$ or $a$ is $0$, right? The $z^2$ is confusing me, I don't know from what $R^n \to R^3$ it is. Any idea please? After findng $a$ and $n$, I have to write the matrix of $f$ and find the $dim(KerF)$ Thank you.

The fact that $n=3$ comes from inspection.
In order for $f:\mathbb{R}^3\to\mathbb{R}^3:(x,y,z)\mapsto(x-z,y,az^2)$ to be a linear operator you need
$$f(\vec{x}+\vec{u})=f(\vec{x})+f(\vec{u}), \quad\text{or}$$
$$\forall \vec{x},\vec{u}\in\mathbb{R}^3:\quad\begin{cases}(x+u)-(z+w)=(x-z)+(u-w) \\ (y+v)=(y)+(v) \\ a(z+w)^2=az^2+aw^2.\end{cases}$$
(Note: $\vec{x}=(x,y,z),\vec{u}=(u,v,w)$ here.) The first two check out but the last one implies $2azw=0$ for all $z,w\in\mathbb{R}$, which is obviously false unless $a=0$.
Now we have that the matrix associated to $f$ as a linear map is given by
$$f:\begin{pmatrix}x\\y\\z\end{pmatrix}\mapsto x\begin{pmatrix}1\\0\\0\end{pmatrix}+y\begin{pmatrix}0\\1\\0\end{pmatrix}+z\begin{pmatrix}-1\\0\\0\end{pmatrix}\quad\text{hence}\quad f(\vec{x})=\begin{pmatrix}1&0&-1\\0&1&0\\0&0&0\end{pmatrix}\vec{x}.$$
Finally, to find $\mathrm{Ker} f$, solve $x-z,y,0=0$, which is parametrized by $(t,0,t)$ and hence $\mathrm{dim}=1$.
