Why do these vectors span the tangent plane? In the question Orthonormal basis for a tangent plane, one of the commenters notes that for a manifold $M$
described by the graph of an arbitrary smooth function $f:U\subseteq \mathbb{R}^2 \to\mathbb{R}$, one possible basis of the tangent plane is given by
$$
\begin{align}
v_1 &= (-f_y, f_x , 0) \\
v_2 &= (f_x, f_y, f_{x}^2 + f_{y}^2)
\end{align}
$$
but I can't understand how those vectors were arrived at, i.e. what is meant by ''one vector along the level curves of $f$
 and another vector along the direction of greatest change''. Can anyone please explain?

For any $g(x,y,z)=0$ describing a plane in $\Bbb R^3$, we know that the gradient vector $\left (g_x(x,y,z),g_y(x,y,z),g_z(x,y,z)\right )$ is perpendicular to any tangent plane intersecting with $g$ at any point (e.g. all gradient vectors of a sphere are its diameters which are perpendicular to any tangent plane on the sphere in any point of its perimeter).
Now take $g(x,y,z)=z-f(x,y)=0$ therefore the gradient vector is $$\vec{\nabla g}=(f_x,f_y,-1)$$it suffices to show that both $v_1$ and $v_2$ are independent and perpendicular on the gradient vector. Proving independence is simple and for normality we have$$v_1\cdot\vec{\nabla g}=(f_x,f_y,-1)\cdot(-f_y,f_x,0)=0\\v_2\cdot\vec{\nabla g}=(f_x,f_y,-1)\cdot(f_x,f_y,f_x^2+f_y^2)=0$$which proves what we want.
