# Direction of steepest ascent of a plane in 3D coordinates relative to origin

I have a situation in which I want to find the 3D coordinates of the gradient vector on a plane defined by normal vector n, with origin {0,0,0}. If the components of the normal vector are $n = {a,b,c}$ then I have $f'={\frac{-a}{c}, \frac{-b}{c}}$ as the gradient vector and also the direction of steepest ascent. How can I transform this 2D vector that lies on the plane into a vector relative to the world coordinate system?

Many thanks!

Well, I think I figured it out myself, the coordinates of the vector end up being ${(\frac{-a}{c}, \frac{-b}{c}, \frac{(a^2+b^2)}{c^2})^T}$. This follows since $n$, the normal and $p$, the vector representing the direction of steepest ascent must be orthogonal and thus the dot product $n\cdot p=0$. Here $n=(a,b,c)^T$ and $p=(\frac{-a}{c}, \frac{-b}{c}, x)^T$, so then $\frac{a^2}{c}+\frac{b^2}{c}+cx=0$. Solving for x gets $x=\frac{a^2+b^2}{c^2}$. Plugging in some numbers and plotting the vectors seem to verify this result...hopefully this can be helpful to someone.