Vector Algebra: Formulas, Operations & Examples

#Algebra
TL;DR
Vector algebra is the arithmetic of quantities that carry both size and direction: adding and subtracting vectors, scaling them by a number, and multiplying them in two distinct ways. The dot product $\vec{a}\cdot\vec{b}=|\vec{a}||\vec{b}|\cos\theta$ returns a scalar and measures how much two vectors point the same way; the cross product $\vec{a}\times\vec{b}=|\vec{a}||\vec{b}|\sin\theta,\hat{n}$ returns a new vector at right angles to both.
BT
Bhanzu TeamLast updated on September 10, 202614 min read

What Is Vector Algebra?

Vector algebra is the set of rules for combining quantities that have both magnitude and direction. A vector is such a quantity, drawn as an arrow whose length is its size and whose arrowhead is its direction. The operations of vector algebra are addition, subtraction, multiplication by a scalar, the dot product, and the cross product.

The operations split into three families:

  • Arrow-to-arrow: addition and subtraction. Two vectors combine into one, tip to tail.

  • Scale the arrow: scalar multiplication. A plain number stretches, shrinks, or flips a vector.

  • Multiply two vectors: the dot product and the cross product. These are the two operations students most often confuse, and they answer completely different questions.

Throughout this article we use two running vectors in three dimensions:

$$\vec{a} = \hat{i} + 2\hat{j} + 3\hat{k}, \qquad \vec{b} = 4\hat{i} + 5\hat{j} + 6\hat{k}$$

Here $\hat{i}$, $\hat{j}$, and $\hat{k}$ are the unit vectors pointing along the $x$, $y$, and $z$ axes, so $\vec{a}$ has components $(1, 2, 3)$.

What Is The Difference Between A Scalar And A Vector?

A scalar is a quantity with size only; a vector has size and direction. Temperature, mass, and time are scalars: 20 degrees is a complete answer. Velocity, force, and displacement are vectors: 20 km/h means nothing until you say which way.

That single distinction is why vector algebra needs its own rules. You can add two temperatures with ordinary arithmetic, but adding two forces means accounting for their directions, so a 3 N pull east and a 4 N pull north combine to 5 N pointing north-east, not 7 N. Direction changes the answer, and keeping track of it is the whole job.

How Do You Represent A Vector?

A vector is represented as an arrow, and written in a few equivalent ways: $\vec{AB}$ for the arrow from point $A$ to point $B$, or in component form using the axis unit vectors.

In three dimensions, component form is:

$$\vec{a} = a_1\hat{i} + a_2\hat{j} + a_3\hat{k}$$

The magnitude (length) of the vector comes straight from the Pythagorean theorem applied to its components:

$$|\vec{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}$$

For our $\vec{a} = \hat{i} + 2\hat{j} + 3\hat{k}$:

$$|\vec{a}| = \sqrt{1^2 + 2^2 + 3^2} = \sqrt{14}$$

A vector of magnitude $1$ is called a unit vector, written $\hat{a}$. To find the unit vector in the direction of any vector, divide it by its own magnitude: $\hat{a} = \dfrac{\vec{a}}{|\vec{a}|}$. Unit vectors carry pure direction, which is why $\hat{i}$, $\hat{j}$, and $\hat{k}$ are the building blocks of component form.

What Are The Types Of Vectors?

Vectors get names based on their magnitude, direction, or position. Knowing the vocabulary keeps the operations that follow unambiguous.

  • Zero vector ($\vec{0}$): magnitude $0$ and no defined direction. It is the additive identity, $\vec{a} + \vec{0} = \vec{a}$.

  • Unit vector ($\hat{a}$): magnitude exactly $1$, used to record a direction on its own.

  • Equal vectors: same magnitude and same direction, wherever they sit on the page.

  • Negative vector ($-\vec{a}$): same magnitude as $\vec{a}$, opposite direction.

  • Parallel (collinear) vectors: point along the same line, in the same or opposite direction.

  • Position vector: runs from the origin to a specific point, fixing that point's location.

For the full catalogue with diagrams, see types of vectors, and for the special role of the origin-anchored arrow, see position vector.

How Do You Add And Subtract Vectors?

To add two vectors, add their matching components. Geometrically, this is the triangle law: draw the second arrow starting from the tip of the first, and the sum runs from the first tail to the second tip.

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

The parallelogram law says the same thing a different way: place both arrows tail to tail, complete the parallelogram, and the diagonal is the sum. Triangle law and parallelogram law always agree, so use whichever the picture makes easier. A fuller treatment lives at addition of vectors.

Subtraction works component by component too, and $\vec{a} - \vec{b}$ is really $\vec{a} + (-\vec{b})$:

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

Vector addition follows the same friendly rules as adding numbers:

  • Commutative: $\vec{a} + \vec{b} = \vec{b} + \vec{a}$. Order does not matter.

  • Associative: $(\vec{a} + \vec{b}) + \vec{c} = \vec{a} + (\vec{b} + \vec{c})$.

  • Additive inverse: every $\vec{a}$ has a $-\vec{a}$ with $\vec{a} + (-\vec{a}) = \vec{0}$.

Subtraction, by contrast, is not commutative: $\vec{a} - \vec{b}$ is the negative of $\vec{b} - \vec{a}$. For more cases, see vector subtraction.

What Is Scalar Multiplication Of A Vector?

Scalar multiplication multiplies every component of a vector by a single number, the scalar. The direction stays the same when the scalar is positive and flips when it is negative; only the length changes.

$$2\vec{a} = 2(\hat{i} + 2\hat{j} + 3\hat{k}) = 2\hat{i} + 4\hat{j} + 6\hat{k}$$

Multiplying by $2$ doubles the length and keeps the direction; multiplying by $-1$ produces the negative vector $-\vec{a}$; multiplying by $0$ collapses the vector to $\vec{0}$. Scalar multiplication obeys the distributive rule $k(\vec{a} + \vec{b}) = k\vec{a} + k\vec{b}$. The step-by-step version, with worked cases, is at multiplication of a vector by a scalar.

What Is The Dot Product Of Two Vectors?

The dot product of two vectors returns a scalar, and it measures how much the two vectors point in the same direction. There are two equal formulas, one geometric and one from components:

$$\vec{a}\cdot\vec{b} = |\vec{a}||\vec{b}|\cos\theta \qquad\text{and}\qquad \vec{a}\cdot\vec{b} = a_1b_1 + a_2b_2 + a_3b_3$$

Here $\theta$ is the angle between the two vectors. The component formula is usually faster to compute; the geometric formula is what gives the result its meaning.

Example 1: Find $\vec{a}\cdot\vec{b}$ for the running vectors.

Pair matching components, multiply, and add:

$$\vec{a}\cdot\vec{b} = (1)(4) + (2)(5) + (3)(6) = 4 + 10 + 18 = 32$$

Final answer: $\vec{a}\cdot\vec{b} = 32$.

The two formulas together let you find the angle between vectors. Rearranging gives $\cos\theta = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{a}||\vec{b}|}$. As a clean case, if $|\vec{a}| = 4$, $|\vec{b}| = 5$, and $\theta = 60^\circ$, then $\vec{a}\cdot\vec{b} = (4)(5)\cos 60^\circ = 20 \times 0.5 = 10$.

One fact does a lot of work: the dot product is zero exactly when the vectors are perpendicular, because $\cos 90^\circ = 0$. The dot product is also commutative, $\vec{a}\cdot\vec{b} = \vec{b}\cdot\vec{a}$. See dot product, also called the scalar product because its result is a scalar.

What Is The Cross Product Of Two Vectors?

The cross product of two vectors returns a new vector, one that is perpendicular to both of the originals. Its magnitude is $|\vec{a}\times\vec{b}| = |\vec{a}||\vec{b}|\sin\theta$, and its direction is given by the right-hand rule, captured by the unit normal $\hat{n}$:

$$\vec{a}\times\vec{b} = |\vec{a}||\vec{b}|\sin\theta,\hat{n}$$

In component form, the cross product is computed as a determinant:

$$\vec{a}\times\vec{b} = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \ a_1 & a_2 & a_3 \ b_1 & b_2 & b_3 \end{vmatrix}$$

Example 2: Find $\vec{a}\times\vec{b}$ for the running vectors.

Expand the determinant along the top row, one component at a time:

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

$$\vec{a}\times\vec{b} = \hat{i},(12 - 15) - \hat{j},(6 - 12) + \hat{k},(5 - 8) = -3\hat{i} + 6\hat{j} - 3\hat{k}$$

Final answer: $\vec{a}\times\vec{b} = -3\hat{i} + 6\hat{j} - 3\hat{k}$.

Check that the result really is perpendicular to $\vec{a}$ by taking a dot product, which should be zero:

$$(\vec{a}\times\vec{b})\cdot\vec{a} = (-3)(1) + (6)(2) + (-3)(3) = -3 + 12 - 9 = 0$$

The magnitude $|\vec{a}\times\vec{b}|$ equals the area of the parallelogram the two vectors span, and the cross product is zero exactly when the vectors are parallel, because $\sin 0^\circ = 0$. Order matters here: $\vec{a}\times\vec{b} = -(\vec{b}\times\vec{a})$, so the cross product is not commutative. Work through more cases at cross product of two vectors.

Which Vector Operation Should You Use, Dot Or Cross Product?

Reach for the wrong product and every later step is wrong, so decide first by what you need the answer to be. If you want a number, use the dot product; if you want a direction perpendicular to both inputs, use the cross product.

Table: What each vector operation needs and what it returns.

Operation

Formula

Inputs

Result

Addition $\vec{a} + \vec{b}$

add components

two vectors

a vector

Scalar multiplication $k\vec{a}$

scale each component

a scalar and a vector

a vector

Dot product $\vec{a}\cdot\vec{b}$

$\lvert\vec{a}\rvert\lvert\vec{b}\rvert\cos\theta$

two vectors

a scalar

Cross product $\vec{a}\times\vec{b}$

$\lvert\vec{a}\rvert\lvert\vec{b}\rvert\sin\theta,\hat{n}$

two vectors (3D)

a vector perpendicular to both

The two products are opposites in almost every way, which is exactly why they get mixed up. This table settles the difference.

Table: Dot product versus cross product at a glance.

Feature

Dot product

Cross product

Result

scalar (a number)

vector (an arrow)

Formula

$\lvert\vec{a}\rvert\lvert\vec{b}\rvert\cos\theta$

$\lvert\vec{a}\rvert\lvert\vec{b}\rvert\sin\theta,\hat{n}$

Zero when

vectors are perpendicular

vectors are parallel

Commutative

yes, $\vec{a}\cdot\vec{b} = \vec{b}\cdot\vec{a}$

no, $\vec{a}\times\vec{b} = -(\vec{b}\times\vec{a})$

Lives in

any dimension

three dimensions

Read the "result" row first. A question asking for work, or an angle, or "how aligned" wants the dot product. A question asking for torque, a surface normal, or "what is perpendicular to both" wants the cross product. A consolidated reference on both lives at product of vectors.

Why Does Vector Algebra Exist?

Vector algebra was not invented to make physics homework longer. It exists because the physical world is full of quantities that a single number cannot describe, and those quantities needed an arithmetic of their own.

  • Direction had to be carried, not dropped. A force, a velocity, or a displacement is useless without a direction attached. Ordinary numbers throw the direction away, so a new kind of object, the vector, was built to keep size and direction together in one symbol.

  • Two different physical questions needed two different products. "How much of this force acts along the motion?" is a question about alignment, and its answer is a single number, so the dot product returns a scalar (work is force dotted with displacement). "What axis does this rotation turn about?" is a question about perpendicularity, and its answer is a direction, so the cross product returns a vector (torque is the cross product of position and force).

  • Three dimensions needed a compact language. Tracking motion in space one axis at a time is clumsy. Vector algebra packs all three axes into single objects, so a velocity or a field is one symbol and one operation, not three bookkeeping columns.

That is the deep reason two kinds of multiplication exist. "Along" and "perpendicular" are genuinely different physical questions, and vector algebra gives each its own operation. Get the question right and the product chooses itself.

Who Invented Vector Algebra?

Modern vector algebra is surprisingly young. It grew out of a stranger idea, quaternions, and was shaped into the dot-and-cross form students learn today only in the 1880s.

Two more mathematicians turned Hamilton's quaternions into the vector algebra used now:

  • Josiah Willard Gibbs (1839–1903, USA) pulled the dot product and cross product out of the quaternion system and taught them as a standalone method at Yale, printing lecture notes that fixed much of today's notation.

  • Oliver Heaviside (1850–1925, England) reached the same vector methods independently and used them to rewrite the equations of electromagnetism into the compact form still taught in every physics course.

Where Is Vector Algebra Used In The Real World?

The same handful of operations runs quietly under a wide range of technology and science.

  • Physics and engineering: forces, velocities, momentum, and torque are all vectors, and the equations of electromagnetism are written entirely in vector form.

  • Computer graphics and games: a surface's brightness comes from the dot product of the light direction with the surface normal, and that normal itself is found with a cross product.

  • Navigation: a ship's or aircraft's true course is its own velocity added to the current or wind, arrow to arrow, exactly the sum in the opening image.

  • Machine learning: data points are stored as vectors, and the dot product measures how similar two of them are (the basis of cosine similarity).

  • Robotics: a robot arm tracks the position and orientation of its hand with vectors, using cross products to describe how each joint's rotation moves the parts beyond it.

One toolkit, addition and the two products, runs graphics engines, guidance systems, and learning machines. Mathematics turns out to be the shared language across fields that look nothing alike.

What Are The Most Common Vector Algebra Mistakes?

These four errors account for most lost marks on vectors, verified against dot- and cross-product guides on GeeksforGeeks, a Complete Era identities explainer, and Paul's Online Math Notes problem sets.

Treating a vector like an ordinary number.

Where it slips in:

A student adds two forces by adding their magnitudes, writing a 3 N and a 4 N force as a 7 N force, ignoring that they point different ways.

Don't do this:

Do not combine magnitudes as if direction were not there. A vector answer needs both a size and a direction.

The correct way:

Add component by component (or arrow tip-to-tail). A 3 N east and a 4 N north give a 5 N force pointing north-east, from $\sqrt{3^2 + 4^2} = 5$.

Confusing the dot product with the cross product.

Where it slips in:

A student reaches for whichever product comes to mind, then reports a scalar where a vector was needed, or the reverse.

Don't do this:

Do not pick a product by habit. The dot product returns a scalar and uses $\cos\theta$; the cross product returns a vector and uses $\sin\theta$.

The correct way:

Decide by the answer you need. For a number (work, an angle), use the dot product. For a perpendicular direction (torque, a normal), use the cross product.

Taking the cross product the wrong way.

Where it slips in:

A student computes $\vec{a}\times\vec{b}$ by multiplying matching components, the way the dot product pairs them, or swaps the order without changing the sign.

Don't do this:

Do not multiply components straight across for a cross product, and do not assume $\vec{a}\times\vec{b}$ equals $\vec{b}\times\vec{a}$.

The correct way:

Expand the determinant with $\hat{i}$, $\hat{j}$, $\hat{k}$ across the top row, and remember the order flips the sign: $\vec{a}\times\vec{b} = -(\vec{b}\times\vec{a})$.

Forgetting the cross product lives in three dimensions.

Where it slips in:

A student tries to take a cross product of two-dimensional vectors, or gives the answer as a plain number instead of a vector with a direction.

Don't do this:

Do not report a cross product without its direction, and do not expect a true cross product in 2D.

The correct way:

Work in 3D (a 2D vector becomes $(x, y, 0)$), and give the result as a vector, fixing its direction with the right-hand rule and the unit normal $\hat{n}$.

Practice Problems On Vector Algebra

Use $\vec{p} = 2\hat{i} - \hat{j} + \hat{k}$ and $\vec{q} = \hat{i} + 3\hat{j} - \hat{k}$ unless a problem says otherwise. Answers follow each line.

  1. Find $\vec{p} + \vec{q}$.
    (Answer: $3\hat{i} + 2\hat{j}$.)

  2. Find $\vec{p} - \vec{q}$.
    (Answer: $\hat{i} - 4\hat{j} + 2\hat{k}$.)

  3. Find $3\vec{p}$.
    (Answer: $6\hat{i} - 3\hat{j} + 3\hat{k}$.)

  4. Find $\vec{p}\cdot\vec{q}$.
    (Answer: $(2)(1) + (-1)(3) + (1)(-1) = -2$.)

  5. Find $|\vec{p}|$ and the unit vector $\hat{p}$.
    (Answer: $|\vec{p}| = \sqrt{6}$, so $\hat{p} = \tfrac{1}{\sqrt{6}}(2\hat{i} - \hat{j} + \hat{k})$.)

  6. Find $\vec{p}\times\vec{q}$.
    (Answer: $-2\hat{i} + 3\hat{j} + 7\hat{k}$.)

Where Should You Go Next After Vector Algebra?

Vector algebra opens straight into the geometry of space, and several natural doors lead on from here.

  1. Angle between vectors. Turn the dot product into a tool for measuring how two directions relate, and for testing perpendicularity.

  2. Scalar triple product. Combine a dot product and a cross product to find the volume of the box three vectors span, and to test whether they lie in one plane.

  3. Vector equation. Use vectors to describe lines and planes, the first step from vector algebra into 3D coordinate geometry.

If your child is building these foundations, a live Bhanzu trainer teaches vector algebra starting from the "why" (the forces and motions the arrows were built to model) in the Bhanzu algebra program.

Book a Free Demo

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is vector algebra in simple terms?
Vector algebra is the arithmetic of arrows: quantities that have both a size and a direction. It covers adding and subtracting them, scaling them by a number, and the two ways of multiplying them, the dot product and the cross product.
What is the difference between the dot product and the cross product?
The dot product returns a scalar (a number) and is zero when the vectors are perpendicular. The cross product returns a vector perpendicular to both inputs and is zero when the vectors are parallel.
Is the cross product commutative?
No. Swapping the order flips the sign, so $\vec{a}\times\vec{b} = -(\vec{b}\times\vec{a})$. The dot product, by contrast, is commutative.
Can you take a cross product in two dimensions?
Not in the usual sense. The cross product is defined in three dimensions; for 2D vectors you treat them as $(x, y, 0)$, and the result points along the $z$ axis, out of the page.
How do you find the angle between two vectors in vector algebra?
Use the dot product. Rearranging $\vec{a}\cdot\vec{b} = |\vec{a}||\vec{b}|\cos\theta$ gives $\cos\theta = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{a}||\vec{b}|}$, then take the inverse cosine. A dedicated walkthrough is at angle between vectors.
Which curricula teach vector algebra?
Vector algebra appears in India's NCERT Class 12 (Chapter 10, Vector Algebra) and in the United States under the Common Core high-school standards N-VM. It then recurs throughout physics and linear algebra at university level.
✍️ 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 →