We are given two lines in vector form:
Line 1: Line 2: r=(3,2,−4)+λ(1,2,2)r=(5,−2,0)+μ(3,2,6)
Each line is written as:
r=a+tb
where:
- a is a fixed point on the line,
- b is the direction vector of the line,
- t is a scalar parameter.
So for our lines:
b1=(1,2,2),b2=(3,2,6)
The angle between the two lines is the same as the angle between their direction vectors b1 and b2.
Step 1: Recall the dot product formula
For any two vectors u and v:
u⋅v=∣u∣∣v∣cosθ
where θ is the angle between them.
Rearranging:
cosθ=∣u∣∣v∣u⋅v
We will apply this to b1 and b2.
Step 2: Compute the dot product b1⋅b2
b1=(1,2,2),b2=(3,2,6)
Dot product:
b1⋅b2=1⋅3+2⋅2+2⋅6=3+4+12=19
Step 3: Compute the magnitudes ∣b1∣ and ∣b2∣
Magnitude of a vector (x,y,z) is:
∣(x,y,z)∣=x2+y2+z2
For b1=(1,2,2):
∣b1∣=12+22+22=1+4+4=9=3
For b2=(3,2,6):
∣b2∣=32+22+62=9+4+36=49=7
Step 4: Use the cosine formula
cosθ=∣b1∣∣b2∣b1⋅b2=3×719=2119
(We take the absolute value because the angle between two lines is usually taken as the acute angle.)
So:
θ=cos−1(2119)
That is the angle between the given pair of lines.
Visual idea (what the canvas will show)
To make this easy to see:
- We place the tail of both direction vectors at the center of the canvas (representing the origin).
- We draw:
- A cyan arrow for b1=(1,2,2)
- A pink arrow for b2=(3,2,6)
- We draw the plane spanned by these two vectors as a soft neon grid.
- We highlight the angle between them with a yellow arc and display the numeric value of θ.
- A slider lets you rotate the camera around the origin, so you can see the vectors and the angle from different viewpoints.
This helps you connect the algebraic formula (dot product) with the geometric picture (angle between arrows in 3D).