# Angle between two lines in space

• Physicsissuef
In summary, the formula for calculating the angle between two lines in space involves finding the cosine of the angle between the two vectors formed by the lines. This is represented by the formula cos\alpha=\frac{|\vec{a} \vec{b}|}{|\vec{a}||\vec{b}|} or cos\alpha=\frac{|a_1b_1+a_2b_2+a_3b_3|}{\sqrt{a_1^2+a_2^2+a_3^2}\sqrt{b_1^2+b_2^2+b_3^2}}. The angle between two lines in space cannot be greater than \pi/2 and belongs to the

#### Physicsissuef

The formula of angle between two lines in space is:

$$\vec{a}=(a_1,a_2,a_3)$$ ; $$\vec{b}=(b_1,b_2,b_3)$$

$$cos\alpha=\frac{|\vec{a} \vec{b}|}{|\vec{a}||\vec{b}|}$$

or out from there:

$$cos\alpha=\frac{|a_1b_1+a_2b_2+a_3b_3|}{\sqrt{a_1^2+a_2^2+a_3^2}\sqrt{b_1^2+b_2^2+b_3^2}}$$

Why it is $|\vec{a}\vec{b}|$? Why not $\vec{a} \vec{b}$?

Scalar product of two vectors is $$\vec{a}\vec{b}=|\vec{a}||\vec{b}|cos(\vec{a},\vec{b})$$

Last edited:
Because any line contains infinitely many vectors of both directions. The angle between two lines in space can not be greater than $$\pi/2$$

Angle between two vectors belongs to $$[0,\pi]$$.

There are two angles between lines- well, strictly speaking there are four but by "vertical angles theorem" in geometry there are two different angles. If the lines are perpendicular all four angles are right angles, otherwise two angles are less than right, the other two larger. By "the angle" between two lines, we mean the smaller so, as Nedeljko said, the angle cannot be larger than a right angle: the cos must be positive.

And what will happen if I use angle from [-pi/2, pi]? Can you give me some example?

I speak about angle between two lines in the light of measure of mutable position of the lines. More specific, if $$a,b,c,d$$ are lines such that $$a$$ and $$b$$ has intersection point and $$c$$ and $$d$$ has intersection point then $$a\cup b=c\cup d$$ if and only if the angle between $$a$$ and $$b$$ is equal tothe angle between $$c$$ and $$d$$. (Angles are in $$[0,\pi/2]$$.)

If you expect the angle between lines in $$[0,\pi$$, then you can not determine the angle without additional informations (what of four angles determined by the lines etc.).

You can use interval $$[a,b]$$, $$a<b$$ if $$\cos$$ is injective on $$[a,b]$$ and if the image of $$[a,b]$$ under $$\cos$$ is $$[0,1]$$.

Sorry, but can you give me some example, when it works, and when it didn't work?