Direction Cosines from Direction Angles in 3D
Problem
If a line makes angles 90°, 135°, 45° with the x, y and z-axes respectively, find its direction cosines.
Explanation
We are given a line in 3D space that makes the following angles with the coordinate axes:
- With the x-axis:
- With the y-axis:
- With the z-axis:
The direction cosines of a line are defined as:
These form the components of a unit vector in the direction of the line:
and they must satisfy the identity
Step 1: Compute each cosine
- With the x-axis
- With the y-axis
- With the z-axis
So the direction cosines are:
Step 2: Verify the identity
Check that they form a unit vector:
The condition is satisfied, so the direction cosines are consistent.
Final Answer
The direction cosines of the line are:
Visualization Idea
The canvas shows the 3D axes (x, y, z projected in perspective) and a unit vector representing the line, with components equal to the direction cosines:
You can interactively change the three angles with sliders. The visualization will:
- Compute , ,
- Draw a 3D-ish coordinate frame
- Plot the direction vector with those cosines
- Draw projections of the vector onto each axis
- Show a small check of as a bar: if it is 1, the bar is neon cyan; if not, it fades towards pink to hint that the three angles are not consistent with a single line.
Use the toggle to snap to the problem's given angles (90°, 135°, 45°) and see the exact solution vector.