Lines and Planes in Space (3D)
Nerd Cafe
PART 1: Vectors in 3D
A. Position Vector
A position vector points from the origin to a point in space. If a point P(x, y, z), then the position vector is:
B. Vector Between Two Points
If A(x1,y1,z1) and B(x2,y2,z2):
C. Python Example:
import numpy as np
A = np.array([1, 2, 3])
B = np.array([4, 0, 5])
AB = B - A
print("Vector AB:", AB)D. Output:
PART 2: Line in Space
A. Vector Equation of a Line
A line passing through point
with direction vector
is:
This gives:
B. Python Example:
C. Output:

PART 3: Plane in Space
A. General Equation of a Plane
Given a point
and normal vector
then:
Which simplifies to:
where:
B. Python Example:
C. Output:
PART 4: Angle Between Two Lines
Given direction vectors v1,v2:
A. Python Example:
B. Output:
PART 5: Intersection of Line and Plane
To find intersection:
Substitute parametric equations of the line into the plane equation.
Solve for t.
Plug t back into the line to find the point.
A. Python Example:
B. Output:
PART 6: Distance from a Point to a Plane
Given point
and plane
so:
A. Python Example:
B. Output:
PART 7: Distance Between Parallel Planes
If both planes have the same normal vector:
so:
PART 8: Angle Between Line and Plane
Given a line with direction d and plane normal n:
A. Python Example:
B. Output:
PART 9: Line of Intersection of Two Planes
If two planes intersect, the line lies in both. To find it:
Take both plane equations.
Solve the system symbolically.
A. Python Example:
B. Output:
Keywords
lines in space, planes in space, vector equations, parametric equations, dot product, cross product, normal vector, point-plane distance, projection onto plane, 3D geometry, vector algebra, line-plane intersection, plane equation, line direction vector, coplanar vectors, distance from point to line, shortest distance, scalar projection, geometric visualization, vector mathematics, nerd cafe
Last updated