\(\newcommand{\augmatrix}[2]{\left(\begin{array}{@{}#1 |c@{}} #2 \end{array}\right)} \newcommand{\lt}{ < } \newcommand{\gt}{ > } \newcommand{\amp}{ & } \)

Section1.1Vectors

SubsectionThe Assignment

  • Read section 1.1 of Strang (pages 1-7).
  • Read the following and complete the exercises below.
  • Find the series of YouTube videos by user 3Blue1Brown titled The Essence of Linear Algebra and start watching. You only need to watch one or two for now, but eventually you will want to watch them all. Each runs between five and fifteen minutes.

SubsectionLearning Objectives

Before class, a student should be able to:

  • Add vectors.
  • Multiply a vector by a scalar.
  • Compute linear combinations.
  • Draw pictures which correspond to the above operations.
At some point, a student should be able to:
  • Solve linear combination equations involving unknown coefficients.
  • Solve linear combination equations involving unknown vectors.

SubsectionSome Discussion

Algebraically, a vector is a stack of numbers in a set of parentheses or brackets, like this\begin{align*} \begin{pmatrix} 2 \\ 7 \\ 9 \end{pmatrix}, \text{ or } \begin{bmatrix}2 \\ 7 \\ 9 \end{bmatrix}, \text{ or } \begin{pmatrix} 2 & 7 & 9 \end{pmatrix}. \end{align*} The individual numbers are called the components or entries or coordinates of the vector. For example, \(7\) is the second component of the vectors above.

The first two vectors above are called column vectors because they are stacked vertically. The third is called a row vector because it is arranged horizontally. For this class, we will always use column vectors, but to save space, we might sometimes write them as row vectors. It is up to you to make the switch. (We will see later how this matters!)

Vectors can take lots of different sizes. The vectors above are all \(3\)-vectors. Here is a \(2\)-vector: \begin{equation*}\begin{pmatrix} 71 \\ -12 \end{pmatrix}.\end{equation*} Here is a \(4\)-vector: \begin{equation*}\begin{pmatrix} \pi \\ 0 \\ -\pi \\ 1\end{pmatrix}.\end{equation*}

The main value in using vectors lies in their standard interpretations. Let's focus on \(3\)-vectors for now. The vector \(\left(\begin{smallmatrix} a \\ b \\ c\end{smallmatrix}\right)\) can represent

  • A point in space described in the standard three-dimensional rectangular coordinate system with \(x\) coordinate equal to \(a\), \(y\)-coordinate equal to \(b\) and \(z\) coordinate equal to \(c\).

  • An arrow in space which points from the origin \((0,0,0)\) to the point \((a,b,c)\).

  • An arrow in space which points from some point \((x,y,z)\) to the point \((x+a,y+b,z+c)\).

SubsubsectionOperations on Vectors

There are two operations on vectors which are of utmost importance for linear algebra. (In fact, if your problem has these operations in it, there is a chance you are doing linear algebra already.)

Scalar Multiplication

Given a number \(\lambda \in \mathbb{R}\) and a vector \(v = \left(\begin{smallmatrix} a \\ b \\ c \end{smallmatrix}\right)\), we form the new vector \begin{equation*}\lambda v = \left(\begin{smallmatrix} \lambda a \\ \lambda b \\ \lambda c \end{smallmatrix}\right).\end{equation*}

Addition

Given a vector \(v = \left(\begin{smallmatrix} a \\ b \\ c \end{smallmatrix}\right)\) and a vector \(w = \left( \begin{smallmatrix} d \\ e \\ f \end{smallmatrix}\right)\) of the same size, we form their sum \begin{equation*} v+w = \left(\begin{smallmatrix} a+d \\ b+e \\ c+f \end{smallmatrix} \right). \end{equation*}

These operations have “obvious” generalizations to vectors of different sizes. Because things go entry-by-entry, these are often called coordinate-wise operations.

Combining these two operations gives us the notion of a linear combination. If \(\lambda\) and \(\mu\) are numbers and \(v\) and \(w\) are vectors of a common size, then the vector \begin{equation*}\lambda v + \mu w \end{equation*} is a linear combination of \(v\) and \(w\).

SubsectionSageMath Instructions

Basic Constructions

A vector in SageMath is constructed by applying the vector command to a list. Lists are entered in square brackets with entries separated by commas, so the typical way to create a vector looks like this:

Notice that nothing was displayed. SageMath just put the vector u into memory. We can ask for it by calling it.

SageMath defaults to displaying vectors horizontally, which is different from how we normally write them by hand. This is okay. You will get used to it quickly.

SageMath knows how to add, multiply by scalars, and form linear combinations, and the notation for it is just as easy as you would expect.

If you ask SageMath to plot a vector, you get this kind of picture:

And in two dimensions something similar...

If you find that you want a vector to have its tail someplace that is not the origin, use the arrow command.

Note that SageMath cut off some of this plot! Also, I used some options just to show them off. The arrow command works in three dimensions, too.

Interactive Demonstrations

This is a SageMath "interact." You can use this to explore the idea of linear combinations of \(2\)-vectors.

SubsectionExercises

When solving an equation built as a linear combination of vectors with unknown coefficients, a set of values for those coefficients is called a solution to the equation if they make the equation true.

Task1

  1. Find an example of numbers \(\lambda\) and \(\mu\) so that \begin{equation*}\lambda \begin{pmatrix} 1 \\ 2 \end{pmatrix} = \mu \begin{pmatrix} 2 \\ -1 \end{pmatrix}\end{equation*} or describe why no such numbers can exist.
  2. Find a vector \(b = \left( \begin{smallmatrix} b_1 \\ b_2 \end{smallmatrix} \right)\) so that \begin{equation*} \begin{pmatrix} 2 \\ 7 \end{pmatrix} + \begin{pmatrix} b_1 \\ b_2 \end{pmatrix} = \begin{pmatrix} 10 \\ -3 \end{pmatrix}\end{equation*} or describe why no such vector can exist.
  3. Give examples of numbers \(a\) and \(b\) such that \begin{equation*} a \begin{pmatrix} 2 \\ 1 \end{pmatrix} + b \begin{pmatrix} 1 \\ 1 \end{pmatrix} = \begin{pmatrix} 7 \\ 5 \end{pmatrix}\end{equation*} or explain why no such numbers exist.

Task2

  1. Give an example of a number \(\lambda\) so that \begin{equation*}\lambda \begin{pmatrix} 7 \\ -1 \\ 2 \end{pmatrix} + 3 \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 49 \\ -7 \\ 20 \end{pmatrix}\end{equation*} or explain why no such number exists.
  2. Give an example of numbers \(\lambda\) and \(\mu\) which are a solution to the equation \begin{equation*} \lambda \begin{pmatrix} 7 \\ -1 \\ 2 \end{pmatrix} + \mu \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} = \begin{pmatrix} 49 \\ -7 \\ 20 \end{pmatrix}\end{equation*} or explain why no such solution exists.

Task3

  1. Find a vector \(b = \left( \begin{smallmatrix} b_1 \\ b_2 \end{smallmatrix} \right)\) so that this equation has at least one solution \(\lambda\)\begin{equation*}\lambda \begin{pmatrix} 1 \\ -2 \end{pmatrix} + \begin{pmatrix} b_1 \\ b_2 \end{pmatrix} = \begin{pmatrix} 2 \\ 3 \end{pmatrix}\end{equation*} or describe why no such vector \(b\) can exist.
  2. Give an example of a vector \(X = \left( \begin{smallmatrix} x \\ y \end{smallmatrix} \right)\) so that the equation \begin{equation*}a \begin{pmatrix} 2 \\ 1 \end{pmatrix} + b X = \begin{pmatrix}7 \\ 5 \end{pmatrix} \end{equation*} has no solution \((a,b)\), or explain why no such vector exists.

Task4

  1. Give an example of a vector \(w = \begin{pmatrix} x \\ y \\ z \end{pmatrix}\) so that the equation \begin{equation*}a \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} + b \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} = \begin{pmatrix} x \\ y \\ z \end{pmatrix}\end{equation*} has no solution \((a,b)\), or explain why no such vector exists.
  2. Give an example of a vector \(w = \begin{pmatrix} x \\ y \\ z \end{pmatrix}\) so that the equation \begin{equation*} a \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} + b \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} = \begin{pmatrix} x \\ y \\ z \end{pmatrix}\end{equation*} has exactly one solution \((a,b)\), or explain why no such vector exists.

Task5

  1. Give an example of a vector \(X = \begin{pmatrix} x \\ y \\ z\end{pmatrix}\) such that the equation \begin{equation*} a \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} + b \begin{pmatrix} 0 \\ 0 \\ 1\end{pmatrix} + c \begin{pmatrix} 1 \\ 1 \\ 1\end{pmatrix} = \begin{pmatrix}x \\ y \\ z \end{pmatrix} \end{equation*} has no solution \((a,b,c)\), or explain why no such vector exists.
  2. Give an example of a vector \(X = \begin{pmatrix} x \\ y \\ z\end{pmatrix}\) such that the equation \begin{equation*} a \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} + b \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} + c \begin{pmatrix} 1 \\ 1 \\ 1\end{pmatrix} = \begin{pmatrix}x \\ y \\ z \end{pmatrix}\end{equation*} has exactly one solution \((a,b,c)\), or explain why no such vector exists.

Task6

Give an example of a vector \(X = \begin{pmatrix} x \\ y \\ z\end{pmatrix}\) such that the equation \begin{equation*} a \begin{pmatrix} 1 \\ 0 \\ 2 \end{pmatrix} + b \begin{pmatrix} 0 \\ -1 \\ 0 \end{pmatrix} + c \begin{pmatrix} x \\ y \\ z\end{pmatrix} = \begin{pmatrix}3 \\ 7 \\ 7 \end{pmatrix}\end{equation*} has no solutions, or explain why no such vector exists.