[Math] directional derivative unit vector

derivativesmultivariable-calculus

I just recently learned about directional derivatives and I am really lost on how they come up with unit vector or direction. I get that they come up with partial derivatives for each function and to each partial derivative multiply by its unit vector but what I dont understand is how they come up with that unit vector. For example I have a solved question below that puzzles me on how they found its unit vector.

enter image description here

Best Answer

The direction is given by the angle $\theta=\pi/4$. One vector in this direction is $(1,1)$. But you can't use this for the direction vector in the definition of the directional derivative. You need a vector of length one. So, take $(1,1)$ and divide it by its length: $\sqrt{ 1^2+1^2}=\sqrt 2$. This gives a "proper" direction vector (that is a unit vector):$$\textstyle{1\over\sqrt2}(1,1)= ({1\over\sqrt2},{1\over\sqrt2}) =({\sqrt2\over2},{\sqrt2\over2}).$$

I imagine, though, in the answer in you post, they recalled from memory the values of $\cos$ and $\sin$ for $\theta=\pi/4$ to obtain the (unit) direction vector.