Mathematics / Geometry 3D & Vector Analysis 100% Free Open Access
Chapter 1 • Theory & Derivations

3D Coordinate Systems, Direction Cosines, Ratios & Projections

Cartesian, Cylindrical & Spherical Coordinates, Fundamental Direction Cosine Identity & Tetrahedral Angles

§1.13D Coordinate Systems: Cartesian, Cylindrical & Spherical Frames

1. The Right-Handed Cartesian Frame $\mathbb{R}^3$

In three-dimensional Euclidean space $\mathbb{R}^3$, three mutually perpendicular oriented lines intersecting at a common origin $O(0, 0, 0)$ define the coordinate axes: the $x$-axis, $y$-axis, and $z$-axis. By standard convention, these axes satisfy the Right-Hand Rule: rotating the positive $x$-axis into the positive $y$-axis through $\pi/2$ advances a right-handed screw along the positive $z$-axis ($\hat{i} \times \hat{j} = \hat{k}$).

The three coordinate planes partition space into eight octants:

$$\begin{aligned} xy\text{-plane: } & z = 0 \\ yz\text{-plane: } & x = 0 \\ zx\text{-plane: } & y = 0 \end{aligned}$$

Any point $P \in \mathbb{R}^3$ is uniquely identified by the ordered triplet of signed perpendicular distances $(x, y, z)$.

2. Cylindrical Coordinates $(\rho, \phi, z)$

Cylindrical coordinates combine 2D polar coordinates in the $xy$-plane with the Cartesian altitude $z$:

$$x = \rho \cos\phi, \qquad y = \rho \sin\phi, \qquad z = z$$

where $\rho = \sqrt{x^2 + y^2} \ge 0$ is the radial distance from the $z$-axis, and $\phi \in [0, 2\pi)$ is the azimuthal angle measured counterclockwise from the positive $x$-axis. The differential volume element is:

$$dV = \rho \, d\rho \, d\phi \, dz$$

3. Spherical Polar Coordinates $(r, \theta, \phi)$

Spherical coordinates specify the Euclidean distance $r$ from the origin, the polar/colatitude angle $\theta$ from the positive $z$-axis, and the azimuthal angle $\phi$ in the $xy$-plane:

$$\begin{aligned} x &= r \sin\theta \cos\phi \\ y &= r \sin\theta \sin\phi \\ z &= r \cos\theta \end{aligned} \quad \Longleftrightarrow \quad \begin{aligned} r &= \sqrt{x^2 + y^2 + z^2} \ge 0 \\ \theta &= \arccos(z / r) \in [0, \pi] \\ \phi &= \operatorname{atan2}(y, x) \in [0, 2\pi) \end{aligned}$$

The Jacobian determinant of this transformation yields the spherical volume element:

$$J = \frac{\partial(x, y, z)}{\partial(r, \theta, \phi)} = r^2 \sin\theta \implies \mathbf{dV = r^2 \sin\theta \, dr \, d\theta \, d\phi}$$

§1.2Euclidean Distance, Section Formulas & Spatial Centroids

1. Euclidean Distance Metric in $\mathbb{R}^3$

Let $P_1(x_1, y_1, z_1)$ and $P_2(x_2, y_2, z_2)$ be two distinct points in space. By double application of the Pythagorean theorem across the rectangular box having $P_1 P_2$ as main spatial diagonal:

$$d(P_1, P_2) = \|\vec{r}_2 - \vec{r}_1\| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

2. Section Formulas (Internal & External Division)

Let $P(x, y, z)$ divide the line segment joining $P_1(x_1, y_1, z_1)$ and $P_2(x_2, y_2, z_2)$ in the ratio $m : n$:

  • Internal Division ($m : n > 0$): $$\mathbf{P = \left( \frac{m x_2 + n x_1}{m + n}, \, \frac{m y_2 + n y_1}{m + n}, \, \frac{m z_2 + n z_1}{m + n} \right)}$$
  • External Division ($m : -n$): $$\mathbf{P = \left( \frac{m x_2 - n x_1}{m - n}, \, \frac{m y_2 - n y_1}{m - n}, \, \frac{m z_2 - n z_1}{m - n} \right)} \quad (m \ne n)$$

3. Centroids of Spatial Polygons and Polyhedra

  • Triangle Centroid: For vertices $A, B, C$, the centroid $G$ is the concurrency point of the three medians: $$G = \left( \frac{x_A + x_B + x_C}{3}, \, \frac{y_A + y_B + y_C}{3}, \, \frac{z_A + z_B + z_C}{3} \right)$$
  • Tetrahedron Centroid: For vertices $A, B, C, D$, the centroid $G$ divides each line segment joining a vertex to the centroid of the opposite face in the ratio $3 : 1$: $$G = \left( \frac{x_A + x_B + x_C + x_D}{4}, \, \frac{y_A + y_B + y_C + y_D}{4}, \, \frac{z_A + z_B + z_C + z_D}{4} \right)$$

§1.3Direction Angles, Direction Cosines & The Fundamental Pythagorean Identity

1. Direction Angles and Direction Cosines

Let an oriented ray $L$ pass through the origin $O$ in direction of unit vector $\hat{u}$. Let $\alpha, \beta, \gamma \in [0, \pi]$ be the positive inclination angles made by $L$ with the positive $x$, $y$, and $z$ axes respectively. These are the direction angles of $L$.

Their cosines are called the Direction Cosines (DCs), conventionally denoted by $(l, m, n)$:

$$l = \cos\alpha, \qquad m = \cos\beta, \qquad n = \cos\gamma$$

2. Rigorous Proof of the Fundamental Identity: $l^2 + m^2 + n^2 = 1$

Let $P(x, y, z)$ be a point on line $L$ at distance $r = \sqrt{x^2 + y^2 + z^2} > 0$ from origin $O$. Projecting $P$ orthogonally onto the coordinate axes:

$$x = r \cos\alpha = r l, \qquad y = r \cos\beta = r m, \qquad z = r \cos\gamma = r n$$

Squaring and adding these three projection relations:

$$x^2 + y^2 + z^2 = r^2 l^2 + r^2 m^2 + r^2 n^2 = r^2 (l^2 + m^2 + n^2)$$

Since $x^2 + y^2 + z^2 = r^2$, dividing both sides by $r^2 \ne 0$ establishes:

$$\mathbf{l^2 + m^2 + n^2 = \cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1} \quad \blacksquare$$

Consequently, the unit direction vector along the line is identically $\hat{u} = l\hat{i} + m\hat{j} + n\hat{k}$.

3. Direction Ratios (DRs) & Normalization

Any three real numbers $(a, b, c)$ proportional to the direction cosines $(l, m, n)$ are called Direction Ratios (DRs):

$$\frac{l}{a} = \frac{m}{b} = \frac{n}{c} = k \implies l = ka, \quad m = kb, \quad n = kc$$

Substituting into $l^2 + m^2 + n^2 = 1$:

$$k^2 (a^2 + b^2 + c^2) = 1 \implies k = \frac{\pm 1}{\sqrt{a^2 + b^2 + c^2}}$$
$$\mathbf{l = \frac{a}{\pm\sqrt{a^2 + b^2 + c^2}}, \qquad m = \frac{b}{\pm\sqrt{a^2 + b^2 + c^2}}, \qquad n = \frac{c}{\pm\sqrt{a^2 + b^2 + c^2}}}$$

§1.4Projections of Line Segments onto Oriented Lines & Planes

1. Projection of a Line Segment onto an Oriented Line

Let $AB$ be a directed line segment with initial point $A(x_1, y_1, z_1)$ and terminal point $B(x_2, y_2, z_2)$. Let $L$ be an oriented line with direction cosines $(l, m, n)$.

The vector displacement is $\vec{AB} = (x_2 - x_1)\hat{i} + (y_2 - y_1)\hat{j} + (z_2 - z_1)\hat{k}$. The orthogonal projection $p$ of $AB$ onto line $L$ is the scalar dot product with the unit direction vector $\hat{u} = l\hat{i} + m\hat{j} + n\hat{k}$:

$$\mathbf{p = \vec{AB} \cdot \hat{u} = l(x_2 - x_1) + m(y_2 - y_1) + n(z_2 - z_1)}$$

2. Length of a Line Segment in Terms of Projections

Projecting segment $AB$ onto the three orthogonal coordinate axes gives projections $p_x = x_2 - x_1$, $p_y = y_2 - y_1$, and $p_z = z_2 - z_1$. The length of $AB$ is the Euclidean norm of its projections:

$$AB = \sqrt{p_x^2 + p_y^2 + p_z^2}$$

Furthermore, if $p_1, p_2, p_3$ are projections of $AB$ onto any three mutually orthogonal spatial lines, then $AB^2 = p_1^2 + p_2^2 + p_3^2$.

§1.5Angle Between Two Lines & Distance of a Point from a Line

1. Angle Between Two Lines

Let $L_1$ and $L_2$ be two lines with direction cosines $(l_1, m_1, n_1)$ and $(l_2, m_2, n_2)$ and unit vectors $\hat{u}_1, \hat{u}_2$. The angle $\theta \in [0, \pi]$ between them is given by:

$$\cos\theta = \hat{u}_1 \cdot \hat{u}_2 = l_1 l_2 + m_1 m_2 + n_1 n_2$$

Using Lagrange's trigonometric identity, $\sin^2\theta = 1 - \cos^2\theta = (l_1^2 + m_1^2 + n_1^2)(l_2^2 + m_2^2 + n_2^2) - (l_1 l_2 + m_1 m_2 + n_1 n_2)^2$:

$$\sin\theta = \sqrt{(m_1 n_2 - m_2 n_1)^2 + (n_1 l_2 - n_2 l_1)^2 + (l_1 m_2 - l_2 m_1)^2}$$
  • Orthogonality Criterion ($L_1 \perp L_2$): $$\mathbf{l_1 l_2 + m_1 m_2 + n_1 n_2 = 0 \quad \Longleftrightarrow \quad a_1 a_2 + b_1 b_2 + c_1 c_2 = 0}$$
  • Parallelism Criterion ($L_1 \parallel L_2$): $$\mathbf{\frac{l_1}{l_2} = \frac{m_1}{m_2} = \frac{n_1}{n_2} \quad \Longleftrightarrow \quad \frac{a_1}{a_2} = \frac{b_1}{b_2} = \frac{c_1}{c_2}}$$

2. Perpendicular Distance of a Point from a Line

Let $P(x_1, y_1, z_1)$ be a point in space, and let line $L$ pass through $A(x_0, y_0, z_0)$ with direction cosines $(l, m, n)$. Let $M$ be the foot of the perpendicular from $P$ onto $L$. In right triangle $\triangle APM$:

$$AM = \text{proj}_L \vec{AP} = l(x_1 - x_0) + m(y_1 - y_0) + n(z_1 - z_0)$$
$$AP^2 = (x_1 - x_0)^2 + (y_1 - y_0)^2 + (z_1 - z_0)^2$$
$$\mathbf{d = PM = \sqrt{AP^2 - AM^2} = \frac{\|\vec{AP} \times \vec{d}\|}{\|\vec{d}\|}}$$
TIERED UNIVERSITY HONORS PROBLEMS

Step-by-Step Solved Examination Problems

Comprehensive analytical derivations, multi-tier solutions (Foundational, Intermediate Exam, and Honors/Proof Challenge) with complete line-by-line verification.

Tier 1: Foundational Direction Cosines & Acute Angle Between Lines
Two lines $L_1$ and $L_2$ have direction ratios proportional to $(2, 3, 6)$ and $(1, 2, 2)$ respectively. (a) Find the normalized direction cosines for both lines. (b) Find the acute angle $\theta$ between $L_1$ and $L_2$.
Tier 2: Intermediate Exam Foot of the Perpendicular & Point-Line Distance
Find the coordinates of the foot of the perpendicular $M$ and the perpendicular distance from point $P(1, 2, 3)$ to the line passing through $A(2, 1, 0)$ and $B(0, 3, 2)$.
Tier 3: Honors / Proof Challenge Mutual Equiangular Rays & The Regular Tetrahedral Angle
Let four distinct lines in $\mathbb{R}^3$ through the origin have unit direction vectors $\hat{u}_1, \hat{u}_2, \hat{u}_3, \hat{u}_4$ such that every pair of lines makes the exact same angle $\theta$ with each other ($\hat{u}_i \cdot \hat{u}_j = \cos\theta$ for all $i \ne j$). (a) Prove that $\cos\theta = -\frac{1}{3}$. (b) Deduce the exact value of the regular tetrahedral bond angle $\theta = \arccos(-1/3) \approx 109.47^{\circ}$. (c) Prove that it is impossible to have five mutually equiangular lines in $\mathbb{R}^3$ with this symmetry.