Skip to main content
Engineering LibreTexts

4.2: Vectors

  • Page ID
    9969
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    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} \nonumber \]

    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} \nonumber \]

    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 \nonumber \]

    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.


    Figure one shows a vector in R^3, a three-dimensional graph. The axis pointing towards the screen is labeled x_1, the axis pointing to the right is labeled x_2, and the axis pointing up is labeled x_3. An arrow points out into the positive direction of all three axes, up, towards the screen, and to the right. Its endpoint is labeled x, and dashed line segments are drawn back from this point to respective points on the axes and on the x_1 x_2 plane, showing its location.Figure \(\PageIndex{1}\): A Vector in R3

    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} \nonumber \]

    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.

    Figure two is a three-dimensional graph containing three vectors. The axis pointing out towards the screen is labeled x_1, the axis pointing to the right is labeled x_2, and the axis pointing up is labeled x_3. One vector y points up along the x_3-axis and is labeled with a 3 by 1 matrix, 0 0 1. A vector z points in the positive x_2 and x_1 direction on the x_2 x_1 plane, and is labeled with a 3 by 1 matrix, 1, 1, 0. A final vector x points in the positive x_1, x_2, and x_3 direction, and is labeled with a 3 by 1 matrix, 1 1 1.
    Figure \(\PageIndex{2}\): Subtraction of Vectors

    Exercise \(\PageIndex{2}\)

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

    1. \(x=\begin{bmatrix}1\\3\\2\end{bmatrix},y=\begin{bmatrix}1\\2\\3\end{bmatrix}\)
    2. \(x=\begin{bmatrix}−1\\3\\−2\end{bmatrix},y=\begin{bmatrix}1\\2\\3\end{bmatrix}\)
    3. \(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} \nonumber \]

    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.

    Figure three is a two-dimensional cartesian graph with horizontal axis labeled x_1 and vertical axis labeled x_2. A line from the third quadrant moves through the origin into the first quadrant with a shallow positive slope. The lower end in the third quadrant has an arrow pointing away from the origin, and is labeled -2x. An arrow in the first quadrant points away from the origin and is labeled 1/2 x.
    Figure \(\PageIndex{3}\): The Scalar Product \(ax\)

    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:

    1. \(a=1\)
    2. \(a=−1\)
    3. \(a=−1/4\)
    4. \(a=2\)

    Exercise \(\PageIndex{4}\)

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

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

    Footnotes

    1. 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.
    2. The division of two vectors is undefined, although three different “divisions” are defined in MATLAB.

    This page titled 4.2: Vectors is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Louis Scharf (OpenStax CNX) via source content that was edited to the style and standards of the LibreTexts platform.

    • Was this article helpful?