Skip to content

Vectors: basics and operations

mike nicholas edited this page Aug 12, 2026 · 42 revisions

There are two major objects in Linear Algebra: vectors and matrices. Here, we will review some important basics with vectors. Most of this lesson is review from Calculus II.

Vectors and Scalars

Vectors are lists of numbers. Actually, there is a more technical definition we will get to much later in this course. But for now, vectors are lists of numbers. There are numerous notations used for vectors, including the following:

$$\large \vec{x}=\left<3,2,-1,5\right>$$

$$\large \vec{x} = 4\hat{i}-3\hat{j}+\hat{k}$$

$$ \large \vec{x}= \begin{bmatrix} 2\\ 0\\ 5\\ -12\\ 1\\ \end{bmatrix} $$

In this class, we may use any of the notations from above.

Defnition: Vectors belong to a set called a vector space. The vector space for these vectors is called $\large \mathbb{R}^n$. The $\large n$ here is the dimension of the vector space, and it's just the length of the vector.

The first vector listed above has four elements, so it belongs to $\large \mathbb{R}^4$. We write $\large \vec{x}\in R^4$, and we say $\large \vec{x}$ is in $\large \mathbb{R}^4$.

Defnition: A scalar is just a real or complex number.

Operations

Part of linear algebra is figuring out the rules of arithmetic for vectors and matrices. Can we add these things? Multiply? Divide? When do the traditional rules of operations applky? Do we have laws of commutivity? Associativity? Distributivity?

Addition/Substraction

Addition and subtration of vectors is just done component by component:

$$\large \begin{bmatrix} 3\\ -4\\ 8\\ \end{bmatrix} + \begin{bmatrix} 1\\ 0\\ -1\\ \end{bmatrix} = \begin{bmatrix} 4\\ -4\\ 7\\ \end{bmatrix} $$

Multiplication

Scalar Multiplication

It is quite simple to multiply a scalar and a vector:

$$\large 2\begin{bmatrix} 2\\ -3\\ 7\\ \end{bmatrix} = \begin{bmatrix} 4\\ -6\\ 14\\ \end{bmatrix} $$

Important

Scalar multiplication results in a scaled version (longer or shorter, but still parallel) of the original vector.

Product of Two Vectors

Definition: the dot product (also known as the inner product) of two vectors is the sum of the products of the corresponding components of the vectors.

That is,

$$\displaystyle \large \vec{x}\cdot\vec{y} = x_1y_1+x_2y_2+\dots+x_ny_n=\sum_{k=1}^n x_ky_k$$

Important

The dot product of two vectors is a scalar!

Note

In Calc II, we also learned about the cross product, another product between two vectors. This is a very useful product in Calc III (and therefore, in physics, one of our favorite branches of Calc III), but it is only defined between vectors in $\large R^3$. We are concerned in this class with larger vectors, so the dot product is the only product between vectors we will be using.

Linear Combinations of Vectors

The following definition will be used quite a bit in this class:

Definition: A sum of scaled versions of a collection of vectors is called a linear combination of those vectors.

The following are all different linear combinations of the vectors $\large \vec{x}_1$, $\large \vec{x}_2$, and $\large \vec{x}_3$:

$$\large 3\vec{x}_1-2\vec{x}_2+\vec{x}_3$$

$$\large 10\vec{x}_2-7\vec{x}_3$$

$$\large -\vec{x}_1+\vec{x}_2-2\vec{x}_3$$

Note

If each of $\large \vec{x}_1$, $\large \vec{x}_2$, and $\large \vec{x}_3$ are in $\large \mathbb{R}^n$, then each of the linear combinations above is also in $\large \mathbb{R}^n$.

Geometry and Distance

In $\large \mathbb{R}^2$ and $\large \mathbb{R}^3$, we can picture vectors as arrows. It's nice to build intuition in these small dimensions before we move into larger vector spaces where much of linear algebra actually happens.

Here we see a graphical representation of the addition of the vectors $\large \left&lt;3,4\right&gt;$ and $\large \left&lt;-1,6\right&gt;$:

genSol genSol

Thinking of vectors in this way leads to the idea of the length of a vector:

Definition: The norm, or length, of $\large \vec{x}$ is denoted by $\large \lVert\vec{x}\rVert$ and is calculated by

$$\large\displaystyle \lVert\vec{x}\rVert=\sqrt{x_1^2+x_2^2+\dots+x_n^2}$$

Note

We can use the norm to measure distance between vectors. The distance between $\large \vec{x}$ and $\large \vec{y}$ is $\large \lVert\vec{x}-\vec{y}\rVert$.

Relatedly, we can measure the angle between vectors:

$$\large \cos(\theta)=\frac{\vec{x}\cdot\vec{y}}{\lVert\vec{x}\rVert \lVert\vec{y}\rVert}$$

This leads to a very important fact for vectors - the dot product is our key to determine if two vectors are orthogonal:

Theorem: Two vectors are orthogonal (or perpendicular or normal, all three words mean the same thing) if their dot product equals zero.

Outcomes

After this this section, I can:

  • Recall the definitions: scalar, linear combination, norm, and $\large \mathbb{R}^n$
  • Compute linear combinations of vectors.
  • Determine if vectors are orthogonal.
  • Calculate the length of a vector, the distance between vectors, or the angle between vectors.

Clone this wiki locally