If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Multivariable calculus>Unit 1

Lesson 2: Vectors and matrices

# Vectors and notation

Learn about what vectors are, how we can visualize them, and how we can combine them.
Vectors are the building blocks of everything multivariable. We use them when we want to represent a coordinate in higher-dimensional space or, more generally, to write a list of anything. In this article, we'll cover what vectors are, different ways to write them, and the three basic vector operations.

## What is a vector?

Most generally, a vector is a list of things. In multivariable calculus, "thing" typically ends up meaning "number," but not always. For example, we'll see a vector made up of derivative operators when we talk about multivariable derivatives. This generality is super useful down the line.

### Vectors and points in space

When a vector is just a list of numbers, we can visualize it as an arrow in space. For example, we visualize the vector $\left(4,2\right)$ as an arrow whose tail is at the origin and whose tip is at the point $\left(4,2\right)$. For this reason, we don't usually distinguish between points and vectors in multivariable calculus.
However, sometimes we draw a vector with the tail away from the origin. This changes nothing about the vector, only where we draw it. For example, we can also draw the vector $\left(4,2\right)$ starting at $\left(0,2\right)$. Both arrows correspond to the vector $\left(4,2\right)$, even though one of them doesn't end at the point $\left(4,2\right)$.
This is why it can sometimes be confusing to write vectors exactly like points in space. For this reason, people have come up with other notations for vectors.

## Notation

There are lots of ways to write vectors. Here are the three we'll use most in this course. The little arrow on top of $\stackrel{\to }{v}$ is a convention that indicates that $\stackrel{\to }{v}$ refers to a vector.
$\begin{array}{rl}\stackrel{\to }{v}& =\left(1,2,3\right)=\left[\begin{array}{c}1\\ 2\\ 3\end{array}\right]=1\stackrel{^}{ı}+2\stackrel{^}{ȷ}+3\stackrel{^}{k}\end{array}$
The first notation is what we discussed earlier. Technically it refers to a point, but we use it interchangeably to refer to a vector. This notation extends to any number of dimensions.
The second notation is matrix notation, which we can also extend to as many dimensions as we want. Matrix notation is particularly useful when we think about vectors interacting with matrices. We'll discuss matrices and how to visualize them in coming articles.
The third notation, unlike the previous ones, only works in 2D and 3D. The symbol $\stackrel{^}{ı}$ (pronounced "i hat") is the unit $x$ vector, so $\stackrel{^}{ı}=\left(1,0,0\right)$. Similarly, $\stackrel{^}{ȷ}=\left(0,1,0\right)$ and $\stackrel{^}{k}=\left(0,0,1\right)$. This notation might make more sense once we cover vector addition.
In this course, we almost always use the $\left(1,2,3\right)$ notation in exercises, because it saves space when we need to define multiple variables. The videos use a mix of matrix notation and the $1\stackrel{^}{ı}+2\stackrel{^}{ȷ}+3\stackrel{^}{k}$ notation.

One of the basic vector operations is addition. In general, whenever we add two vectors, we add their corresponding components:
$\left(a,b,c\right)+\left(A,B,C\right)=\left(a+A,b+B,c+C\right)$
This works in any number of dimensions, not just three. We can visualize the sum $\stackrel{\to }{a}+\stackrel{\to }{b}$ as sliding the tail of $\stackrel{\to }{b}$ to the tip of $\stackrel{\to }{a}$. Here's an example of that in 2D.
Let's try a practice question.
Problem 1
$\left(-3,2\right)+\left(1,4\right)=$
$\left($
$,$
$\right)$

If you want to go deeper, learn about how to understand vector addition visually with this video, and get practice with this exercise.

## Scalar multiplication

The second basic vector operation is scalar multiplication, which is when we stretch or shrink a vector. Scalar is just a fancy word for number (same root as the word scaling). Here's an example of how it works:
$\begin{array}{rl}\stackrel{\to }{b}& =\left(1,2,3\right)\\ \\ 2\stackrel{\to }{b}& =\left(2,4,6\right)\\ \\ 0.5\stackrel{\to }{b}& =\left(0.5,1,1.5\right)\\ \\ -\stackrel{\to }{b}& =\left(-1,-2,-3\right)\end{array}$
In general, scaling a vector by a number means multiplying each of the vector's components by that number. That means
$\begin{array}{r}x\stackrel{\to }{a}=x\left(a,b,c\right)=\left(xa,xb,xc\right)\end{array}$
Let's try an example.
Problem 2
If $\stackrel{\to }{a}=\left(2,-1\right)$,
then $3\stackrel{\to }{a}=\left($
$,$
$\right)$.

The intuitive meaning of scaling a vector by a factor of $2$ is that we are making the vector twice as long. Here's what that looks like:
Scaling by a factor of $0.5$ makes a vector half as long. This would look like the above vector $\left(2,4\right)$ becoming $\left(1,2\right)$, instead of the other way around.
Scaling by a factor of $-1$ means flipping the direction of a vector, because each of its components becomes the opposite of what it used to be. Here's an example of what that looks like:
If you want to go deeper, check out this video, and get practice with this exercise.

## Magnitude

When we visualize vectors as arrows, a natural question to ask might be, "How long is it?" The magnitude of a vector answers this question. We write the magnitude of a vector with double bars on both sides, or sometimes with just single bars: $‖\stackrel{\to }{a}‖$ or $|\stackrel{\to }{a}|$.
We calculate the magnitude with the Pythagorean theorem, because we can think of a vector as the hypotenuse of a triangle. This is equivalent to using the distance formula, so the magnitude of the vector $\left(a,b\right)$ is $\sqrt{{a}^{2}+{b}^{2}}$.
Let's try an example.
Problem 3
If $\stackrel{\to }{a}=\left(2,5\right)$, then $‖\stackrel{\to }{a}‖=$

Magnitude works the same in 3D and in higher dimensions.
Problem 4
If $\stackrel{\to }{b}=\left(-2,3,1\right)$, then $‖\stackrel{\to }{b}‖=$

If you want to go deeper, check out this video, and get practice with this exercise

## What's next

Beyond addition, scalar multiplication, and magnitude, there are two more important operations between vectors. These are the dot product and the cross product, and we will cover them in the next two articles.

## Want to join the conversation?

• Why can't we use the i-hat notation for vectors in higher dimensions? Is it because we can't imagine vectors in >3 dimensions using orthogonal unit vectors? If this is the case then how can the notion of using Pythagorean theorem to calculate the magnitude of a vector be extended to higher dimensions (>3)?
• Hi Yatish, good question. The reason we can't use i-hat notation beyond three dimensions is just that we only have so many letters available: i-hat, j-hat, k-hat. You could of course define further basis vectors with other letters. For >3 dimensions, we typically number these vectors in the subscript, for instance e_1, e_2, ..., e_9. The Pythagorean Theorem is true in all dimensions.
• So far vectors seem simple (for me at least) but still don't understand how a vector can be 3D
• A vector can be 3D when it has three components. Just like the vector (2,4) is 2-dimensional, (2, 4, 1) is 3-dimensional. It represents a vector in 3-dimensional space (xyz)
• "We calculate the magnitude with the Pythagorean theorem, because we can think of a vector as the hypotenuse of a triangle."
But the angle between two vectors can be any angle, so why does this work even if the 3 vectors (a, b, a+b) do not form a right angle triangle?
• Vectors a and b are always right angles to each other, so you can use the Pythagorean theorem to determine the magnitude (or length) of a+b. It is true that the angles between a and a+b or b and a+b can be any angle between (but not including) 0 and 90 degrees, but that doesn't matter when calculating the Pythagorean theorem.
• any more explanations regarding “Magnitude works the same in 3D and in higher dimensions”? I understand how it works in 2D.

e.g., sqrt{(-2)^2 + 3^2 + 1^2} = sqrt14

thx
(1 vote)
• The formula for the magnitude of a vector (Pythagorean theorem) naturally extends to any number of dimensions. The magnitude of an n dimensional vector is the square root of the sum of the squares of its n components.
In symbols,

|<x_1, x_2,…, x_n>|
= sqrt(x_1^2 + x_2^2 +…+ x_n^2).

Have a blessed, wonderful Thanksgiving!