Hide outline
Feedback

3D Trigonometry With Vectors and Coordinates

3D Trigonometry With Vectors and Coordinates

Turn 3D angle and distance questions into a small set of repeatable moves using vectors, the dot product, and projections. You will know what to compute first, how to set it up from coordinates, and how to sanity check the result.

Most 3D trigonometry with vectors and coordinates is not about memorizing exotic formulas. It is about turning geometry into two ingredients you already know from 2D. A length from the distance formula, and an angle from the dot product. Once you can draw a triangle in your head using vectors, the trig part is usually a single cosine. The rest is bookkeeping. The good news is that coordinates make the bookkeeping honest. Every component has a job, and you can check your work by units and by extremes.

The shortcut that powers most 3D trig

If you remember one idea, make it this. In 3D, the angle between two directions is still defined by the same cosine rule you used in the plane. The only difference is that the directions live in three components instead of two.

The dot product is the bridge from coordinates to trig. For vectors u=u1,u2,u3\vec u=\langle u_1,u_2,u_3\rangle and v=v1,v2,v3\vec v=\langle v_1,v_2,v_3\rangle,

uv=u1v1+u2v2+u3v3=uvcosθ\vec u\cdot\vec v=u_1v_1+u_2v_2+u_3v_3=\|\vec u\|\|\vec v\|\cos\theta

So if you can build vectors from points, and compute lengths, you can get cosθ\cos\theta and then θ\theta.

To see how the angle changes when a point moves while the other stays fixed, use the interactive view below. It keeps the geometry honest because you can watch the vectors and the angle respond together.

One move
Start by writing two vectors that share a tail, then use uv=uvcosθ\vec u\cdot\vec v=\|\vec u\|\|\vec v\|\cos\theta. Most angle problems reduce to that line.

Building blocks in 3D coordinates

A point is a location like A(x,y,z)A(x,y,z). A vector is a change in position, like a displacement or direction with length. In coordinates, the vector from A(x1,y1,z1)A(x_1,y_1,z_1) to B(x2,y2,z2)B(x_2,y_2,z_2) is

AB=x2x1,  y2y1,  z2z1\overrightarrow{AB}=\langle x_2-x_1,\;y_2-y_1,\;z_2-z_1\rangle

That subtraction is not a formula to memorize. It is the literal meaning of change in each coordinate.

Length follows the 3D distance formula. For v=a,b,c\vec v=\langle a,b,c\rangle,

v=a2+b2+c2\|\vec v\|=\sqrt{a^2+b^2+c^2}

Two quick sanity checks save beginners a lot of time.

  • If you double every component of a vector, its length doubles.
  • If only one component is nonzero, the length is the absolute value of that component.

The next widget lets you flip between point pairs and the vector they create, then watch how each component pulls the direction and length.

Direction in 3D is not one angle. It is a heading in space, which is why vectors are the right language. Angles come back when you compare one direction to another.

Angles in 3D using the dot product

The angle θ\theta between two nonzero vectors u\vec u and v\vec v in 3D is defined by

cosθ=uvuv\cos\theta=\frac{\vec u\cdot\vec v}{\|\vec u\|\|\vec v\|}

This is the same definition used in 2D. It works in any dimension because it depends only on components, length, and the idea of projection.

Vector angle vs direction angles

The vector angle is between two vectors. Direction angles are different. They are the angles a vector makes with the positive xx, yy, and zz axes. If v=a,b,c\vec v=\langle a,b,c\rangle and v=L\|\vec v\|=L, then

  • cosα=aL\cos\alpha=\frac{a}{L} with the xx-axis
  • cosβ=bL\cos\beta=\frac{b}{L} with the yy-axis
  • cosγ=cL\cos\gamma=\frac{c}{L} with the zz-axis

These three cosines fit together. They satisfy cos2α+cos2β+cos2γ=1\cos^2\alpha+\cos^2\beta+\cos^2\gamma=1, which is a great check when your arithmetic feels shaky.

Try a couple of vectors and let the tool compute the angle, cosθ\cos\theta, and the direction angles so you can connect the numbers back to geometry.

Range check
If your computed cosθ\cos\theta is slightly outside [1,1][-1,1], it is almost always rounding or arithmetic. Fix that before taking an inverse cosine.

Distance and closest approach

Distances in 3D trig problems usually come from one of three geometric ideas. Point to point, shortest drop to a line, and shortest drop to a plane. The shared theme is perpendicularity. The shortest path hits the target at a right angle.

Point to point

Distance between points is just the length of AB\overrightarrow{AB}. Many problems hide this step by wrapping it in words like separation, range, or displacement.

Point to line

A line is best thought of as a point plus a direction. If the line passes through P0P_0 and has direction d\vec d, then points on it look like P(t)=P0+tdP(t)=P_0+t\vec d. The distance from a point QQ to the line is the length of the part of P0Q\overrightarrow{P_0Q} perpendicular to d\vec d. That is a projection idea, not a new distance formula.

Point to plane

A plane is best thought of as a point plus a normal direction. If the plane has equation Ax+By+Cz+D=0Ax+By+Cz+D=0, then n=A,B,C\vec n=\langle A,B,C\rangle is normal to the plane. Distance from Q(x0,y0,z0)Q(x_0,y_0,z_0) to the plane is the absolute value of how far you travel along n\vec n to hit the plane.

The visualization below shows the perpendicular drop that creates each shortest distance, so you can stop guessing which segment matters.

Once you see distance as a perpendicular component, projections stop feeling like extra machinery and start feeling like the obvious move.

Projections and perpendicular components

When a vector points partly along a direction and partly away from it, you can split it into two pieces. The parallel piece is the projection. The leftover is the perpendicular piece, sometimes called the rejection.

Let v\vec v be the vector you want to resolve, and let d\vec d be the direction you are projecting onto.

  • Scalar projection of v\vec v onto d\vec d is vdd\frac{\vec v\cdot\vec d}{\|\vec d\|}
  • Vector projection is projdv=vdd2d\text{proj}_{\vec d}\vec v=\frac{\vec v\cdot\vec d}{\|\vec d\|^2}\vec d
  • Perpendicular part is vprojdv\vec v-\text{proj}_{\vec d}\vec v

This is where trig is hiding. The dot product measures how much of v\vec v points along d\vec d, which is why it produces a cosine when you normalize by lengths.

The next interactive view lets you decompose a vector onto a direction and onto a plane so you can see the parallel and perpendicular pieces as actual arrows, not symbols.

Fast decision
If the question says closest, shortest, or perpendicular, you are already in projection territory.

Cross product intuition without memorizing

The cross product is a way to build a vector perpendicular to two others, and its length captures area.

For vectors u\vec u and v\vec v,

  • u×v\vec u\times\vec v is perpendicular to both u\vec u and v\vec v
  • u×v=uvsinθ\|\vec u\times\vec v\|=\|\vec u\|\|\vec v\|\sin\theta
  • u×v\|\vec u\times\vec v\| equals the area of the parallelogram spanned by u\vec u and v\vec v

So dot product pairs with cosine and parallel information. Cross product pairs with sine and perpendicular information.

Lines and planes using normals

A plane’s direction is easiest to handle through a normal vector. If you have two nonparallel direction vectors in the plane, their cross product gives a normal. Once you have a normal, angles and distances to planes often reduce to dot products with that normal.

The widget below connects the parallelogram area, the normal direction, and the angle relationships between lines and planes.

A useful angle relationship to keep straight. Angle between a line and a plane is the complement of the angle between the line’s direction and the plane’s normal.

One workflow for common 3D problems

The goal is not to memorize problem types. It is to build a reflex. Build vectors, pick dot or cross or projection, then compute.

A reliable setup checklist

  • Choose points so your key vectors share a tail when you need an angle.
  • Write directions as vectors, not as words like toward or along.
  • Decide whether you need parallel information (dot) or perpendicular information (cross or projection).
  • Compute the one quantity that the question is actually asking for, not every angle you can find.

Use the templates below to practice that workflow on classic tasks like skew line angles and plane distances.

Common snag
Skew lines do not meet, so you cannot form an angle at an intersection point. You form the angle between their direction vectors.

When different coordinates make trig easier

Cartesian coordinates are great when everything is built from point differences. Some shapes and motions become simpler in other systems.

Cylindrical vs spherical

Cylindrical coordinates (r,θ,z)(r,\theta,z) are useful when rotation around the zz-axis matters. Circles become r=constantr=\text{constant} and vertical motion is just zz.

Spherical coordinates (ρ,θ,ϕ)(\rho,\theta,\phi) are useful when distance from the origin and angular direction matter. Spheres become ρ=constant\rho=\text{constant}, and direction is built in.

A quick way to choose.

  • Use cylindrical when you see circles around an axis or a height plus radius pattern.
  • Use spherical when you see spheres, cones, or a problem that repeatedly mentions distance from the origin.

Compare the two systems side by side and notice which one makes the distance or angle you care about look like a single component.

Next mental model to keep

Most mistakes in 3D trigonometry with vectors and coordinates come from choosing the wrong first tool, then forcing algebra to compensate. Pick the tool based on the geometric relationship you need.

Dot product answers how aligned two directions are. Cross product answers how perpendicular they are and builds a normal. Projection answers how far along or away you are from a direction or plane. When you start there, the formulas feel like consequences instead of rules.

Was this lesson helpful?
Dive Deeper

Generate a follow-up sub-lesson on any aspect of this topic

Related content