# Angle between two lines in space

1. May 7, 2008

### 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: May 7, 2008
2. May 7, 2008

### Nedeljko

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]$$.

3. May 7, 2008

### HallsofIvy

Staff Emeritus
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.

4. May 7, 2008

### Physicsissuef

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

5. May 8, 2008

### Nedeljko

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]$$.

6. May 8, 2008

### Physicsissuef

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

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?