# Restricting a function to the span of a vector

Let $\mathbf v \in \Bbb R^2$ be a vector. Let $g$ be the one-variable function you get by restricting $f(x,y)=3y^2+2xy$ to the line spanned by $\mathbf v$ and moving with constant speed 1 in direction $\mathbf v$. Find an expression for $g'(0)$.

-

You want to find the directional derivative at $0.$ Write $v=(a,b)$ and use the fact that $D_{u+w}(f) = D_u(f) + D_w(f).$
 Thanks for the response! Could you elaborate on your notation on the last part of your answer? – L1meta Feb 18 at 15:43 $D_v(f)$ is the derivative of $f$ in the direction of $v.$ – lyj Feb 18 at 21:11
Since $$Df(x,y)=\begin{bmatrix}2y & 6y + 2x\end{bmatrix},$$ $Df(0,0)$ is just zero. We have $g(t)=f(tv),$ so by the chain rule, $$g'(t) = Df(tv) v.$$ It should be pretty obvious what $g'(0)$ is.