Angle between two lines
Two lines in space can point in almost the same direction, in exactly opposite directions, or anywhere in between — and the number that captures this is the angle between them. In three-dimensional geometry, this angle is found without ever locating where the lines cross: it comes straight from their direction vectors (or direction ratios) through the dot product, the same tool built in Vector Algebra. This topic sits inside the Three-Dimensional Geometry chapter of CBSE Class 12 Mathematics, right after the equation of a line, and it is a favourite short-answer question because it rewards a clean, mechanical formula rather than a long argument. The idea also quietly powers two other standard questions: showing two lines are parallel, and showing two lines are perpendicular, both of which fall out of the same single formula as special cases.
The angle between two lines is the acute angle between their direction vectors, found from .
The core idea
Every line in space, however it is written, boils down to a direction — a vector (or a triple of direction ratios ) that tells you which way the line runs. Position along the line does not matter for this question at all; two lines on opposite sides of the room, pointing the same way, are still said to make an angle of with each other. Given two lines with direction vectors and , the angle between them is defined through the dot product:
where: is the dot product of the two direction vectors, and are their magnitudes, and the outer modulus forces to come out acute (). In Cartesian form, if the lines have direction ratios and , the same formula reads:
where: the numerator is the sum of products of matching direction ratios, and each square root under it is the length of that line's direction triple. If direction cosines and are used instead of raw direction ratios, both vectors are already unit vectors, so the formula collapses to the neat , with no division needed. Two special cases fall straight out of this single formula and are worth memorising as separate facts, since exam questions often ask for them directly instead of the general angle: The lines are parallel exactly when , which happens when the direction ratios are proportional, . Geometrically this means the two direction vectors point the same way (or exactly opposite ways), so one is a scalar multiple of the other. The lines are perpendicular exactly when , which happens when the dot product of the direction ratios vanishes, . This is the fastest check available: whenever a question only asks you to verify perpendicularity rather than compute a general angle, there is no need to touch the square roots in the denominator at all — just add up the three products and check whether the total is zero. It is worth being clear about what this formula does and does not need. It uses only the direction of each line, never any point that lies on it, so the two position vectors that appear in a vector-form equation of a line (or the numerators , , in a Cartesian equation) play no role whatsoever in finding the angle — they matter for other three-dimensional geometry questions, such as finding where two lines meet or how far apart two skew lines are, but not for this one.
The goal is to show, starting only from the standard definition of the dot product of two vectors, exactly why dividing the dot product by the two magnitudes and taking a modulus produces the cosine of the acute angle between two lines — so that the formula stops being a fact to memorise and becomes something you could rebuild from scratch under exam pressure if you forgot it.
Step 1. Recall the geometric definition of the dot product for any two nonzero vectors and drawn from a common point: , where is the angle actually swept out between the two vectors as drawn, which can be anywhere from to .
Step 2. Divide both sides by , which is always a positive number since both vectors are nonzero. This isolates the cosine on its own: .
Step 3. Notice that depends on an arbitrary choice — a line has no built-in sense of direction, so either or could just as validly have been written pointing the opposite way. Reversing one of them flips the sign of the dot product and swaps for its supplement , since . The two possible values of are therefore always a pair that add to , one acute and one obtuse (or both ).
Step 4. Since the angle between two lines is conventionally reported as the acute member of that pair, take the absolute value of the cosine before inverting it: , which is guaranteed to be non-negative and so gives in the range to regardless of which of the two possible direction vectors was used for either line. Writing and and expanding the dot product and magnitudes in components recovers the Cartesian version of the same formula.
Worked example
Problem. Find the angle between the lines and .
Step 1. Read off the direction vectors, ignoring the position vectors entirely: and .
Step 2. Compute the dot product: .
Step 3. Compute each magnitude: and .
Step 4. Substitute into the formula: , so .
Competitive stretch
Problem. Show that and are perpendicular.
Step 1. Read off direction ratios: line 1 is , line 2 is .
Step 2. Compute .
Step 3. Since the dot product of the direction ratios is , , so and the lines are perpendicular — no need to ever compute the full angle when only perpendicularity is asked. Contrast the two examples: the first genuinely asks for an angle, so all four steps — dot product, both magnitudes, division, inverse cosine — are needed and the answer is left as rather than forced into a decimal. The second only asks for a yes/no verification, so the magnitudes are never even computed; recognising which kind of question you are facing saves real time in an exam.
Common traps
- Dropping the modulus. Without it, a negative numerator would suggest an obtuse angle, but the angle between two lines is conventionally reported as acute.
- Treating proportional direction ratios as "the same line." Parallel direction only tells you about orientation, not location — the lines can still be distinct and non-intersecting.
- Reading direction ratios off a non-standard Cartesian form, e.g. , without first converting to symmetric form .
- Sign slips, especially with a negative direction ratio like giving — dropping the sign wrecks the whole dot product.
Ask the tutor: Want to check whether two lines you have are parallel, perpendicular, or at some other angle — try it with the AI tutor.
Why does the formula use the modulus if cos theta can genuinely be negative for two vectors?
Two vectors pointing along a line could be chosen in either of two opposite senses, since a line itself has no built-in direction. Flipping one direction vector flips the sign of the dot product and turns an acute angle into its obtuse supplement. Since "the angle between two lines" should not depend on which of the two possible directions you happened to write down, the modulus is applied to always report the acute value.
Do I need the actual point of intersection to find the angle between two lines?
No. The angle depends only on direction, not position. Even if the lines never meet at all (skew lines in three dimensions), the angle between them is still perfectly well defined using their direction vectors, exactly as in the formula above.
What if a line is given only in Cartesian form with a coefficient in front of x, y or z?
Rewrite it in standard symmetric form first. For example becomes , from which the direction ratios (or, after clearing fractions, ) can be read off safely. Reading ratios straight from the raw coefficients without this step is a very common error.