Glossario

Seleziona una delle parole chiave a sinistra ...

Linear AlgebraVectors

Momento della lettura: ~20 min

A vector in \mathbb{R}^n is a column of n real numbers. These real numbers are called the components or entries of the vector.

Example
\mathbf{v} = \begin{bmatrix} -2 \\ 0 \\ 1 \end{bmatrix} is a vector in \mathbb{R}^3. We say that the first component of \mathbf{v} is equal to -2, the second component is equal to 0, and the third component is equal to 1.

For typographical convenience, and for consistency with Python Julia we will often write vectors horizontally, like [-2,0,1]. This notation means the same thing as \begin{bmatrix} -2 \\ 0 \\ 1 \end{bmatrix}.

We draw a vector in \mathbb{R}^2 as an arrow from one point to another so that the horizontal separation between the points is equal to the first component of the vector and the vertical separation between the points is equal to the second component.

We define the norm |\mathbf{v}| of a vector \mathbf{v} \in \mathbb{R}^n to be the length of the associated arrow, which may be calculated as the square root of the of \mathbf{v}'s components. A vector whose norm is 1 is called a unit vector.

The fundamental vector operations are:

  1. Vector addition (addition of two vectors), and
  2. Scalar multiplication (multiplication of a real number and a vector).

These operations are defined componentwise, and they have simple geometric interpretations:

  1. Summing vectors concatenates them tail-to-head, and

  2. Multiplying a vector by a positive real number k preserves its direction and multiplies its norm by k.

    .row.padded .grow figure img(src="/content/linear-algebra/images/vecadd.svg") p.caption.md Vector addition: [3,1 ] + [1,2] = [4,3] .grow figure img(src="/content/linear-algebra/images/vecscale.svg") p.caption.md Scalar multiplication: 2[2,1] = [4,2]

Scalar multiplication is denoted symbolically by placing the scalar adjacent to the vector, and vector addition is denoted with "+" between two vectors. We use the usual notational conveniences from arithmetic, like writing \mathbf{w}-\mathbf{v} as an abbreviation for \mathbf{w}+(-1)\mathbf{v}.

Exercise
The first component of 3\begin{bmatrix} -2 \\ 11 \end{bmatrix} - \begin{bmatrix} 4 \\ 0 \end{bmatrix} is equal to and the second component is equal to .

Solution. By definition, we have

\begin{align*}3 \begin{bmatrix} -2 \\\ 11 \end{bmatrix} - \begin{bmatrix} 4 \\\ 0 \end{bmatrix} = \begin{bmatrix} -6 \\\ 33 \end{bmatrix} + \begin{bmatrix} -4 \\\ 0 \end{bmatrix} = \begin{bmatrix} -10 \\\ 33 \end{bmatrix}.\end{align*}

Exercise
Determine whether there exists a real number r satisfying the vector equation

\begin{align*}r \begin{bmatrix} -3 \\\ 2 \end{bmatrix} - \begin{bmatrix} 2 \\\ 1 \end{bmatrix} = \begin{bmatrix} 4 \\\ 2 \end{bmatrix}.\end{align*}

Solution. For the first component of the two vectors to be equal, the equation -3r - 2 = 4 would have to hold. This implies that r = -2. If we substitute r = -2, then the second component on the left-hand side is -5, so there is no such number.

Exercise
Show that every nonzero vector \mathbf{v} can be written as the product of a nonnegative real number c and a unit vector \mathbf{u}.

Solution. We can see that the unit vector \mathbf{u} must point in the same direction as \mathbf{v}, since multiplying it by c does not change its direction. Furthermore, if \mathbf{u} is the unit vector pointing in the same direction as \mathbf{v}, then we must scale \mathbf{u} by a factor of |\mathbf{v}| to get \mathbf{v}. Thus we find that \mathbf{u} = \mathbf{v}/|\mathbf{v}| and c = |\mathbf{v}|.

Exercise
Find a formula in terms of \mathbf{u} and \mathbf{v} which represents the vector from the head of \mathbf{v} to the head of \mathbf{u} when \mathbf{u} and \mathbf{v} are situated so that their tails coincide.

Note: Two vectors' tails coincide when they originate from the same point.

Solution. The desired vector \mathbf{w} has the property that adding it to \mathbf{v} gives \mathbf{u}. In other words, \mathbf{w} + \mathbf{v} = \mathbf{u}, which implies that \mathbf{w} = \mathbf{u} - \mathbf{v}.

Exercise
Solve for \mathbf{u} in terms of c and \mathbf{v} in the equation c \mathbf{u} + \mathbf{v} = \boldsymbol{0}, assuming that \mathbf{u} and \mathbf{v} are vectors in \mathbb{R}^n and c is a nonzero real number.

Solution. We add -\mathbf{v} to both sides and multiply both sides by c^{-1} to get \mathbf{u} = -c^{-1} \mathbf{v}.

Bruno
Bruno Bruno