3D geometry studies points, lines, and planes in space. For most student problems, the key ideas are simple: a line is given by a point and a direction, a plane is given by an equation or a normal vector, and direction cosines describe the line's orientation relative to the coordinate axes.

If a directed line makes angles α\alpha, β\beta, and γ\gamma with the positive xx-, yy-, and zz-axes, its direction cosines are

l=cosα,m=cosβ,n=cosγl = \cos \alpha,\quad m = \cos \beta,\quad n = \cos \gamma

and they satisfy

l2+m2+n2=1l^2 + m^2 + n^2 = 1

The quick picture is this: line means point plus direction, plane means a flat constraint, and direction cosines are the normalized form of that direction.

Equation of a line and a plane in 3D geometry

If a line passes through (x1,y1,z1)(x_1,y_1,z_1) and has direction ratios (a,b,c)(a,b,c), one convenient form is

x=x1+at,y=y1+bt,z=z1+ctx = x_1 + at,\quad y = y_1 + bt,\quad z = z_1 + ct

where tt is a parameter.

If none of aa, bb, and cc is zero, you can also write the same line in symmetric form:

xx1a=yy1b=zz1c\frac{x-x_1}{a} = \frac{y-y_1}{b} = \frac{z-z_1}{c}

That form needs special care if one of the direction ratios is 00.

A plane is often written as

ax+by+cz+d=0ax + by + cz + d = 0

Here (a,b,c)(a,b,c) is a normal vector to the plane. It tells you which way the plane faces, not a direction that lies inside the plane.

Direction ratios vs. direction cosines

Direction ratios only describe a direction up to scale. For example, (2,1,2)(2,-1,2) and (4,2,4)(4,-2,4) point the same way.

To convert direction ratios (a,b,c)(a,b,c) into direction cosines, divide by the length of that direction vector:

l=aa2+b2+c2,m=ba2+b2+c2,n=ca2+b2+c2l = \frac{a}{\sqrt{a^2+b^2+c^2}},\quad m = \frac{b}{\sqrt{a^2+b^2+c^2}},\quad n = \frac{c}{\sqrt{a^2+b^2+c^2}}

This only makes sense when (a,b,c)(0,0,0)(a,b,c) \ne (0,0,0).

Worked example: find direction cosines and a line-plane intersection

Suppose a line passes through

P(1,2,0)P(1,2,0)

and has direction ratios

(2,1,2)(2,-1,2)

Also suppose the plane is

x+y+z=6x + y + z = 6

First write the line in parametric form:

x=1+2t,y=2t,z=2tx = 1 + 2t,\quad y = 2 - t,\quad z = 2t

Now find the direction cosines. The length of the direction-ratio vector is

22+(1)2+22=9=3\sqrt{2^2 + (-1)^2 + 2^2} = \sqrt{9} = 3

So the direction cosines are

l=23,m=13,n=23l = \frac{2}{3},\quad m = -\frac{1}{3},\quad n = \frac{2}{3}

You can check:

(23)2+(13)2+(23)2=1\left(\frac{2}{3}\right)^2 + \left(-\frac{1}{3}\right)^2 + \left(\frac{2}{3}\right)^2 = 1

Now find where the line meets the plane. Substitute the line into x+y+z=6x+y+z=6:

(1+2t)+(2t)+2t=6(1+2t) + (2-t) + 2t = 6 3+3t=63 + 3t = 6 t=1t = 1

So the intersection point is

(x,y,z)=(3,1,2)(x,y,z) = (3,1,2)

This example connects the main ideas in one place. The point PP anchors the line, the direction ratios tell you how the line moves, the direction cosines give the same direction in unit form, and the plane equation lets you find the intersection point.

Common mistakes

Treating direction ratios as if they were normalized

The triples (2,1,2)(2,-1,2) and (23,13,23)\left(\frac{2}{3},-\frac{1}{3},\frac{2}{3}\right) point in the same direction, but only the second one is normalized. The identity l2+m2+n2=1l^2+m^2+n^2=1 applies to direction cosines, not to arbitrary direction ratios.

Using the symmetric form when a denominator is 00

If one direction ratio is 00, the symmetric form needs special handling. In that case, the parametric form is usually safer.

Confusing a plane's normal with a line's direction

In ax+by+cz+d=0ax+by+cz+d=0, the vector (a,b,c)(a,b,c) is perpendicular to the plane. It is not generally a direction vector lying in the plane.

Forgetting when a formula is allowed

The formulas for direction cosines from (a,b,c)(a,b,c) only work when the direction vector is nonzero. A zero vector does not define a line direction.

Where 3D geometry is used

You use this framework whenever position and orientation matter in space. In school math, it appears in coordinate geometry and vector problems. In applications, the same ideas appear in graphics, robotics, navigation, and mechanics when you need to describe motion, intersections, or orientation in three dimensions.

Try a similar problem

Keep the same line, but change the plane to

x+y+z=9x + y + z = 9

Find the new value of tt and the new intersection point. If you want to check your result after solving it yourself, try a similar 3D geometry problem in GPAI Solver.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →