3.6.7 · D13D Geometry

Foundations — Angle between two lines

1,852 words8 min readBack to topic

Before you touch the formula , you must be able to read every mark in it. Let's build them one at a time, each on top of the last, each anchored to a picture. Nothing here is assumed — if the parent note used it, we define it.


1. What a "line in 3D" is, and why only its direction matters

A line is a perfectly straight path that runs forever in both directions. In 3D we live in a room: three independent ways to move — left/right, forward/back, up/down. We name these the , , axes (labelled ruled arrows meeting at one corner).

Figure — Angle between two lines

Because position doesn't matter, we throw the location away and keep just an arrow that shows the direction. That arrow is our next symbol.


2. Vector — the "direction arrow"

The picture: an arrow starting at a dot (the tail) and ending in a sharp point (the head/tip). The direction of the line = the direction the arrowhead points.


3. Components — the arrow written as three numbers

Figure — Angle between two lines
  • = how far the arrow reaches along (right is positive, left is negative).
  • = how far along .
  • = how far along .

Cloze check: A line's direction is fixed by its direction ratios , not by any point on it.


4. Magnitude — the length of the arrow

How do we compute it? The arrow from the origin to is the long diagonal of a box whose sides are , , . Pythagoras in 3D gives:

Figure — Angle between two lines

Notice appears twice on the bottom of the angle formula — once for each arrow — precisely to cancel out length so only direction survives.


5. The dot product — the engine

This is the star of the whole topic, so we build it carefully.

The magic is that this same number also equals a piece of geometry:

Figure — Angle between two lines
Recall The three signs of a dot product

Positive ::: arrows lean the same way, (acute). Zero ::: arrows are perpendicular, . Negative ::: arrows lean opposite ways, (obtuse).


6. and — reading the angle back out

To get itself we undo cosine with (also written ): it answers "which angle has this cosine?". Example: .


7. The modulus on the numerator — forcing "acute"

We met as "length." On a single number it means something plainer:


8. Two shortcut vocabularies the parent leans on


Prerequisite map

3D axes x y z

Line in 3D

Only direction matters

Direction vector b

Components a b c

Magnitude length

Dot product

Solve for cos theta

Modulus forces acute

Angle between two lines

Direction cosines

Cross product


Equipment checklist

State the plain-words meaning of each — reveal to self-test.

What does a direction vector represent?
An arrow pointing along the line; only its direction matters, not its length or position.
What are the components / direction ratios ?
How far the arrow reaches along the , , axes; only their ratio matters.
How do you compute the magnitude and why that formula?
— Pythagoras applied twice gives the length of the box's diagonal.
Two forms of the dot product?
Components: ; geometry: .
What does tell you?
The arrows are perpendicular ().
What does (arccos) do?
Undoes cosine — answers "which angle has this cosine?"
Why the modulus on the numerator?
A line points both ways; strips the sign so the answer is the acute angle .
Difference between and ?
Around a vector → length; around a plain number → sign stripped off.
What makes direction cosines special?
They are a unit-length direction vector, so the denominators become .

Connections