To find the displacement directly, we can use the coordinates of the home and the peak. We will suppress writing units in calculations and put the units back in at the end. The net displacement written in terms of the components along the Cartesian axes are
\begin{align*}
\Delta \vec r_{\text{net}} \amp = (x_f-x_i, y_f-y_i, z_f-z_i) \\
\amp = [(4500-0), (2500-0), (800-0)] = (4500, 2500, 800).
\end{align*}
Therefore, the components of the displacement vectors are
\begin{equation*}
\Delta x = 4500\text{ m}, \Delta y = 2500\text{ m}, \Delta z = 800\text{ m}.
\end{equation*}
Magnitude. From these components, we can determine the magnitude \(d_{\text{net}}\text{.}\)
\begin{align*}
d \amp = \sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}\\
\amp = \sqrt{4500^2 + 2500^2 + 800^2} \approx 5210
\end{align*}
Therefore, the magnitude of the net displacment from home to the peak is \(5210\text{ m} \text{.}\)
Direction for 3-dimensional vector. Unlike the two-dimensional situaiton, now we need to specify two angles. We will choose the spherical coordinate angles, which are the polar angle \(\theta \) with respect to the positive \(z \) axis, and azimuth angle \(\phi \) that the projection of the vector in the \(xy\)-plane makes with the \(x \) axis.
\begin{align*}
\theta \amp = \arctan\left( \dfrac{(\Delta x)^2 + (\Delta y)^2}{\sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}} \right) \\
\amp = \arctan\left( \dfrac{\sqrt{4500^2 + 2500^2}}{5210} \right) \approx 81^{\circ}\\
\phi \amp = \arctan\left( \dfrac{\Delta y}{\Delta x} \right) \\
\amp = \arctan{\left(\frac{2500}{4500}\right)} \approx 29^{\circ}
\end{align*}
Since, the polar angle and azimuthal angles are in the first octant, we do not need to make any adjustments. The angles can be read off to say that the direction of the projection of the peak in the
\(xy\) plane is
\(\approx 29^{\circ} \) counterclockwise from the positive
\(x \) axis and and
\(\approx 81^{\circ} \) towards the
\(xy\)-plane from the
\(z \) axis.
Other ways of specifying direction. One can also find the direction of a vector by working out two of the angles, \(\theta_x \text{,}\) \(\theta_y \text{,}\) and \(\theta_z \text{,}\) the vector makes with the \(x \text{,}\) \(y \text{,}\) and \(z \) axes respectively by using the direction cosines.
\begin{align*}
\amp \cos\, \theta_x = \dfrac{\Delta x}{ \sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2} }\\
\amp \cos\, \theta_y = \dfrac{\Delta y}{ \sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2} }\\
\amp \cos\, \theta_z = \dfrac{\Delta z}{ \sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2} }
\end{align*}