# 6.02: Vectors

- Page ID
- 9969

For our purposes, a vector is a collection of real numbers in a one- dimensional array.^{1} We usually think of the array as being arranged in a column and write

\[x = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ | \\ x_n \end{bmatrix}\]

Notice that we indicate a vector with boldface and the constituent elements with subscripts. A real number by itself is called a *scalar*, in distinction from a vector or a matrix. We say that \(x\) is an n-vector, meaning that \(x\) has \(n\) elements. To indicate that \(x_1\) is a real number, we write

\[x_1 \;∈ \;\mathbb{R}\]

meaning that \(x_1\) is contained in \(\mathbb{R}\), the set of real numbers. To indicate that \(x\) is a vector of \(n\) real numbers, we write

\[x\;∈\;\mathbb{R}^n\]

meaning that \(x\) is contained in \(R^n\), the set of real n-tuples. Geometrically, \(R^n\) is n-dimensional space, and the notation \(x\;∈\;\mathbb{R}^n\) means that \(x\) is a point in that space, specified by the \(n\) coordinates \(x_1,x_2,...,x_n\). The figure shows a vector in \(R^3\), drawn as an arrow from the origin to the point \(x\). Our geometric intuition begins to fail above three dimensions, but the linear algebra is completely general.

We sometimes find it useful to sketch vectors with more than three dimensions in the same way as the three-dimensional vector of the figure. We then consider each axis to represent more than one dimension, a hyperplane, in our n-dimensional space. We cannot show all the details of what is happening in n-space on a three-dimensional figure, but we can often show important features and gain geometrical insight.

## Vector Addition

Vectors with the same number of elements can be added and subtracted in a very natural way:

\[x+y = \begin{bmatrix} x_1+y_1 \\ x_2+y_2 \\ x_3+y_3 \\ | \\ x_n+y_n \end{bmatrix}; x−y = /begin{bmatrix} x_1−y_1 \\ x_2−y_2 \\ x_3−y_3 \\ | \\ x_n−y_n \end{bmatrix}\]

Exercise \(\PageIndex{1}\)

The difference between the vector \(x=\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}\) and the vector \(y=\begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}\) is the vector \(z=x−y=\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}\). These vectors are illustrated in the Figure. You can see that this result is consistent with the definition of vector subtraction in the Equation. You can also picture the subtraction in the Figure by mentally reversing the direction of vector \(y\) to get \(−y\) and then adding it to \(x\) by sliding it to the position where its tail coincides with the head of vector \(x\). (The head is the end with the arrow.) When you slide a vector to a new position for adding to another vector, you must not change its length or direction.

Exercise \(\PageIndex{2}\)

Compute and plot x+y and x−y for each of the following cases:

- \(x=\begin{bmatrix}1\\3\\2\end{bmatrix},y=\begin{bmatrix}1\\2\\3\end{bmatrix}\)
- \(x=\begin{bmatrix}−1\\3\\−2\end{bmatrix},y=\begin{bmatrix}1\\2\\3\end{bmatrix}\)
- \(x=\begin{bmatrix}1\\−3\\2\end{bmatrix},y=\begin{bmatrix}1\\3\\2\end{bmatrix}\)

## Scalar Product

Several different kinds of vector multiplication are defined.^{2} We begin with the *scalar product*. Scalar multiplication is defined for scalar \(a\) and vector \(x\) as

\[ax=\begin{bmatrix}ax_1 \\ ax_2 \\ ax_3 \\ | \\ ax_n\end{bmatrix}\]

If \(|a|<1\), then the vector \(ax\) is "shorter" than the vector \(x\); if \(|a|>1\), then the vector \(ax\) is ‚"longer" than \(x\). This is illustrated for a 2-vector in the Figure.

Exercise \(\PageIndex{3}\)

Compute and plot the scalar product ax when \(x=\begin{bmatrix}1 \\ 1/2 \\ l/4 \end{bmatrix}\) for each of the following scalars:

- \(a=1\)
- \(a=−1\)
- \(a=−1/4\)
- \(a=2\)

Exercise \(\PageIndex{4}\)

Given vectors \(x,y,z∈\mathbb{R}^n\) and the scalar \(a∈\mathbb{R}\), prove the following identities:

- \(x+y=y+x\). Is vector addition commutative?
- \((x+y)+z=x+(y+z)\). Is vector addition associative?
- \(a(x+y)=ax+ay\). Is scalar multiplication distributive over vector addition?

## Footnotes

- In a formal development of linear algebra, the abstract concept of a vector space plays a fundamental role. We will leave such concepts to a complete course in linear algebra and introduce only the functional techniques necessary to solve the problems at hand.
- The division of two vectors is undefined, although three different ‚Äúdivisions‚Äù are defined in MATLAB.