iLabs Shunya

Shunya / Vectors & 3D Geometry Lab

Shunya · Maths lab

Vectors & 3D geometry lab

See vectors instead of just calculating with them. Drag two vectors to add, scale and project them, turn a 3D scene to watch the dot product, the cross product and the volume of a box, then explore lines and planes in space: when lines meet, when they are skew, how far a point is from a plane and the angle between a line and a plane.

The maths behind it

What each mode covers

Vectors in the plane — two vectors you can drag: the triangle and parallelogram laws for sum and difference, scalar multiples and the unit vector, the dot product with the angle and the projection, and the section formula (internal and external). Class 12.
Vectors in space — a 3D scene you can turn: components, magnitude and direction cosines; sum, difference and scalar multiple; dot product and angle; cross product with the parallelogram area; the scalar triple product and the volume of a box; and the distance and section formulas for points, with the eight octants. Classes 11 and 12.
Lines & planes — two lines (meeting, parallel, coincident or skew, the angle and the shortest distance), a point and a plane (equation, distance, foot of the perpendicular), a line and a plane (angle and meeting point) and two planes (angle and line of intersection). Class 12.

Part of Shunya. See the syllabus map for the chapters these modes map to. In the 3D scenes the z-axis points up, and you can turn the scene by dragging it, with the sliders or with the arrow keys. The two-dimensional coordinate ideas are in the Function & Graph Explorer.

Formulas used in this lab

Points in three dimensions Class 11

Distance between A and B (Δx = x₂ − x₁, and so on)
AB=Δx2+Δy2+Δz2AB = \sqrt{\Delta x^2 + \Delta y^2 + \Delta z^2}
Distance from the origin
OP=x2+y2+z2OP = \sqrt{x^2 + y^2 + z^2}
Midpoint (the x-coordinate; y and z are the same)
x=x1+x22x = \dfrac{x_1 + x_2}{2}
Internal section m : n (the x-coordinate)
x=mx2+nx1m+nx = \dfrac{mx_2 + nx_1}{m + n}
External section m : n
mbnamn\dfrac{m\,\vec{b} - n\,\vec{a}}{m - n}

Vectors Class 12

Magnitude
a=x2+y2+z2|\vec{a}| = \sqrt{x^2 + y^2 + z^2}
Unit vector
a^=aa\hat{a} = \dfrac{\vec{a}}{|\vec{a}|}
Direction cosines
l=xa,m=ya,n=zal = \dfrac{x}{|\vec{a}|},\quad m = \dfrac{y}{|\vec{a}|},\quad n = \dfrac{z}{|\vec{a}|}
The identity
l2+m2+n2=1l^2 + m^2 + n^2 = 1
Vector from A to B
AB=ba\overrightarrow{AB} = \vec{b} - \vec{a}
Triangle inequality
a+ba+b|\vec{a} + \vec{b}| \le |\vec{a}| + |\vec{b}|

Dot product Class 12

Definition
ab=abcosθ\vec{a}\cdot\vec{b} = |\vec{a}||\vec{b}|\cos\theta
By components
ab=x1x2+y1y2+z1z2\vec{a}\cdot\vec{b} = x_1x_2 + y_1y_2 + z_1z_2
Angle between vectors
cosθ=abab\cos\theta = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{a}||\vec{b}|}
Projection of a on b
abb\dfrac{\vec{a}\cdot\vec{b}}{|\vec{b}|}
Perpendicular
ab=0\vec{a}\cdot\vec{b} = 0

Cross product Class 12

Magnitude
a×b=absinθ|\vec{a}\times\vec{b}| = |\vec{a}||\vec{b}|\sin\theta
By components
i^j^k^a1a2a3b1b2b3\begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{vmatrix}
Area of a parallelogram
a×b|\vec{a}\times\vec{b}|
Area of a triangle
12a×b\tfrac{1}{2}\,|\vec{a}\times\vec{b}|
Order matters
a×b=b×a\vec{a}\times\vec{b} = -\,\vec{b}\times\vec{a}
Parallel vectors
a×b=0\vec{a}\times\vec{b} = \vec{0}

Scalar triple product Class 12

Definition
[a b c]=a(b×c)[\vec{a}\ \vec{b}\ \vec{c}] = \vec{a}\cdot(\vec{b}\times\vec{c})
Cyclic
[a b c]=[b c a][\vec{a}\ \vec{b}\ \vec{c}] = [\vec{b}\ \vec{c}\ \vec{a}]
Volume of a parallelepiped
V=[a b c]V = |[\vec{a}\ \vec{b}\ \vec{c}]|
Volume of a tetrahedron
V=16[a b c]V = \tfrac{1}{6}\,|[\vec{a}\ \vec{b}\ \vec{c}]|
Coplanar vectors
[a b c]=0[\vec{a}\ \vec{b}\ \vec{c}] = 0

Lines in space Class 12

Vector form
r=a+λb\vec{r} = \vec{a} + \lambda\vec{b}
Cartesian form
xx1a=yy1b=zz1c\dfrac{x - x_1}{a} = \dfrac{y - y_1}{b} = \dfrac{z - z_1}{c}
Through two points
r=a+λ(ba)\vec{r} = \vec{a} + \lambda(\vec{b} - \vec{a})
Angle between two lines
cosθ=b1b2b1b2\cos\theta = \dfrac{|\vec{b}_1\cdot\vec{b}_2|}{|\vec{b}_1||\vec{b}_2|}
Perpendicular and parallel
b1b2=0,b1×b2=0\vec{b}_1\cdot\vec{b}_2 = 0,\qquad \vec{b}_1\times\vec{b}_2 = \vec{0}

Shortest distance between lines Class 12

Skew lines
d=(a2a1)(b1×b2)b1×b2d = \dfrac{|(\vec{a}_2 - \vec{a}_1)\cdot(\vec{b}_1\times\vec{b}_2)|}{|\vec{b}_1\times\vec{b}_2|}
Parallel lines
d=(a2a1)×bbd = \dfrac{|(\vec{a}_2 - \vec{a}_1)\times\vec{b}|}{|\vec{b}|}
Lines that meet
(a2a1)(b1×b2)=0(\vec{a}_2 - \vec{a}_1)\cdot(\vec{b}_1\times\vec{b}_2) = 0
Parallel directions
b1×b2=0\vec{b}_1\times\vec{b}_2 = \vec{0}

Planes Class 12

Vector form
rn=d\vec{r}\cdot\vec{n} = d
Cartesian form
ax+by+cz=dax + by + cz = d
Through three points
n=(ba)×(ca)\vec{n} = (\vec{b} - \vec{a})\times(\vec{c} - \vec{a})
Intercept form
xp+yq+zr=1\dfrac{x}{p} + \dfrac{y}{q} + \dfrac{z}{r} = 1
Distance of a point from a plane
nQdn\dfrac{|\vec{n}\cdot\vec{Q} - d|}{|\vec{n}|}

Angles with planes Class 12

Line and plane
sinθ=nbnb\sin\theta = \dfrac{|\vec{n}\cdot\vec{b}|}{|\vec{n}||\vec{b}|}
Two planes
cosθ=n1n2n1n2\cos\theta = \dfrac{|\vec{n}_1\cdot\vec{n}_2|}{|\vec{n}_1||\vec{n}_2|}
Line of intersection
direction n1×n2\text{direction } \vec{n}_1\times\vec{n}_2
Perpendicular planes
n1n2=0\vec{n}_1\cdot\vec{n}_2 = 0