Subsection CV Column Vectors
Definition VSCV. Vector Space of Column Vectors.
The vector space
\(\complex{m}\) is the set of all column vectors (
Definition CV) of size
\(m\) with entries from the set of complex numbers,
\(\complexes\text{.}\)
When a set similar to this is defined using only column vectors where all the entries are from the real numbers, it is written as \({\mathbb R}^m\) and is known as Euclidean \(m\)-space.
The term vector is used in a variety of different ways. We have defined it as an ordered list written vertically. It could simply be an ordered list of numbers, and perhaps written as \(\left\langle 2,\,3,\,-1,\,6\right\rangle\text{.}\) Or it could be interpreted as a point in \(m\) dimensions, such as \(\left(3,\,4,\,-2\right)\) representing a point in three dimensions relative to \(x\text{,}\) \(y\) and \(z\) axes. With an interpretation as a point, we can construct an arrow from the origin to the point which is consistent with the notion that a vector has direction and magnitude.
All of these ideas can be shown to be related and equivalent, so keep that in mind as you connect the ideas of this course with ideas from other disciplines. For now, we will stick with the idea that a vector is just a list of numbers, in some particular order.
Sage VSCV. Vector Spaces of Column Vectors.
It is possible to construct vector spaces several ways in Sage. For now, we will show you two basic ways. Remember that while our theory is all developed over the complex numbers, \(\complexes\text{,}\) it is better to initially illustrate these ideas in Sage using the rationals, QQ
.
To create a vector space, we use the VectorSpace()
constructor, which requires the name of the number system for the entries and the number of entries in each vector. We can display some information about the vector space, and with tab-completion you can see what functions are available. We will not do too much with these methods immediately, but instead learn about them as we progress through the theory.
Notice that the word “dimension” is used to refer to the number of entries in a vector contained in the vector space, whereas we have used the word “degree” before. If the way you use Sage provides tab-completion, then press the TAB
key while in the next cell to see the range of methods you can use on a vector space.
We can easily create “random” elements of any vector space, much as we did earlier for the kernel of a matrix. Try executing the next compute cell several times.
Vector spaces are fundamental objects in Sage and in mathematics, and Sage has a nice compact way to create them, mimicking the notation we use when working on paper. While the next example includes the Sage version of the complex numbers, remember to be sure to do all your calculations with the rationals, QQ
.
Sage can determine if two vector spaces are the same. Notice that we use two equals sign to test equality, since we use a single equals sign to make assignments.
Subsection VEASM Vector Equality, Addition, Scalar Multiplication
We start our study of this set by first defining what it means for two vectors to be the same.
Definition CVE. Column Vector Equality.
Suppose that \(\vect{u},\,\vect{v}\in\complex{m}\text{.}\) Then \(\vect{u}\) and \(\vect{v}\) are equal, written \(\vect{u}=\vect{v}\) if
\begin{gather*}
\vectorentry{\vect{u}}{i}=\vectorentry{\vect{v}}{i}
\end{gather*}
for all \(1\leq i\leq m\text{.}\)
Now this may seem like a silly (or even stupid) thing to say so carefully. Of course two vectors are equal if they are equal for each corresponding entry! Well, this is not as silly as it appears. We will see a few occasions later where the obvious definition is not the right one. And besides, in doing mathematics we need to be very careful about making all the necessary definitions and making them unambiguous. And we have done that here.
Notice now that the symbol “=” is now doing triple-duty. We know from our earlier education what it means for two numbers (real or complex) to be equal, and we take this for granted. In
Definition SE we defined what it meant for two sets to be equal. Now we have defined what it means for two vectors to be equal, and this new definition builds on our prior definition for when two numbers are equal when we use the condition
\(\vectorentry{\vect{u}}{i}=\vectorentry{\vect{v}}{i}\) repeatedly, for all
\(1\leq i\leq m\text{.}\) So think carefully about your objects when you see an equal sign and think about just which notion of equality you have encountered. This will be especially important when you are asked to construct proofs whose conclusion states that two objects are equal. If you have an electronic copy of the book, such as the PDF version, searching on “Definition CVE” can be an instructive exercise. See how often, and where, the definition is employed.
OK, let us do an example of vector equality that begins to hint at the utility of this definition.
Example VESE. Vector equality for a system of equations.
Consider the system of linear equations in Archetype
B,
\begin{align*}
-7x_1 -6 x_2 - 12x_3 &=-33\\
5x_1 + 5x_2 + 7x_3 &=24\\
x_1 +4x_3 &=5
\end{align*}
Note the use of three equals signs — each indicates an equality of numbers (the linear expressions are numbers when we evaluate them with fixed values of the variable quantities). Now write the vector equality,
\begin{equation*}
\colvector{-7x_1 -6 x_2 - 12x_3\\ 5x_1 + 5x_2 + 7x_3\\ x_1 +4x_3} = \colvector{-33\\24\\5}\text{.}
\end{equation*}
By
Definition CVE, this
single equality (of two column vectors) translates into
three simultaneous equalities of numbers that form the system of equations. So with this new notion of vector equality we can become less reliant on referring to
systems of
simultaneous equations. There is more to vector equality than just this, but this is a good example for starters and we will develop it further.
We will now define two operations on the set \(\complex{m}\text{.}\) By this we mean well-defined procedures that somehow convert vectors into other vectors. Here are two of the most basic definitions of the entire course.
Definition CVA. Column Vector Addition.
Suppose that \(\vect{u},\,\vect{v}\in\complex{m}\text{.}\) The sum of \(\vect{u}\) and \(\vect{v}\) is the vector \(\vect{u}+\vect{v}\) defined by
\begin{gather*}
\vectorentry{\vect{u}+\vect{v}}{i}=\vectorentry{\vect{u}}{i}+\vectorentry{\vect{v}}{i}
\end{gather*}
for \(1\leq i\leq m\text{.}\)
So vector addition takes two vectors of the same size and combines them (in a natural way!) to create a new vector of the same size. Notice that this definition is required, even if we agree that this is the obvious, right, natural or correct way to do it. Notice too that the symbol ‘+’ is being recycled. We all know how to add numbers, but now we have the same symbol extended to double-duty and we use it to indicate how to add two new objects, vectors. And this definition of our new addition of vectors is built on our prior meaning of addition of numbers in the expressions \(\vectorentry{\vect{u}}{i}+\vectorentry{\vect{v}}{i}\text{.}\) Think about your objects, especially when doing proofs. Vector addition is easy, here is an example from \(\complex{4}\text{.}\)
Example VA. Addition of two vectors in \(\complex{4}\).
For vectors \(\vect{u},\,\vect{v}\text{,}\) their sum is
\begin{align*}
\vect{u}&=\colvector{2\\-3\\4\\2}
&
\vect{v}&=\colvector{-1\\5\\2\\-7}
&
\vect{u}+\vect{v}&=
\colvector{2\\-3\\4\\2}+\colvector{-1\\5\\2\\-7}=
\colvector{2+(-1)\\-3+5\\4+2\\2+(-7)}=
\colvector{1\\2\\6\\-5}\text{.}
\end{align*}
Our second operation takes two objects of different types, specifically a number and a vector, and combines them to create another vector. In this context we call the number a scalar in order to emphasize that it is not a vector.
Definition CVSM. Column Vector Scalar Multiplication.
Suppose \(\vect{u}\in\complex{m}\) and \(\alpha\in\complexes\text{,}\) then the scalar multiple of \(\vect{u}\) by \(\alpha\) is the vector \(\alpha\vect{u}\) defined by
\begin{gather*}
\vectorentry{\alpha\vect{u}}{i}=\alpha\vectorentry{\vect{u}}{i}
\end{gather*}
for \(1\leq i\leq m\text{.}\)
Notice that we are doing a kind of multiplication here, but we are defining a new type, perhaps in what appears to be a natural way. We use juxtaposition (smashing two symbols together side-by-side) to denote this operation rather than using a symbol like we did with vector addition. So this can be another source of confusion. When two symbols are next to each other, are we doing regular old multiplication, the kind we have done for years, or are we doing scalar vector multiplication, the operation we just defined? Think about your objects — if the first object is a scalar, and the second is a vector, then it must be that we are doing our new operation, and the result of this operation will be another vector.
Notice how consistency in notation can be an aid here. If we write scalars as lower case Greek letters from the start of the alphabet (such as \(\alpha\text{,}\) \(\beta\text{,}\) …) and write vectors in bold Latin letters from the end of the alphabet (\(\vect{u}\text{,}\) \(\vect{v}\text{,}\) …), then we have some hints about what type of objects we are working with. This can be a blessing and a curse, since when we go read another book about linear algebra, or read an application in another discipline (physics, economics, …) the types of notation employed may be very different and hence unfamiliar.
Again, computationally, vector scalar multiplication is very easy.
Example CVSM. Scalar multiplication in \(\complex{5}\).
For \(\vect{u}\) and \(\alpha=6\) we have
\begin{align*}
\vect{u}&=\colvector{3\\1\\-2\\4\\-1}
&
\alpha\vect{u}&=
6\colvector{3\\1\\-2\\4\\-1}=
\colvector{6(3)\\6(1)\\6(-2)\\6(4)\\6(-1)}=
\colvector{18\\6\\-12\\24\\-6}
\end{align*}
Sage VO. Vector Operations.
Sage can easily perform the two basic operations with vectors, vector addition, +
, and scalar vector multiplication, *
. Notice that Sage is not confused by an ambiguity due to multiple meanings for the symbols +
and *
— for example, Sage knows that 3 + 12
is different than the vector additions below.
Subsection VSP Vector Space Properties
With definitions of vector addition and scalar multiplication we can state, and prove, several properties of each operation, and some properties that involve their interplay. We now collect ten of them here for later reference.
Theorem VSPCV. Vector Space Properties of Column Vectors.
- ACC Additive Closure, Column Vectors
If \(\vect{u},\,\vect{v}\in\complex{m}\text{,}\) then \(\vect{u}+\vect{v}\in\complex{m}\text{.}\)
- SCC Scalar Closure, Column Vectors
If \(\alpha\in\complexes\) and \(\vect{u}\in\complex{m}\text{,}\) then \(\alpha\vect{u}\in\complex{m}\text{.}\)
- CC Commutativity, Column Vectors
If \(\vect{u},\,\vect{v}\in\complex{m}\text{,}\) then \(\vect{u}+\vect{v}=\vect{v}+\vect{u}\text{.}\)
- AAC Additive Associativity, Column Vectors
If \(\vect{u},\,\vect{v},\,\vect{w}\in\complex{m}\text{,}\) then \(\vect{u}+\left(\vect{v}+\vect{w}\right)=\left(\vect{u}+\vect{v}\right)+\vect{w}\text{.}\)
- ZC Zero Vector, Column Vectors
There is a vector, \(\zerovector\text{,}\) called the zero vector, such that \(\vect{u}+\zerovector=\vect{u}\) for all \(\vect{u}\in\complex{m}\text{.}\)
- AIC Additive Inverses, Column Vectors
If \(\vect{u}\in\complex{m}\text{,}\) then there exists a vector \(\vect{-u}\in\complex{m}\) so that \(\vect{u}+ (\vect{-u})=\zerovector\text{.}\)
- SMAC Scalar Multiplication Associativity, Column Vectors
If \(\alpha,\,\beta\in\complexes\) and \(\vect{u}\in\complex{m}\text{,}\) then \(\alpha(\beta\vect{u})=(\alpha\beta)\vect{u}\text{.}\)
- DVAC Distributivity across Vector Addition, Column Vectors
If \(\alpha\in\complexes\) and \(\vect{u},\,\vect{v}\in\complex{m}\text{,}\) then \(\alpha(\vect{u}+\vect{v})=\alpha\vect{u}+\alpha\vect{v}\text{.}\)
- DSAC Distributivity across Scalar Addition, Column Vectors
If \(\alpha,\,\beta\in\complexes\) and \(\vect{u}\in\complex{m}\text{,}\) then \((\alpha+\beta)\vect{u}=\alpha\vect{u}+\beta\vect{u}\text{.}\)
- OC One, Column Vectors
If \(\vect{u}\in\complex{m}\text{,}\) then \(1\vect{u}=\vect{u}\text{.}\)
Proof.
While some of these properties seem very obvious, they all require proof. However, the proofs are not very interesting, and border on tedious. We will prove one version of distributivity very carefully, and you can test your proof-building skills on some of the others.
Exercise VO.T13 has a proof in the solution, while Exercises
VO.T17 and
VO.T18 are excellent practice.
We need to establish an equality, so we will do so by beginning with one side of the equality, apply various definitions and theorems (listed to the right of each step) to massage the expression from the left into the expression on the right. Here we go with a proof of
Property DSAC.
For \(1\leq i\leq m\text{,}\)
\begin{align*}
\vectorentry{(\alpha+\beta)\vect{u}}{i}&=(\alpha+\beta)\vectorentry{\vect{u}}{i}&&
\knowl{./knowl/xref/definition-CVSM.html}{\text{Definition CVSM}}\\
&=\alpha\vectorentry{\vect{u}}{i}+\beta\vectorentry{\vect{u}}{i}&&
\knowl{./knowl/xref/property-DCN.html}{\text{Property DCN}}\\
&=\vectorentry{\alpha\vect{u}}{i}+\vectorentry{\beta\vect{u}}{i}&&
\knowl{./knowl/xref/definition-CVSM.html}{\text{Definition CVSM}}\\
&=\vectorentry{\alpha\vect{u}+\beta\vect{u}}{i}&&
\knowl{./knowl/xref/definition-CVA.html}{\text{Definition CVA}}\text{.}
\end{align*}
Since the individual components of the vectors
\((\alpha+\beta)\vect{u}\) and
\(\alpha\vect{u}+\beta\vect{u}\) are equal for
all \(i\text{,}\) \(1\leq i\leq m\text{,}\) Definition CVE tells us the vectors are equal.
Many of the conclusions of our theorems can be characterized as “identities,” especially when we are establishing basic properties of operations such as those in this section. Most of the properties listed in
Theorem VSPCV are examples. So some advice about the style we use for proving identities is appropriate right now. Have a look at Proof Technique
PI.
Be careful with the notion of the vector \(\vect{-u}\text{.}\) This is a vector that we add to \(\vect{u}\) so that the result is the particular vector \(\zerovector\text{.}\) This is basically a property of vector addition. It happens that we can compute \(\vect{-u}\) using the other operation, scalar multiplication. We can prove this directly by writing that
\begin{gather*}
\vectorentry{\vect{-u}}{i}
=-\vectorentry{\vect{u}}{i}
=(-1)\vectorentry{\vect{u}}{i}
=\vectorentry{(-1)\vect{u}}{i}
\end{gather*}
We will see later how to derive this property as a
consequence of several of the ten properties listed in
Theorem VSPCV.
Similarly, we will often write something you would immediately recognize as
vector subtraction. This could be placed on a firm theoretical foundation — as you can do yourself with
Exercise VO.T30.
A final note.
Property AAC implies that we do not have to be careful about how we “parenthesize” the addition of vectors. In other words, there is nothing to be gained by writing
\(\left(\vect{u}+\vect{v}\right)+\left(\vect{w}+\left(\vect{x}+\vect{y}\right)\right)\) rather than
\(\vect{u}+\vect{v}+\vect{w}+\vect{x}+\vect{y}\text{,}\) since we get the same result no matter which order we choose to perform the four additions. So we will not be careful about using parentheses this way.
Sage ANC. A Note on Coercion.
Study the following sequence of commands, while cognizant of the failure to specify a number system for x
.
None of this should be too much of a surprise, and the results should be what we would have expected. Though for x
we never specified if 1, 2, 3
are integers, rationals, reals, complexes, or …? Let us dig a little deeper and examine the parents of the five vectors involved.
So x
and u
belong to something called an “ambient free module,” whatever that is. What is important here is that the parent of x
uses the integers as its number system. How about u
, v
, y
, w
, z
? All but the first has a parent that uses the rationals for its number system.
Three of the final four vectors are examples of a process that Sage calls “coercion.” Mathematical elements get converted to a new parent, as necessary, when the conversion is totally unambiguous. In the examples above:
u
is the result of scalar multiplication by an integer, so the computation and result can all be accommodated within the integers as the number system.
v
involves scalar multiplication by a scalar that is not an integer, and which could be construed as a rational number. So the result needs to have a parent whose number system is the rationals.
y
is created explicitly as a vector whose entries are rational numbers.
Even though w
is created only with products of integers, the fact that y
has entries considered as rational numbers, so too does the result.
The creation of z
is the result of adding a vector of integers to a vector of rationals. This is the best example of coercion — Sage promotes x
to a vector of rationals and therefore returns a result that is a vector of rationals. Notice that there is no ambiguity and no argument about how to promote x
, and the same would be true for any vector full of integers.
The coercion above is automatic, but we can also usually force it to happen without employing an operation.
So the syntax is to use the name of the parent like a function and coerce the element into the new parent. This can fail if there is no natural way to make the conversion.
Coercion is one of the more mysterious aspects of Sage, and the above discussion may not be very clear the first time though. But if you get an error (like the one above) talking about coercion, you know to come back here and have another read through. For now, be sure to create all your vectors and matrices over QQ
and you should not have any difficulties.