Compute the (directional) derivative of f at a in the direction v

f[{x_,y_}]=x^2-2y^2
a={.5,.7}
v={1,.25}
gam[t_] = a + t v
Plot[f[gam[t]],{t,-1,1}]
D[f[gam[t]],t]/.t->0

What’s going on here is that we are looking only at that part of the graph of f that lies above the curve gamma.

Plot1=Plot3D[f[{x,y}],{x,-1,1},{y,-1,1}]
Plot2=ParametricPlot3D[Flatten[{gam[t],-1}],{t,-5,5}];
Plot3=ParametricPlot3D[Flatten[{gam[t],z}],{t,-5,5},{z,-1,1},PlotStyle->Red];
Show[Plot1,Plot2,Plot3,PlotRange->{{-1,1},{-1,1},{-1,1}}]
Show[Plot1,Plot2,Plot3,PlotRange->{{-1,1},{-1,1},{-1,1}}]