Perplex
Dashboard
Topics
Exponents & LogarithmsApproximations & ErrorSequences & SeriesMatricesComplex NumbersFinancial Mathematics
Cartesian plane & linesFunction TheoryModellingTransformations & asymptotes
2D & 3D GeometryVoronoi DiagramsTrig equations & identitiesVectorsGraph Theory
ProbabilityDescriptive StatisticsBivariate StatisticsDistributions & Random VariablesInference & Hypotheses
DifferentiationIntegrationDifferential Equations
Review VideosFormula BookletMy Progress
BlogLanding Page
Sign UpLogin
Perplex
Perplex
Dashboard
Topics
Exponents & LogarithmsApproximations & ErrorSequences & SeriesMatricesComplex NumbersFinancial Mathematics
Cartesian plane & linesFunction TheoryModellingTransformations & asymptotes
2D & 3D GeometryVoronoi DiagramsTrig equations & identitiesVectorsGraph Theory
ProbabilityDescriptive StatisticsBivariate StatisticsDistributions & Random VariablesInference & Hypotheses
DifferentiationIntegrationDifferential Equations
Review VideosFormula BookletMy Progress
BlogLanding Page
Sign UpLogin
Perplex
IB Math AIHL
/
Vectors
/
Skills
Edit

Skill Checklist

Track your progress across all skills in your objective. Mark your confidence level and identify areas to focus on.

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

IB Math AIHL
/
Vectors
/
Skills
Edit

Skill Checklist

Track your progress across all skills in your objective. Mark your confidence level and identify areas to focus on.

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Skill Checklist

Track your progress across all skills in your objective. Mark your confidence level and identify areas to focus on.

26 Skills Available

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Vector arithmetic & geometry

12 skills
2D vector notation
AHL AI 3.10

Just as points in the plane have an ​x​ and a ​y, 2D vectors have 2 components. We call these ​i​ and ​j.


The following diagram shows the vector ​−3i−4j, which can also be written as ​(−3−4​)​

Concept of a vector
AHL AI 3.10

A vector is an arrow in space. It specifies movement in a particular direction. For example, the vector ​i+2j​ means "move ​1​ unit right and ​2​ units up".


The difference between the vector ​i+2j​ and the point ​(1,2)​ is that a vector can start anywhere, and only specifies a movement. For example, all the vectors below are ​i+2j.

Addition of 2D vectors
AHL AI 3.10

Vectors in 2D can be added an subtracted using a diagram. For example, if ​a=−i+2j​ and ​b=3i−2j, then we can find ​2a+b​ as follows:

So ​2a+b=i+2j, which we can also find by adding components:

​
2a+b=2(−i+2j)+(3i−2j)=(−2+3)i+(4−2)j
​
Position Vectors
AHL AI 3.10

Vectors can be used to describe the position of points in space, relative to the origin ​O. For example, if the point ​A​ has coordinates ​A(3,1), then its position vector is

​
OA=3i+j=(31​)
​

This vector tells you how to get from the origin to point ​A, and is only subtly different from the concept of coordinates. If ​B​ has coordinates ​B(−4,3), then its position vector is

​
OB=−4i+3j=(−43​)
​

In the diagram below, the arrows are the position vectors, which are technically different from the points themselves.


Displacement vectors and triangle law
AHL AI 3.10

A displacement vector tells you how to go from one point to another in space.


For example, suppose point ​A​ has position vector ​OA=3i+j=(31​), and  ​B​ has position vector ​OB=−4i+3j=(−43​).

The displacement vector ​AB​ is the vector that goes from ​A​ to ​B:

To find the displacement vector ​AB, we could count squares on the grid. But the more important thing to realize is that these three vectors form a triangle, and if we reverse one of the position vectors it forms a loop, meaning we've gone nowhere:

​
OA+AB+BO=(00​)
​

But

​
BO=−OB=(4−3​)
​

So

​
(31​)+AB+(4−3​)=(00​)
​

Now isolate:

​
AB=(00​)−(31​)−(4−3​)=(−72​)
​


In general, we find the displacement vector from ​X​ to ​Y​ by finding

​
XY=OY−OX
​

You can think of this as saying

​
to get from X to Y, first go from X to O, and then from O to Y
​
Scalar multiples of vectors
AHL AI 3.10

Scaling a vector means multiplying it by a number ​k, which stretches the vector by a factor of ​k. If ​k<0, then the direction of the vector flips.

Parallel vectors
AHL AI 3.10

Two vectors are parallel if one can be written as a scalar multiple of the other, i.e., if ​u=kv​ for some scalar ​k. Parallel vectors have identical or exactly opposite directions.

3D base and column vectors
AHL AI 3.10

A vector is a mathematical object that has both magnitude (size) and direction in space. A three-dimensional vector is typically described by its components along the ​x,  ​y, and ​z​ axes.


In 3 dimensions, a vector is expressed as

​
⎝⎛​v1​v2​v3​​⎠⎞​=v1​i+v2​j+v3​k
​

where ​i,  ​j, and ​k​ are called the base vectors:

​
i=⎝⎛​100​⎠⎞​,j=⎝⎛​010​⎠⎞​,k=⎝⎛​001​⎠⎞​
​
Adding & subtracting vectors in 3D
AHL AI 3.10

To add two vectors, add their corresponding components:

​
⎝⎛​x1​y1​z1​​⎠⎞​+⎝⎛​x2​y2​z2​​⎠⎞​=⎝⎛​x1​+x2​y1​+y2​z1​+z2​​⎠⎞​
​


To subtract two vectors, subtract their corresponding components:

​
⎝⎛​x1​y1​z1​​⎠⎞​−⎝⎛​x2​y2​z2​​⎠⎞​=⎝⎛​x1​−x2​y1​−y2​z1​−z2​​⎠⎞​
​

Addition corresponds to placing vectors head-to-tail, and subtraction corresponds to the displacement between their tips.

Zero vector and negative vector
AHL AI 3.10

The zero vector ​0​ is a special vector without size or a defined direction, represented by

​
0=⎝⎛​000​⎠⎞​
​

The negative of a vector reverses the vector's direction while maintaining its size. If ​v=⎝⎛​xyz​⎠⎞​, then the negative is

​
−v=⎝⎛​−x−y−z​⎠⎞​
​

pointing in exactly the opposite direction.

Vector Magnitude
AHL AI 3.10

The magnitude (or length) of a vector ​v=⎝⎛​v1​v2​v3​​⎠⎞​​ is calculated as

​
∣v∣=√v12​+v22​+v32​​📖
​


Geometrically, this represents the distance from the vector's starting point to its endpoint in 3D space. For example, the magnitude of the displacement vector ​AB​ equals the straight-line distance between points ​A​ and ​B.

Unit vectors
AHL AI 3.10

When a vector ​u​ has a magnitude of ​1, we say ​u​ is a unit vector.


We often express other vectors ​v​ with magnitude ​∣v∣=1​ as scalar multiples of the unit vector pointing in the same direction,

​
v=ku
​

where ​k=∣v∣.


The unit vector in the same direction as a non-unit vector ​v​ is written as

​
u=∣v∣v​
​

Rescaling to form a vector with a magnitude of one is referred to as normalizing a vector.

Scalar product

5 skills
Scalar product
AHL AI 3.13

The scalar product, also called the dot product, takes two vectors and produces a scalar (a number). For two vectors ​v=⎝⎛​v1​v2​v3​​⎠⎞​​ and ​w=⎝⎛​w1​w2​w3​​⎠⎞​, the scalar product is calculated as:

​
v⋅w=v1​w1​+v2​w2​+v3​w3​📖
​

This operation combines corresponding components of each vector, resulting in a single numerical value.

Angle between vectors
AHL AI 3.13

The scalar product also has a geometric interpretation involving the angle ​θ​ between two vectors:

​
v⋅w=∣v∣∣w∣cosθ📖
​

Equivalently, isolating ​cosθ:

​
cosθ=∣v∣∣w∣v1​w1​+v2​w2​+v3​w3​​📖
​


The angle ​θ​ is measured between the heads of ​v​ and ​w:

Acute vs Obtuse Angles
AHL AI 3.13

If the scalar product of two vectors is negative, then

​
cosθ=∣u∣⋅∣v∣u⋅v​<0
​

and thus ​θ​ must be an obtuse angle: ​90°<θ≤180°.


But since vectors always form an acute AND an obtuse angle, we can find the acute angle by subtracting

​
180°−θ
​

whenever ​θ>90°.


Perpendicular vectors
AHL AI 3.13

Since ​v⋅w=∣v∣∣w∣cosθ, if two vectors are perpendicular then ​cos90°=0⇒​ their scalar product is ​0.

Properties of the scalar product
AHL AI 3.13

For any vectors ​u,  ​v, and ​w, and scalar ​k:


​
u⋅v=v⋅u🚫
​


​
u⋅(v+w)=u⋅v+u⋅w🚫
​


​
(ku)⋅v=k(u⋅v)=u⋅(kv)🚫
​


​
u⋅u=∣u∣2🚫
​


Vector Product

5 skills
Vector product
AHL AI 3.13

The vector product, sometimes called the cross product, of two vectors ​v​ and ​w​ is given by:

​
v×w=⎝⎛​v2​w3​−v3​w2​v3​w1​−v1​w3​v1​w2​−v2​w1​​⎠⎞​📖
​

This vector is perpendicular to both original vectors. Using the right-hand rule, if your index finger points in the direction of ​v​ and your middle finger points towards ​w, your thumb points towards ​v×w. The vector product thus creates a new vector perpendicular to both original vectors.

problem image
Vector areas with cross product
AHL AI 3.13

The magnitude of the vector product ​v×w​ gives the area of the parallelogram formed by vectors ​v​ and ​w:

​
Area=∣v×w∣📖
​

Intuitively, this happens because the magnitude combines both vectors’ lengths and how "spread out" they are from each other, capturing exactly the amount of two-dimensional space they span.

Vector product and sin of angle
AHL AI 3.13

The magnitude of the vector product is connected to the sine of the angle between the vectors by the formula

​
∣v×w∣=∣v∣∣w∣sinθ📖
​

Here, ​θ​ is the angle between vectors ​v​ and ​w. This relationship holds because the area of the parallelogram formed by the two vectors depends on their lengths and the angle separating them.


Specifically, the area is largest when the vectors are perpendicular (​sin90∘=1​) and zero when they are parallel (​sin0∘=0​).

Components of vectors
AHL AI 3.13

For two vectors ​a​ and ​b, the magnitude of the component of vector ​a​ that acts in the direction of vector ​b​ is given by

​
∣a∣cosθ=∣b∣a⋅b​
​

The magnitude of the component of vector ​a​ that acts perpendicular to vector ​b, in the plane formed by the two vectors, is given by

​
∣a∣sinθ=∣b∣∣a×b∣​
​

where ​θ​ is the angle between the two vectors.

Properties of the vector product
AHL AI 3.13

For any vectors ​u,  ​v, and ​w, and scalar ​k:


​
u×v=−(v×u)🚫
​


​
u×(v+w)=u×v+u×w🚫
​


​
(ku)×v=k(u×v)=u×(kv)🚫
​


​
u×u=0🚫
​


​
u×v=0⇒u∥v for non-zerou,v🚫
​

Equations of a line

4 skills
Vector form
AHL AI 3.11

A vector line is defined by specifying one fixed point on the line and a direction vector. If the fixed point is given by position vector ​a, and the direction vector by ​b, then the line in vector form is:

​
r  ​=a+λb📖 =⎝⎛​a1​a2​a3​​⎠⎞​+λ⎝⎛​b1​b2​b3​​⎠⎞​​
​

Here, ​λ∈R​ is a parameter that varies over all real numbers, generating every point on the line. Changing ​λ​ moves the point ​r​ along the direction of ​b, creating the full infinite line.

Parametric form
AHL AI 3.11

A vector line in three-dimensional space can also be expressed in parametric form, showing explicitly the equations for the ​x,  ​y, and ​z​ coordinates separately:


​
x=x0​+λl,y=y0​+λm,z=z0​+λn📖
​


Here, ​(x0​,y0​,z0​)​ is a point on the line, ​(l,m,n)​ are the components of the direction vector, and the parameter ​λ​ controls your position along the line. Changing ​λ​ moves the point continuously along the direction of the vector, producing the full infinite line.

Modeling with vectors
AHL AI 3.12

In kinematics (the mathematical description of motion), 3D motion can be modeled by a vector line, often expressed with the parameter representing time, ​t. 


Specifically, the direction vector ​b​ represents the velocity of an object, indicating both its direction and magnitude of movement. The magnitude of this vector, ​∣b∣, is the object's speed—the rate at which it moves, irrespective of direction.

Angle between lines
AHL AI 3.13

The angle between two lines is simply the angle between their direction vectors.


For any two lines ​r1​=a1​+λb1​​ and ​r2​=a2​+μb2​, the acute angle ​θ​ between ​r1​​ and ​r2​​ can be found via the formula

​
θ=cos−1(∣b1​∣∣b2​∣b1​⋅b2​​)
​

which is just the equation of the scalar product.

Skill Checklist

Track your progress across all skills in your objective. Mark your confidence level and identify areas to focus on.

26 Skills Available

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Track your progress:

Don't know

Working on it

Confident

📖 = included in formula booklet • 🚫 = not in formula booklet

Vector arithmetic & geometry

12 skills
2D vector notation
AHL AI 3.10

Just as points in the plane have an ​x​ and a ​y, 2D vectors have 2 components. We call these ​i​ and ​j.


The following diagram shows the vector ​−3i−4j, which can also be written as ​(−3−4​)​

Concept of a vector
AHL AI 3.10

A vector is an arrow in space. It specifies movement in a particular direction. For example, the vector ​i+2j​ means "move ​1​ unit right and ​2​ units up".


The difference between the vector ​i+2j​ and the point ​(1,2)​ is that a vector can start anywhere, and only specifies a movement. For example, all the vectors below are ​i+2j.

Addition of 2D vectors
AHL AI 3.10

Vectors in 2D can be added an subtracted using a diagram. For example, if ​a=−i+2j​ and ​b=3i−2j, then we can find ​2a+b​ as follows:

So ​2a+b=i+2j, which we can also find by adding components:

​
2a+b=2(−i+2j)+(3i−2j)=(−2+3)i+(4−2)j
​
Position Vectors
AHL AI 3.10

Vectors can be used to describe the position of points in space, relative to the origin ​O. For example, if the point ​A​ has coordinates ​A(3,1), then its position vector is

​
OA=3i+j=(31​)
​

This vector tells you how to get from the origin to point ​A, and is only subtly different from the concept of coordinates. If ​B​ has coordinates ​B(−4,3), then its position vector is

​
OB=−4i+3j=(−43​)
​

In the diagram below, the arrows are the position vectors, which are technically different from the points themselves.


Displacement vectors and triangle law
AHL AI 3.10

A displacement vector tells you how to go from one point to another in space.


For example, suppose point ​A​ has position vector ​OA=3i+j=(31​), and  ​B​ has position vector ​OB=−4i+3j=(−43​).

The displacement vector ​AB​ is the vector that goes from ​A​ to ​B:

To find the displacement vector ​AB, we could count squares on the grid. But the more important thing to realize is that these three vectors form a triangle, and if we reverse one of the position vectors it forms a loop, meaning we've gone nowhere:

​
OA+AB+BO=(00​)
​

But

​
BO=−OB=(4−3​)
​

So

​
(31​)+AB+(4−3​)=(00​)
​

Now isolate:

​
AB=(00​)−(31​)−(4−3​)=(−72​)
​


In general, we find the displacement vector from ​X​ to ​Y​ by finding

​
XY=OY−OX
​

You can think of this as saying

​
to get from X to Y, first go from X to O, and then from O to Y
​
Scalar multiples of vectors
AHL AI 3.10

Scaling a vector means multiplying it by a number ​k, which stretches the vector by a factor of ​k. If ​k<0, then the direction of the vector flips.

Parallel vectors
AHL AI 3.10

Two vectors are parallel if one can be written as a scalar multiple of the other, i.e., if ​u=kv​ for some scalar ​k. Parallel vectors have identical or exactly opposite directions.

3D base and column vectors
AHL AI 3.10

A vector is a mathematical object that has both magnitude (size) and direction in space. A three-dimensional vector is typically described by its components along the ​x,  ​y, and ​z​ axes.


In 3 dimensions, a vector is expressed as

​
⎝⎛​v1​v2​v3​​⎠⎞​=v1​i+v2​j+v3​k
​

where ​i,  ​j, and ​k​ are called the base vectors:

​
i=⎝⎛​100​⎠⎞​,j=⎝⎛​010​⎠⎞​,k=⎝⎛​001​⎠⎞​
​
Adding & subtracting vectors in 3D
AHL AI 3.10

To add two vectors, add their corresponding components:

​
⎝⎛​x1​y1​z1​​⎠⎞​+⎝⎛​x2​y2​z2​​⎠⎞​=⎝⎛​x1​+x2​y1​+y2​z1​+z2​​⎠⎞​
​


To subtract two vectors, subtract their corresponding components:

​
⎝⎛​x1​y1​z1​​⎠⎞​−⎝⎛​x2​y2​z2​​⎠⎞​=⎝⎛​x1​−x2​y1​−y2​z1​−z2​​⎠⎞​
​

Addition corresponds to placing vectors head-to-tail, and subtraction corresponds to the displacement between their tips.

Zero vector and negative vector
AHL AI 3.10

The zero vector ​0​ is a special vector without size or a defined direction, represented by

​
0=⎝⎛​000​⎠⎞​
​

The negative of a vector reverses the vector's direction while maintaining its size. If ​v=⎝⎛​xyz​⎠⎞​, then the negative is

​
−v=⎝⎛​−x−y−z​⎠⎞​
​

pointing in exactly the opposite direction.

Vector Magnitude
AHL AI 3.10

The magnitude (or length) of a vector ​v=⎝⎛​v1​v2​v3​​⎠⎞​​ is calculated as

​
∣v∣=√v12​+v22​+v32​​📖
​


Geometrically, this represents the distance from the vector's starting point to its endpoint in 3D space. For example, the magnitude of the displacement vector ​AB​ equals the straight-line distance between points ​A​ and ​B.

Unit vectors
AHL AI 3.10

When a vector ​u​ has a magnitude of ​1, we say ​u​ is a unit vector.


We often express other vectors ​v​ with magnitude ​∣v∣=1​ as scalar multiples of the unit vector pointing in the same direction,

​
v=ku
​

where ​k=∣v∣.


The unit vector in the same direction as a non-unit vector ​v​ is written as

​
u=∣v∣v​
​

Rescaling to form a vector with a magnitude of one is referred to as normalizing a vector.

Scalar product

5 skills
Scalar product
AHL AI 3.13

The scalar product, also called the dot product, takes two vectors and produces a scalar (a number). For two vectors ​v=⎝⎛​v1​v2​v3​​⎠⎞​​ and ​w=⎝⎛​w1​w2​w3​​⎠⎞​, the scalar product is calculated as:

​
v⋅w=v1​w1​+v2​w2​+v3​w3​📖
​

This operation combines corresponding components of each vector, resulting in a single numerical value.

Angle between vectors
AHL AI 3.13

The scalar product also has a geometric interpretation involving the angle ​θ​ between two vectors:

​
v⋅w=∣v∣∣w∣cosθ📖
​

Equivalently, isolating ​cosθ:

​
cosθ=∣v∣∣w∣v1​w1​+v2​w2​+v3​w3​​📖
​


The angle ​θ​ is measured between the heads of ​v​ and ​w:

Acute vs Obtuse Angles
AHL AI 3.13

If the scalar product of two vectors is negative, then

​
cosθ=∣u∣⋅∣v∣u⋅v​<0
​

and thus ​θ​ must be an obtuse angle: ​90°<θ≤180°.


But since vectors always form an acute AND an obtuse angle, we can find the acute angle by subtracting

​
180°−θ
​

whenever ​θ>90°.


Perpendicular vectors
AHL AI 3.13

Since ​v⋅w=∣v∣∣w∣cosθ, if two vectors are perpendicular then ​cos90°=0⇒​ their scalar product is ​0.

Properties of the scalar product
AHL AI 3.13

For any vectors ​u,  ​v, and ​w, and scalar ​k:


​
u⋅v=v⋅u🚫
​


​
u⋅(v+w)=u⋅v+u⋅w🚫
​


​
(ku)⋅v=k(u⋅v)=u⋅(kv)🚫
​


​
u⋅u=∣u∣2🚫
​


Vector Product

5 skills
Vector product
AHL AI 3.13

The vector product, sometimes called the cross product, of two vectors ​v​ and ​w​ is given by:

​
v×w=⎝⎛​v2​w3​−v3​w2​v3​w1​−v1​w3​v1​w2​−v2​w1​​⎠⎞​📖
​

This vector is perpendicular to both original vectors. Using the right-hand rule, if your index finger points in the direction of ​v​ and your middle finger points towards ​w, your thumb points towards ​v×w. The vector product thus creates a new vector perpendicular to both original vectors.

problem image
Vector areas with cross product
AHL AI 3.13

The magnitude of the vector product ​v×w​ gives the area of the parallelogram formed by vectors ​v​ and ​w:

​
Area=∣v×w∣📖
​

Intuitively, this happens because the magnitude combines both vectors’ lengths and how "spread out" they are from each other, capturing exactly the amount of two-dimensional space they span.

Vector product and sin of angle
AHL AI 3.13

The magnitude of the vector product is connected to the sine of the angle between the vectors by the formula

​
∣v×w∣=∣v∣∣w∣sinθ📖
​

Here, ​θ​ is the angle between vectors ​v​ and ​w. This relationship holds because the area of the parallelogram formed by the two vectors depends on their lengths and the angle separating them.


Specifically, the area is largest when the vectors are perpendicular (​sin90∘=1​) and zero when they are parallel (​sin0∘=0​).

Components of vectors
AHL AI 3.13

For two vectors ​a​ and ​b, the magnitude of the component of vector ​a​ that acts in the direction of vector ​b​ is given by

​
∣a∣cosθ=∣b∣a⋅b​
​

The magnitude of the component of vector ​a​ that acts perpendicular to vector ​b, in the plane formed by the two vectors, is given by

​
∣a∣sinθ=∣b∣∣a×b∣​
​

where ​θ​ is the angle between the two vectors.

Properties of the vector product
AHL AI 3.13

For any vectors ​u,  ​v, and ​w, and scalar ​k:


​
u×v=−(v×u)🚫
​


​
u×(v+w)=u×v+u×w🚫
​


​
(ku)×v=k(u×v)=u×(kv)🚫
​


​
u×u=0🚫
​


​
u×v=0⇒u∥v for non-zerou,v🚫
​

Equations of a line

4 skills
Vector form
AHL AI 3.11

A vector line is defined by specifying one fixed point on the line and a direction vector. If the fixed point is given by position vector ​a, and the direction vector by ​b, then the line in vector form is:

​
r  ​=a+λb📖 =⎝⎛​a1​a2​a3​​⎠⎞​+λ⎝⎛​b1​b2​b3​​⎠⎞​​
​

Here, ​λ∈R​ is a parameter that varies over all real numbers, generating every point on the line. Changing ​λ​ moves the point ​r​ along the direction of ​b, creating the full infinite line.

Parametric form
AHL AI 3.11

A vector line in three-dimensional space can also be expressed in parametric form, showing explicitly the equations for the ​x,  ​y, and ​z​ coordinates separately:


​
x=x0​+λl,y=y0​+λm,z=z0​+λn📖
​


Here, ​(x0​,y0​,z0​)​ is a point on the line, ​(l,m,n)​ are the components of the direction vector, and the parameter ​λ​ controls your position along the line. Changing ​λ​ moves the point continuously along the direction of the vector, producing the full infinite line.

Modeling with vectors
AHL AI 3.12

In kinematics (the mathematical description of motion), 3D motion can be modeled by a vector line, often expressed with the parameter representing time, ​t. 


Specifically, the direction vector ​b​ represents the velocity of an object, indicating both its direction and magnitude of movement. The magnitude of this vector, ​∣b∣, is the object's speed—the rate at which it moves, irrespective of direction.

Angle between lines
AHL AI 3.13

The angle between two lines is simply the angle between their direction vectors.


For any two lines ​r1​=a1​+λb1​​ and ​r2​=a2​+μb2​, the acute angle ​θ​ between ​r1​​ and ​r2​​ can be found via the formula

​
θ=cos−1(∣b1​∣∣b2​∣b1​⋅b2​​)
​

which is just the equation of the scalar product.