In space, the angle between two lines is measured through their directions, not their positions — two lines that never meet still have a well-defined angle between them (the angle you would see if you slid one across to meet the other).
So the angle between the lines is just the angle between their direction vectors. If the lines run along b1 and b2,
cosθ=∣b1∣∣b2∣∣b1⋅b2∣
Why the absolute value
A line has two opposite directions, so b and −b describe the same line. The modulus in the numerator picks the acute angle (0∘≤θ≤90∘), which is the convention for the angle between lines.
In Cartesian form
If the lines have direction ratios (a1,b1,c1) and (a2,b2,c2),
If instead you know the direction cosines (l1,m1,n1) and (l2,m2,n2), the denominators are both 1 and cosθ=∣l1l2+m1m2+n1n2∣.
Two special cases
Parallel: the direction ratios are proportional, a2a1=b2b1=c2c1.
Perpendicular: the dot product vanishes, a1a2+b1b2+c1c2=0.
Example
Lines with directions b1=(1,2,2) and b2=(2,2,1):
cosθ=99∣1⋅2+2⋅2+2⋅1∣=98,
so θ=cos−198.
Finding the angle between two lines using their direction ratios or direction cosines is one of the most exam-relevant results in the NCERT Class 12 Three Dimensional Geometry chapter, tested in CBSE boards, JEE Main and several state CETs. "Angle between two lines in 3D formula" is a commonly searched revision topic, and the same absolute-value trick reappears later for angles between lines and planes.
For a1x+b1y+c1=0 and a2x+b2y+c2=0, the lines are parallel iff a1b2=a2b1.
Here a1b2=3×8=24 and a2b1=12×2=24, so they are equal.
✓Final answer
a1b2=a2b1=24, so 3x+2y+9=0 and 12x+8y−15=0are parallel (and are distinct lines, not the same line).
For a1x+b1y+c1=0 and a2x+b2y+c2=0, the lines are parallel iff a1b2=a2b1.
Here a1b2=3×8=24 and a2b1=12×2=24, so they are equal.
Two lines in general form a1x+b1y+c1=0 and a2x+b2y+c2=0 are parallel exactly when their direction ratios match, i.e. a1b2=a2b1 (equivalently a1/a2=b1/b2).
Step 1. Identify the coefficients. For 3x+2y+9=0: a1=3,b1=2,c1=9. For 12x+8y−15=0: a2=12,b2=8,c2=−15.
Step 2. Apply the parallel test a1b2=a2b1.
a1b2=3×8=24,a2b1=12×2=24.
Since a1b2=a2b1=24, the two lines are parallel (their slopes are equal: m1=−23 and m2=−812=−23).
Step 3. Confirm the lines are not identical. Two parallel lines are the same line only if a2a1=b2b1=c2c1. Here a2a1=123=41 and b2b1=82=41 agree, but c2c1=−159=−53=41. So the lines are parallel but distinct — they never meet.
✓Final answer
Since a1b2=a2b1=24, the lines 3x+2y+9=0 and 12x+8y−15=0are parallel (equal slope −3/2), and since c1/c2=a1/a2 they are two distinct parallel lines, not one and the same line.
Parallel-line test on general-form coefficients: a1b2 = a2b1
Concluding 'parallel' without checking whether the lines might actually coincide (constant-term ratio must also be checked to rule this out).
Comparing slopes computed as −a/b carelessly with a sign slip, instead of using the clean cross-product test a1b2=a2b1.