Vectors in Math — Definition, Types, and Worked Examples

#Geometry
TL;DR
A vector is a quantity with both magnitude and direction, drawn as an arrow whose length is the size and whose arrowhead is the direction. This article covers the types of vectors, how to write them in component form, the core operations (addition, scalar multiples, dot and cross products), and the errors students hit most.
BT
Bhanzu TeamLast updated on June 25, 20268 min read

What Is A Vector?

A vector is a quantity that has both a magnitude (a size) and a direction. You write it as a directed line segment — an arrow — where the length of the arrow shows the magnitude and the arrowhead shows the direction. The starting point is the tail and the ending point is the head.

Compare that with a scalar, a quantity that has size only. "50 km/h" is a scalar. "50 km/h heading west" is a vector, because the direction now matters. Displacement, velocity, acceleration, and force are all vectors; mass, temperature, and speed are scalars.

A vector is written several ways: with bold type, $\mathbf{a}$, or with an overhead arrow, $\vec{a}$, or by naming its endpoints, $\vec{AB}$ (tail $A$, head $B$). In this article we use the arrow notation $\vec{a}$ throughout.

How Do You Write A Vector In Component Form?

In a coordinate plane, a vector from the origin to the point $(x, y)$ is written in component form as $\vec{a} = \langle x, y \rangle$, or with unit vectors as $\vec{a} = x,\hat{i} + y,\hat{j}$. Here $\hat{i}$ points one unit along the $x$-axis and $\hat{j}$ points one unit along the $y$-axis. In three dimensions you add $\hat{k}$ for the $z$-direction.

The magnitude of $\vec{a} = x,\hat{i} + y,\hat{j} + z,\hat{k}$ comes straight from the Pythagorean theorem:

$$|\vec{a}| = \sqrt{x^2 + y^2 + z^2}$$

The magnitude is the length of the diagonal box the components build — which is why the square-root-of-sum-of-squares shows up. For $\vec{a} = 3,\hat{i} + 4,\hat{j}$, the magnitude is $\sqrt{3^2 + 4^2} = \sqrt{25} = 5$.

Variable glossary. $x, y, z$ are the components (how far the vector reaches along each axis); $\hat{i}, \hat{j}, \hat{k}$ are the unit vectors along the axes; $|\vec{a}|$ is the magnitude.

What Are The Types Of Vectors?

Naming the types early saves confusion later, because most vector problems hinge on recognising which type you are holding.

  • Zero vector ($\vec{0}$): magnitude $0$, no defined direction. The result of adding a vector to its negative.

  • Unit vector ($\hat{a}$): magnitude exactly $1$. Found by dividing a vector by its own magnitude, $\hat{a} = \frac{\vec{a}}{|\vec{a}|}$.

  • Position vector: a vector from the origin to a point — it pins down where the point is.

  • Equal vectors: same magnitude and same direction, regardless of where they sit on the page.

  • Negative vector: same magnitude, opposite direction. $-\vec{a}$ points back the way $\vec{a}$ came.

  • Parallel vectors: same or opposite direction; they need not lie on one line.

  • Collinear vectors: parallel and lying along the same line — one is a scalar multiple of the other. (See the dedicated piece on collinear vectors for the full conditions.)

  • Orthogonal vectors: perpendicular — the angle between them is $90°$, so their dot product is $0$.

  • Coplanar vectors: three or more vectors lying in one plane.

Examples of Vectors

Example 1

Find the magnitude of the vector $\vec{a} = 6,\hat{i} + 8,\hat{j}$.

$$|\vec{a}| = \sqrt{6^2 + 8^2}$$ $$|\vec{a}| = \sqrt{36 + 64}$$ $$|\vec{a}| = \sqrt{100} = 10$$

Final answer: $|\vec{a}| = 10$.

Example 2

Find the unit vector in the direction of $\vec{a} = 3,\hat{i} - 4,\hat{j}$.

Wrong attempt. A student divides each component by the number of components: $\hat{a} = \frac{3}{2},\hat{i} - \frac{4}{2},\hat{j} = 1.5,\hat{i} - 2,\hat{j}$. Check the length: $\sqrt{1.5^2 + 2^2} = \sqrt{6.25} = 2.5$, not $1$. A unit vector must have length $1$, so this is wrong.

Correct. Divide by the magnitude, not by the count of components.

$$|\vec{a}| = \sqrt{3^2 + (-4)^2} = \sqrt{25} = 5$$ $$\hat{a} = \frac{1}{5}\left(3,\hat{i} - 4,\hat{j}\right) = \frac{3}{5},\hat{i} - \frac{4}{5},\hat{j}$$

Length check: $\sqrt{\left(\frac{3}{5}\right)^2 + \left(\frac{4}{5}\right)^2} = \sqrt{\frac{9}{25} + \frac{16}{25}} = 1$.

Final answer: $\hat{a} = \frac{3}{5},\hat{i} - \frac{4}{5},\hat{j}$.

Example 3

Add $\vec{a} = 4,\hat{i} + 2,\hat{j} - 5,\hat{k}$ and $\vec{b} = 3,\hat{i} - 2,\hat{j} + \hat{k}$.

Add matching components.

$$\vec{a} + \vec{b} = (4+3),\hat{i} + (2-2),\hat{j} + (-5+1),\hat{k}$$ $$\vec{a} + \vec{b} = 7,\hat{i} + 0,\hat{j} - 4,\hat{k}$$

Final answer: $\vec{a} + \vec{b} = 7,\hat{i} - 4,\hat{k}$. (See vector addition for the geometric picture.)

Example 4

Find the dot product of $\vec{a} = 2,\hat{i} + 3,\hat{j}$ and $\vec{b} = 4,\hat{i} - \hat{j}$, then say whether they are orthogonal.

$$\vec{a} \cdot \vec{b} = (2)(4) + (3)(-1) = 8 - 3 = 5$$

The dot product is $5$, not $0$, so the vectors are not orthogonal.

Final answer: $\vec{a} \cdot \vec{b} = 5$; not orthogonal.

Example 5

Find the angle between $\vec{a} = \hat{i} + \hat{j}$ and $\vec{b} = \hat{i} - \hat{j}$.

Use $\cos\theta = \dfrac{\vec{a} \cdot \vec{b}}{|\vec{a}|,|\vec{b}|}$.

$$\vec{a} \cdot \vec{b} = (1)(1) + (1)(-1) = 0$$ $$\cos\theta = \frac{0}{\sqrt{2}\cdot\sqrt{2}} = 0$$ $$\theta = 90°$$

Final answer: $\theta = 90°$ — the vectors are orthogonal. (More on this in angle between vectors.)

Example 6

A boat heads due north at $5\ \text{km/h}$ while a current pushes it due east at $12\ \text{km/h}$. Find the boat's resulting speed.

The two velocities are perpendicular, so the resultant magnitude is the hypotenuse.

$$|\vec{R}| = \sqrt{5^2 + 12^2}$$ $$|\vec{R}| = \sqrt{25 + 144} = \sqrt{169} = 13$$

Final answer: the boat moves at $13\ \text{km/h}$.

Why Vectors Exist: "You Can't Navigate With A Number Alone"

Numbers alone describe how much. They cannot describe which way — and most real motion needs both. A pilot correcting for crosswind, a GPS receiver triangulating your position, a game engine bouncing a ball off a wall: each one tracks quantities that change with direction, and a plain number can't hold that.

Three settings show why the idea earns its keep:

  • Navigation and physics. Velocity, force, and acceleration are vectors. Adding the boat's heading to the river's current (Example 6) is a vector sum, and the answer depends on the directions, not just the speeds.

  • Computer graphics. Every point on a 3D model is a position vector; rotating and lighting a scene is vector arithmetic running thousands of times per frame.

  • Engineering structures. A bridge cable carries tension along its length — a force vector. Resolve it wrong and the load lands somewhere the structure wasn't built for.

The operations come from one of two products. The dot product measures how much two vectors point the same way (and gives the angle between them). The cross product builds a new vector perpendicular to both, which is how torque and rotational direction get computed. You meet both again in physics and, later, in calculus.

What Are The Most Common Mistakes With Vectors?

Mistake 1: Treating a vector as a plain number

Where it slips in: adding or comparing vectors as if only their magnitudes mattered.

Don't do this: writing $|\vec{a} + \vec{b}| = |\vec{a}| + |\vec{b}|$. That only holds when the vectors point the same way. For the boat in Example 6, $5 + 12 = 17$, but the real resultant is $13$.

The correct way: add component by component, or use the parallelogram law, then take the magnitude of the result.

Mistake 2: Dividing by the component count to get a unit vector

Where it slips in: finding $\hat{a}$ under time pressure.

Don't do this: dividing each component by how many components there are. The first instinct on a unit vector is to "average" the components — but a unit vector is about length one, not about averaging, and that habit is the most common source of wrong answers here. Deriving the unit vector from $\hat{a} = \frac{\vec{a}}{|\vec{a}|}$ once, rather than memorising a shortcut, means the length check never fails.

The correct way: divide the whole vector by its magnitude $|\vec{a}|$, then confirm the result has length $1$.

Mistake 3: Mixing up the dot product and the cross product

Where it slips in: problems that ask for an angle versus problems that ask for a perpendicular direction.

Don't do this: reaching for the cross product when you only need the angle, or expecting the dot product to return a vector.

The correct way: the dot product gives a scalar (use it for angles and projections); the cross product gives a vector (use it for perpendicular directions and torque). The memorizer who knows both formulas but not which to pick freezes exactly here.

Conclusion

  • A vector carries both magnitude and direction; a scalar carries magnitude only.

  • In component form $\vec{a} = x,\hat{i} + y,\hat{j} + z,\hat{k}$, and the magnitude is $|\vec{a}| = \sqrt{x^2 + y^2 + z^2}$.

  • The main types — zero, unit, equal, negative, parallel, collinear, orthogonal, coplanar — are worth recognising on sight.

  • The dot product returns a scalar (angles, projections); the cross product returns a perpendicular vector.

  • The most common mistake is treating $|\vec{a} + \vec{b}|$ as $|\vec{a}| + |\vec{b}|$ — it isn't, unless the vectors are parallel.

A Practical Next Step

Work through the six examples above with your own numbers, then test yourself: write any vector in component form, find its magnitude, and reduce it to a unit vector. If the unit-vector step trips you up, return to Example 2 and the magnitude formula. From there, move on to vector addition and the projection vector, which build directly on what's here.

Want a live Bhanzu trainer to walk through more vector problems? Book a free demo class.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

Is a vector the same as a scalar?
No. A scalar has size only (mass, speed, temperature). A vector has size and direction (velocity, force, displacement).
How do you find the magnitude of a vector?
Take the square root of the sum of the squares of its components: $|\vec{a}| = \sqrt{x^2 + y^2 + z^2}$. It's the Pythagorean theorem in disguise.
What is a unit vector used for?
A unit vector fixes a direction without any length attached. Multiply a unit vector by a number and you get a vector of that length pointing that way — handy for separating "which way" from "how far."
Can a vector be negative?
A vector's magnitude is never negative, but a vector can be the negative of another — same length, opposite direction, written $-\vec{a}$.
What's the difference between parallel and collinear vectors?
Parallel vectors share a direction (or opposite directions) but can sit on different lines. Collinear vectors are parallel and lie on the same line, so one is always a scalar multiple of the other.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →