iLabs

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
m b⃗−n a⃗m−n\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^=a⃗∣a⃗∣\hat{a} = \dfrac{\vec{a}}{|\vec{a}|}
Direction cosines
l=x∣a⃗∣,m=y∣a⃗∣,n=z∣a⃗∣l = \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→=b⃗−a⃗\overrightarrow{AB} = \vec{b} - \vec{a}
Triangle inequality
∣a⃗+b⃗∣≤∣a⃗∣+∣b⃗∣|\vec{a} + \vec{b}| \le |\vec{a}| + |\vec{b}|

Dot product Class 12

Definition
a⃗⋅b⃗=∣a⃗∣∣b⃗∣cos⁡θ\vec{a}\cdot\vec{b} = |\vec{a}||\vec{b}|\cos\theta
By components
a⃗⋅b⃗=x1x2+y1y2+z1z2\vec{a}\cdot\vec{b} = x_1x_2 + y_1y_2 + z_1z_2
Angle between vectors
cos⁡θ=a⃗⋅b⃗∣a⃗∣∣b⃗∣\cos\theta = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{a}||\vec{b}|}
Projection of a on b
a⃗⋅b⃗∣b⃗∣\dfrac{\vec{a}\cdot\vec{b}}{|\vec{b}|}
Perpendicular
a⃗⋅b⃗=0\vec{a}\cdot\vec{b} = 0

Cross product Class 12

Magnitude
∣a⃗×b⃗∣=∣a⃗∣∣b⃗∣sin⁡θ|\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
12 ∣a⃗×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
x−x1a=y−y1b=z−z1c\dfrac{x - x_1}{a} = \dfrac{y - y_1}{b} = \dfrac{z - z_1}{c}
Through two points
r⃗=a⃗+λ(b⃗−a⃗)\vec{r} = \vec{a} + \lambda(\vec{b} - \vec{a})
Angle between two lines
cos⁡θ=∣b⃗1⋅b⃗2∣∣b⃗1∣∣b⃗2∣\cos\theta = \dfrac{|\vec{b}_1\cdot\vec{b}_2|}{|\vec{b}_1||\vec{b}_2|}
Perpendicular and parallel
b⃗1⋅b⃗2=0,b⃗1×b⃗2=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=∣(a⃗2−a⃗1)⋅(b⃗1×b⃗2)∣∣b⃗1×b⃗2∣d = \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=∣(a⃗2−a⃗1)×b⃗∣∣b⃗∣d = \dfrac{|(\vec{a}_2 - \vec{a}_1)\times\vec{b}|}{|\vec{b}|}
Lines that meet
(a⃗2−a⃗1)⋅(b⃗1×b⃗2)=0(\vec{a}_2 - \vec{a}_1)\cdot(\vec{b}_1\times\vec{b}_2) = 0
Parallel directions
b⃗1×b⃗2=0⃗\vec{b}_1\times\vec{b}_2 = \vec{0}

Planes Class 12

Vector form
r⃗⋅n⃗=d\vec{r}\cdot\vec{n} = d
Cartesian form
ax+by+cz=dax + by + cz = d
Through three points
n⃗=(b⃗−a⃗)×(c⃗−a⃗)\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
∣n⃗⋅Q⃗−d∣∣n⃗∣\dfrac{|\vec{n}\cdot\vec{Q} - d|}{|\vec{n}|}

Angles with planes Class 12

Line and plane
sin⁡θ=∣n⃗⋅b⃗∣∣n⃗∣∣b⃗∣\sin\theta = \dfrac{|\vec{n}\cdot\vec{b}|}{|\vec{n}||\vec{b}|}
Two planes
cos⁡θ=∣n⃗1⋅n⃗2∣∣n⃗1∣∣n⃗2∣\cos\theta = \dfrac{|\vec{n}_1\cdot\vec{n}_2|}{|\vec{n}_1||\vec{n}_2|}
Line of intersection
direction n⃗1×n⃗2\text{direction } \vec{n}_1\times\vec{n}_2
Perpendicular planes
n⃗1⋅n⃗2=0\vec{n}_1\cdot\vec{n}_2 = 0

Triple products and the standard 3D distances Class 12

Vector triple product
a⃗×(b⃗×c⃗)=b⃗(a⃗⋅c⃗)−c⃗(a⃗⋅b⃗)\vec a \times (\vec b \times \vec c) = \vec b(\vec a\cdot\vec c) - \vec c(\vec a\cdot\vec b)
Lagrange's identity
∣a⃗×b⃗∣2=∣a⃗∣2∣b⃗∣2−(a⃗⋅b⃗)2|\vec a\times\vec b|^2 = |\vec a|^2|\vec b|^2 - (\vec a\cdot\vec b)^2
Scalar triple product
[a⃗ b⃗ c⃗]=a⃗⋅(b⃗×c⃗)=[b⃗ c⃗ a⃗]=−[b⃗ a⃗ c⃗][\vec a\ \vec b\ \vec c] = \vec a\cdot(\vec b\times\vec c) = [\vec b\ \vec c\ \vec a] = -[\vec b\ \vec a\ \vec c]
Coplanar vectors and tetrahedron volume
[a⃗ b⃗ c⃗]=0;Vtetra=16 ∣[AB→ AC→ AD→]∣[\vec a\ \vec b\ \vec c] = 0;\qquad V_{\text{tetra}} = \tfrac16\,|[\overrightarrow{AB}\ \overrightarrow{AC}\ \overrightarrow{AD}]|
Distance of a point from a line
d=∣(q⃗−a⃗)×b⃗∣∣b⃗∣d = \dfrac{|(\vec q - \vec a)\times\vec b|}{|\vec b|}
Plane through three points
n⃗=AB→×AC→,n⃗⋅(r⃗−A⃗)=0\vec n = \overrightarrow{AB}\times\overrightarrow{AC},\quad \vec n\cdot(\vec r - \vec A) = 0
Family of planes through a line
P1+λP2=0P_1 + \lambda P_2 = 0
Shortest distance between skew lines
d=∣(a⃗2−a⃗1)⋅(b⃗1×b⃗2)∣∣b⃗1×b⃗2∣d = \dfrac{|(\vec a_2 - \vec a_1)\cdot(\vec b_1\times\vec b_2)|}{|\vec b_1\times\vec b_2|}