01 / 20

Vectors in \(\mathbb{R}^n\)

Learn how to represent, add, and scale ordered lists of numbers that form the foundation of all linear algebra.

Linear Algebra

What Is a Vector?

A vector is an ordered list of numbers. In \(\mathbb{R}^n\), a vector has exactly \(n\) real-number entries called components. We write vectors as columns:

For example, \(\begin{pmatrix} 3 \\ -1 \\ 4 \end{pmatrix}\) is a vector in \(\mathbb{R}^3\) with three components.

Visualizing Vectors in \(\mathbb{R}^2\)

x y 1 2 3 4 1 2 3 4
\(\mathbf{v} = \begin{pmatrix} 3 \\ 2 \end{pmatrix}\)
\(\mathbf{w} = \begin{pmatrix} 1 \\ 4 \end{pmatrix}\)
O

In \(\mathbb{R}^2\), each vector is an arrow from the origin to a point \((x, y)\). The vector \(\mathbf{v} = \begin{pmatrix} 3 \\ 2 \end{pmatrix}\) points to the coordinate (3, 2).

Why Study \(\mathbb{R}^n\)?

Physics
Force, velocity, and acceleration are vectors in \(\mathbb{R}^3\).
Data Science
A data point with \(n\) features is a vector in \(\mathbb{R}^n\).
Graphics
3D rendering uses vectors in \(\mathbb{R}^3\) and \(\mathbb{R}^4\).

Equality of Vectors

This means \(\begin{pmatrix} 1 \\ 2 \end{pmatrix} \neq \begin{pmatrix} 1 \\ 2 \\ 0 \end{pmatrix}\) because they live in different spaces: the first is in \(\mathbb{R}^2\) and the second in \(\mathbb{R}^3\).

Vector Addition

\(\mathbf{u} = \begin{pmatrix} 3 \\ 1 \end{pmatrix}\)
\(\mathbf{v} = \begin{pmatrix} 1 \\ 3 \end{pmatrix}\)
\(\mathbf{u} + \mathbf{v} = \begin{pmatrix} 4 \\ 4 \end{pmatrix}\)

Geometrically, place the tail of \(\mathbf{v}\) at the tip of \(\mathbf{u}\): the diagonal of the parallelogram is \(\mathbf{u}+\mathbf{v}\).

Scalar Multiplication

\(\mathbf{v}\)
\(2\mathbf{v}\)
\(-\mathbf{v}\)

Multiplying by \(c > 1\) stretches the vector; by \(0 < c < 1\) shrinks it; by \(c < 0\) reverses direction.

Algebraic Properties

For all \(\mathbf{u}, \mathbf{v}, \mathbf{w} \in \mathbb{R}^n\) and scalars \(c, d \in \mathbb{R}\):

1
Commutativity: \(\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}\)
2
Associativity: \((\mathbf{u}+\mathbf{v})+\mathbf{w} = \mathbf{u}+(\mathbf{v}+\mathbf{w})\)
3
Additive identity: \(\mathbf{u} + \mathbf{0} = \mathbf{u}\) where \(\mathbf{0} = (0, \ldots, 0)\)
4
Additive inverse: \(\mathbf{u} + (-\mathbf{u}) = \mathbf{0}\)
5
Distributive: \(c(\mathbf{u}+\mathbf{v}) = c\mathbf{u} + c\mathbf{v}\) and \((c+d)\mathbf{u} = c\mathbf{u} + d\mathbf{u}\)

The Zero Vector and Negation

Zero Vector \(\mathbf{0}\)
The vector whose every component is 0. It lives in whichever \(\mathbb{R}^n\) the context requires: \(\mathbf{0} \in \mathbb{R}^3\) means \(\begin{pmatrix}0\\0\\0\end{pmatrix}\).
Negative \(-\mathbf{v}\)
Negate every component: if \(\mathbf{v} = \begin{pmatrix}2\\-5\\1\end{pmatrix}\), then \(-\mathbf{v} = \begin{pmatrix}-2\\5\\-1\end{pmatrix}\). Equivalently, \((-1)\mathbf{v}\).

Vectors vs Scalars vs Points

Vector Scalar Point
Nature Ordered list of numbers Single number Location in space
Notation \(\mathbf{v}\) (bold) or \(\vec{v}\) \(c, \lambda, \alpha\) \(P = (x, y)\)
Has direction? Yes No No
Can be added? Yes (to another vector) Yes (to another scalar) Not directly

A point names a location; a vector describes a displacement. The point (3,2) and the vector \(\begin{pmatrix}3\\2\end{pmatrix}\) look the same numerically but carry different meanings.

How to Compute Vector Operations

1
Check dimensions: both vectors must be in the same \(\mathbb{R}^n\) before adding or subtracting.
2
Line up components: write the vectors as columns, aligning corresponding entries.
3
Operate entry-by-entry: add, subtract, or multiply each component by the scalar.
4
Write the result as a new vector in the same \(\mathbb{R}^n\).

Example 1: Addition in \(\mathbb{R}^3\)

Compute \(\mathbf{u} + \mathbf{v}\) where \(\mathbf{u} = \begin{pmatrix}2\\-1\\5\end{pmatrix}\) and \(\mathbf{v} = \begin{pmatrix}-3\\4\\1\end{pmatrix}\).

Example 2: Scalar Multiplication

Let \(\mathbf{w} = \begin{pmatrix}4\\0\\-2\\7\end{pmatrix}\). Compute \(-3\,\mathbf{w}\).

Notice the result is still in \(\mathbb{R}^4\). The zero component stays zero regardless of the scalar.

Example 3: Linear Combination

Compute \(2\mathbf{u} - 3\mathbf{v}\) where \(\mathbf{u} = \begin{pmatrix}1\\-2\\3\end{pmatrix}\), \(\mathbf{v} = \begin{pmatrix}0\\4\\-1\end{pmatrix}\).

Common Mistakes

✕ Adding Different Dimensions
You cannot add a vector in \(\mathbb{R}^2\) to one in \(\mathbb{R}^3\). Always check that both vectors have the same number of components.
✕ Multiplying Two Vectors
There is no "multiplication" of two vectors by default. The dot product and cross product are separate operations with different rules.
✕ Forgetting Sign Flips
When computing \(-\mathbf{v}\) or subtracting, students often flip only the first component. Every component must be negated.

Operations Summary

Operation Formula Result Space
Addition \(\mathbf{u}+\mathbf{v}\): add entry-by-entry \(\mathbb{R}^n\)
Subtraction \(\mathbf{u}-\mathbf{v} = \mathbf{u}+(-\mathbf{v})\) \(\mathbb{R}^n\)
Scalar mult. \(c\,\mathbf{v}\): multiply each entry by \(c\) \(\mathbb{R}^n\)
Linear combo. \(c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k\) \(\mathbb{R}^n\)
Zero vector \(\mathbf{0} = (0,\ldots,0)\) \(\mathbb{R}^n\)

Question 1 of 5

What is \(\begin{pmatrix}2\\-1\\4\end{pmatrix} + \begin{pmatrix}5\\3\\-2\end{pmatrix}\)?

Question 2 of 5

Compute \(-2\begin{pmatrix}3\\0\\-4\end{pmatrix}\).

Question 3 of 5

Which property does vector addition in \(\mathbb{R}^n\) not satisfy?

Question 4 of 5

Find \(3\mathbf{u} - \mathbf{v}\) where \(\mathbf{u} = \begin{pmatrix}1\\2\end{pmatrix}\) and \(\mathbf{v} = \begin{pmatrix}-1\\5\end{pmatrix}\).

Question 5 of 5

A vector \(\mathbf{v}\) has 5 components. Which space does \(\mathbf{v}\) belong to?