📘 CodingMarble Learn

Vector Algebra

A vector has a size (magnitude) and a direction. In 3D we write it as a = xî + yĵ + zk̂. Its length is |a| = √(x² + y² + z²). Its direction cosines are l = x/|a|, m = y/|a|, n = z/|a|, and l² + m² + n² = 1. Vectors are added head-to-tail (triangle law) or component by component. ka stretches a by k and flips it if k is negative. The point dividing AB in m : n has position vector (mb + na)/(m + n) inside and (mb − na)/(m − n) outside. Dot product a·b = |a||b|cosθ gives a number and tells the angle and the projection. Cross product a×b = |a||b|sinθ n̂ gives a vector at right angles to both; its length is the area of the parallelogram on a and b.

🎬 Step-by-step story

  1. A vector is an arrow. Its length is the magnitude. It leans at angles α, β, γ to the x, y and z axes. The cosines of these angles are the direction cosines l, m, n.
  2. Every arrow is made of three straight moves: x along î, y along ĵ and z along k̂. So a = xî + yĵ + zk̂. The arrow from the origin to a point is its position vector. Some arrows have special names: zero, unit, equal, negative, collinear.
  3. To add two vectors, put the tail of b on the head of a. The arrow from the start to the end is a + b. Multiplying by a number k makes the arrow k times longer. A negative k turns it around.
  4. A point P on the segment AB splits it in the ratio m : n. Its position vector is a weighted mix of a and b: (mb + na)/(m + n). Equal parts give the mid-point.
  5. Two ways to multiply vectors. Dot product a·b = |a||b|cosθ is a plain number; it is 0 when the arrows are at right angles. Cross product a×b is a new arrow at right angles to both; its length is the area of the parallelogram they make.
  6. Your turn. Pick any scene and change the numbers. Or open a solved example and reveal it one line at a time.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why is l² + m² + n² always 1?

l, m, n are x/|a|, y/|a|, z/|a|. Squaring and adding gives (x² + y² + z²)/|a|² = 1. In step 1 change the sliders: the readout always shows l² + m² + n² = 1.

What is the difference between direction cosines and direction ratios?

Direction ratios are any numbers in the right proportion, like 2 : 3 : 6 or 4 : 6 : 12. Direction cosines are the one special set whose squares add to 1: 2/7, 3/7, 6/7. Step 1 shows both.

Are two arrows in different places equal vectors?

Yes, if they have the same length and direction. Where you draw them does not matter. Pick 'Equal vectors' in step 2.

What does a negative scalar do to a vector?

It flips the arrow and scales its length by |k|. Slide k to −1 in step 3 and watch a turn around.

In the section formula, why does m go with b and not with a?

The bigger m is, the closer P is to B. So B gets the weight m. Set m = 5, n = 1 in step 4 and see P move close to B.

Why is the dot product zero at 90°?

cos 90° = 0, and the shadow (projection) of one arrow on the other has zero length. Slide θ to 90° in step 5.

Why does the cross product point out of the plane?

It is defined to be at right angles to both a and b, and its length is the area of their parallelogram. Tick Cross product in step 5: the green arrow stands straight up.

Magnitude and direction of a vector

A vector is a quantity with a size and a direction, like a push, a velocity or a move from one place to another. A scalar has only a size, like mass or time.

We draw a vector as an arrow from a start point (tail) to an end point (head). The magnitude is the length of the arrow, written |a|. For a = xî + yĵ + zk̂ the magnitude is |a| = √(x² + y² + z²). This is just Pythagoras used twice.

The direction is told by the angles the arrow makes with the positive x, y and z axes.

Direction cosines and direction ratios

Let the arrow make angles α, β, γ with the x, y and z axes. Then l = cos α, m = cos β, n = cos γ are its direction cosines.

Any three numbers in the same proportion as l, m, n are called direction ratios. The components x, y, z themselves are direction ratios. To go from ratios a, b, c to cosines, divide each by √(a² + b² + c²).

Why it matters: the unit vector in the direction of a is simply lî + mĵ + nk̂.

Types of vectors

Position vector and components

The position vector of a point P(x, y, z) is the arrow from the origin O to P: OP = xî + yĵ + zk̂. Its length is the distance OP.

Here x î, y ĵ and z k̂ are the vector components along the axes, and x, y, z are the scalar components.

Vector joining two points

From P₁(x₁, y₁, z₁) to P₂(x₂, y₂, z₂): P₁P₂ = (x₂ − x₁)î + (y₂ − y₁)ĵ + (z₂ − z₁)k̂ — always "head minus tail".

Addition of vectors and multiplication by a scalar

Triangle law: place the tail of b at the head of a; the arrow from the tail of a to the head of b is a + b. Parallelogram law says the same thing: draw a and b from one point; the diagonal is a + b.

Scalar multiple

k a has length |k||a|. If k > 0 it points the same way, if k < 0 it points the opposite way, if k = 0 it is the zero vector. k(a + b) = ka + kb.

Section formula

Let A and B have position vectors a and b.

Why: AP : PB = m : n means n·AP = m·PB, i.e. n(r − a) = m(b − r). Solve for r. Remember: m multiplies the far end b.

Also: the centroid of a triangle with vertices a, b, c is (a + b + c)/3.

Dot (scalar) product and its uses

a·b = |a||b| cos θ, where θ (0 ≤ θ ≤ π) is the angle between them. The answer is a number (scalar).

Uses

Cross (vector) product and its uses

a × b = |a||b| sin θ n̂, where n̂ is the unit vector at right angles to both a and b, chosen by the right-hand rule (curl fingers from a to b, thumb gives n̂).

Uses

Board exam: the unit carries 14 marks with 3D geometry; typical questions are angle/projection, area by cross product, unit vector perpendicular to two vectors and section formula.

Key formulas and definitions

Worked examples

1. Find the magnitude and direction cosines of a = 2î − 3ĵ + 6k̂.

Step 1: |a| = √(4 + 9 + 36) = √49 = 7. Step 2: l = 2/7, m = −3/7, n = 6/7. Check: 4/49 + 9/49 + 36/49 = 1 ✓.

2. Find the unit vector in the direction of a + b, where a = î + 2ĵ − k̂ and b = 2î − ĵ + 3k̂.

Step 1: a + b = 3î + ĵ + 2k̂. Step 2: |a + b| = √(9 + 1 + 4) = √14. Step 3: unit vector = (3î + ĵ + 2k̂)/√14.

3. Find the position vector of the point R dividing P(2, −1, 3) and Q(4, 5, −3) externally in the ratio 2 : 1.

Step 1: r = (2q − 1p)/(2 − 1). Step 2: 2q = (8, 10, −6), p = (2, −1, 3). Step 3: 2q − p = (6, 11, −9). So r = 6î + 11ĵ − 9k̂.

4. Find the angle between a = î + ĵ − k̂ and b = î − ĵ + k̂.

Step 1: a·b = 1 − 1 − 1 = −1. Step 2: |a| = |b| = √3. Step 3: cosθ = −1/3. So θ = cos⁻¹(−1/3) ≈ 109.5°.

5. Find the projection of a = 2î + 3ĵ + 2k̂ on b = î + 2ĵ + k̂.

Step 1: a·b = 2 + 6 + 2 = 10. Step 2: |b| = √6. Step 3: projection = 10/√6 = 5√6/3 ≈ 4.08.

6. Find a unit vector perpendicular to both a = 2î + 3ĵ − k̂ and b = î − ĵ + 2k̂.

Step 1: a × b = î(3·2 − (−1)(−1)) − ĵ(2·2 − (−1)·1) + k̂(2·(−1) − 3·1) = 5î − 5ĵ − 5k̂. Step 2: |a × b| = 5√3. Step 3: unit vector = ±(î − ĵ − k̂)/√3.

7. Find the area of the triangle with vertices A(1, 1, 2), B(2, 3, 5) and C(1, 5, 5).

Step 1: AB = î + 2ĵ + 3k̂, AC = 0î + 4ĵ + 3k̂. Step 2: AB × AC = î(6 − 12) − ĵ(3 − 0) + k̂(4 − 0) = −6î − 3ĵ + 4k̂. Step 3: |AB × AC| = √(36 + 9 + 16) = √61. Area = ½√61 ≈ 3.9 square units.

8. If |a| = 3, |b| = 4 and a·b = 6, find |a × b| and |a + b|.

Step 1: cosθ = 6/12 = 1/2, so θ = 60° and sinθ = √3/2. Step 2: |a × b| = 3 × 4 × √3/2 = 6√3. Step 3: |a + b|² = |a|² + |b|² + 2a·b = 9 + 16 + 12 = 37, so |a + b| = √37.

Common mistakes

Practice quiz

1. The magnitude of 3î − 4k̂ is:
2. If l, m, n are direction cosines, then l² + m² + n² equals:
3. a·b = 0 for non-zero vectors means they are:
4. ĵ × î equals:
5. The mid-point of A(a) and B(b) has position vector:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is the difference between the dot product and the cross product?

The dot product gives a number, a·b = |a||b|cosθ, and is used for angles, projections and work. The cross product gives a vector, |a × b| = |a||b|sinθ, at right angles to both, and is used for areas, perpendicular directions and torque.

How many marks does Vectors and 3D Geometry carry in CBSE Class 12?

The unit Vectors and Three-Dimensional Geometry carries about 14 marks in the CBSE Class 12 maths paper, shared between vector algebra and 3D geometry.

How do I find a unit vector perpendicular to two vectors?

Find a × b, then divide it by its length |a × b|. Both (a × b)/|a × b| and its negative are answers.

Where this is taught

Canada (Ontario)Grade 12C. Geometry and Algebra of Vectors
NetherlandsHAVO 4 (bovenbouw, 2e fase)Solid geometry
NetherlandsVWO 5Geometry
NetherlandsVWO 6 (eindexamenjaar)Geometry with coordinates (part 2)
PolandLiceum ogólnokształcące, klasa IIIAnalytic geometry in the plane
Spain4º ESOInteraction
Spain1º BachilleratoNumber Sense
Spain1º BachilleratoNumber Sense
Spain2º BachilleratoSpatial Sense
Ukraine10 класGeometry: coordinates, vectors and transformations in space (22 h)
Ukraine10 класGeometry: coordinates and vectors in space (10 h)
CBSE (India)Class 12Vectors and Three-Dimensional Geometry
England (GCSE, A level)Year 12J Vectors (2D)
England (GCSE, A level)Year 13J Vectors (3D)
USA (Common Core, NGSS, AP)Grade 12Functions Involving Parameters, Vectors, and Matrices
USA (Common Core, NGSS, AP)Grade 12Vectors and matrices
Japan高校(専門学科)1〜3年Special Topics in Advanced Mathematics
Japan高校2年Vectors
South Korea고등학교 2학년Vectors
South Korea고등학교 3학년Representing data
South Korea고등학교 3학년Plane vectors
FranceSecondeGeometry
FrancePremièreGeometry
FrancePremièreMathematics
FrancePremièreMathematics
Russia10 классVectors in space
Russia11 классVectors and coordinates
Russia11 классVectors and coordinates in space
China高一Ch.6 Plane vectors
China高二Ch.1 Spatial vectors and solid geometry

Learn first

Learn next

Related lessons

All Maths lessons