0% found this document useful (0 votes)
21 views18 pages

Anderson M2B Lesson 3

Uploaded by

snpakistan80
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views18 pages

Anderson M2B Lesson 3

Uploaded by

snpakistan80
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Chapter 2

Vectors and Vector Operations

In this chapter, we introduce vectors and vector operations. Vectors are central
components of all four fundamental problems of applied linear algebra. Just as
the properties of real numbers form the building blocks of calculus, the properties
of vectors set the foundations for applied linear algebra. We can use vectors and
vector operations to do all of the following:

1. Encode data: Vectors encode multidimensional data in compact form.


2. Combine data: Vector addition and scalar-vector multiplication combine
known data to form new, related information that gives insight into the nature
of multidimensional data sets.
3. Understand relationships: The inner product of two vectors measures the
angle between these vectors and indicates the degree to which one vector
points in the same direction as another vector.
4. Measure length and distance: Vector norms measure the length of a vector
and can be used to calculate distances between two vectors.
5. Study algebraic properties: By identifying the algebraic properties of
vector operations, we enable a theoretic approach to constructing vectors and
vector operations.

2.1 Vectors and Vector Modeling


Vectors encode quantitative information. In this chapter, we define vectors as a
list of real-valued data entries organized in a vertical or horizontal array. In linear
algebra, vectors carry information as multiple dimensional data. The word vector
originates from the latin word advector, which means carrier. There are two types
of vectors we work with in this section: column vectors and row vectors. We begin
with the definition of a column vector and illustrate the vast utility of this data
structure.

45
Definition 2.1: Column vector

Let n œ N. A column vector x œ Rn◊1 has n real-valued entries,


organized in n rows and one column, in the form
S T
x1
W x2 X
W X
x = W . X.
U .. V
xn

For each i œ {1, 2, ..., n}, the entry in the ith row of x, labeled xi , is a
real number.

Column vectors are vertical arrays of real numbers. When writing x œ Rn◊1 , the
superscript on R represent the dimensions of vector x. The first argument, n, of the
superscript indicates the number of rows of this vector. The second argument, 1,
indicates the number of columns of x. The times symbol, ◊, separates the number
of rows of the vector from the number of columns.
We enumerate each entry of a vector using an index variable that we write as a
subscript. We label the top most entry of a column vector as x1 and increase the
index variable by one as we move downward through the rows. This enumeration
scheme continues until we reach the entry in the last row, which we call xn .

EXAMPLE 2.1.1
Let’s use column vectors to create a vertex model of a triangle in two dimensions.
We define our three vertices as follows:
5 6 5 6 5 6
y 0 ≠1 2
v1 = , v2 = , v3 = .
0 1 1

• • In this model, we assume each vector represents a point in two-dimensional space.


The entry in the first row of each vertex vector encodes distance along the horizontal
• x axis and the entry in the second row encodes distance along the vertical axis. When
we graph these vertices, we do not connect the dots because this model does not
encode links between vertices. In the next chapter, we will enhance this modeling
scheme to create wireframe models in two or three dimensions. For now, our vertex
model only defines points in the cartesian plane.

EXAMPLE 2.1.2
Many college instructors use a grading scheme relying on multiple dimensional data.
In this Math 2B course, your final grade depends the four grade categories including
warm-up quizzes, exam 1, exam 2 and the final exam. The score you earn in each
grade category is computed as a ratio:

total points you earn in category


Grade category score = .
total points possible in category

In Math 2B, there are about 300 points available on your warm-up quizzes. Each
exam is worth 100 points. We can use this information to create a 4 ◊ 1 vector that

c Jeffrey A. Anderson
• 46
stores your entire performance in this class:
S q T
W 300 X
W X
W e1 X
W X
W 100 X
W X
g=W
W e2 X
X
W X
W 100 X
W X
W X
U V
f
100
In this case, we assume

q = the total number of points you earn on your warm-up quizzes


e1 = your final score on exam 1
e2 = your final score on exam 2
f = your score on your final exam

As we will see in our discussion of inner products, we use this grade vector along
with the vector of grade-category weights to calculate your final grade.

EXAMPLE 2.1.3
The voting record of the Senate, Congress or Supreme Court of the United States
of America is openly accessible to be viewed by US citizens. On any particular bill,
we can encode the voting record as a column vector. For example, consider the
Supreme Court ruling on Obergefell v. Hodges, docket number 14-556. This case
concerned same-sex marriage as a fundamental right guaranteed by the Fourteenth
Amendment of the US Constitution. This case was decided on June 26, 2015 in
favor of same sex marriage. We let ≠1 stand for a vote against same sex marriage
as a right protected by the constitution and 1 represent a vote that supports same
sex marriage. With this model in mind, we encode the voting record of the court
Justices as follows:

Justice Vote on
(last name) 14-566

Alito -1
Breyer 1
Gingsburg 1
Kagan 1
Kennedy 1
Roberts -1
Scalia -1
Sotomayor 1
Thomas -1

Just as in the actual case, our model indicates that five court Justices ruled in favor
of the argument that same-sex marriage is a fundamental right protected by the US
Constitution while four Justices were in opposition.

47 c Jeffrey A. Anderson

Definition 2.2: The ith coefficient of a column vector

Let x œ Rn◊1 be a column vector, given by


S T
x1
W x2 X
W X
x = W . X.
U .. V
xn

The real number xi œ R in the ith row of x is called the ith coefficient of
vector x for i œ {1, 2, ..., n}. We refer to the ith coefficient of x using the
following notation:

i. Subscript notation: xi
ii. Entry operator notation: entryi (x) returns the ith entry of x œ Rn .
iii. Matrix index notation: x(i, 1) refers to the entry in the ith row and
1st column

In this textbook, we use subscript notation and the matrix index notation in-
terchangeably. Subscript notation is compact and straight forward. On the other
hand, we use matrix index notation exclusively to code in MATLAB.

Definition 2.3: Rn

Rn◊1 is the set of n ◊ 1 real-valued column vectors. Because we often


work with column vectors, we use the short hand notation Rn = Rn◊1 .
In set builder notation, we have
YS T Z
_
_ x1 _
_
_W X
] _
^
x
W X 2
R = W . X : xi œ R for all i œ {1, 2, ..., n} .
n
_
_ U .. V _
_
_
[ _
\
xn

c Jeffrey A. Anderson
• 48
EXAMPLE 2.1.4
Suppose we want to graph f (x) = cos(x) on the interval x œ [0, 2fi]. Most graphing
software will produce a graph that approximates continuous behavior. These “con-
tinuous plots,” as seen in the figure to the right, give a visual representation of the
behavior of the entire function on the chosen interval.
However, it is impossible to plot every point on the graph of cos(x) over the
interval [0, 2fi] using any computer with finite memory (which is every computer on
earth). Instead, graphing programs sample the function f (x) at a sufficient number
of data points in the chosen domain and then interpolate these sampled points to
produce a graphic for the end user. Let’s explore how to sample a function at n
points and graph the resulting data.
We divide our given interval into n+1 equally-spaced, discrete points. First, let’s
set x1 = 0 to capture the left endpoint of our interval. We then find a uniform step
2fi ≠ 0
size h = and create each new sample point xi+1 = xi +h where i = 2, 3, ..., n.
n
Solving this recursion in terms of x1 , we see xi+1 = x1 + i · h = i · h.
Next, we sample the function f (x) at each point xi and set yi = f (xi ) = cos(xi )
for i = 1, 2, ..., n + 1. With this model, we’ve created an input vector x œ Rn+1 and
output vector yRn+1 given by
S T S T S T
x1 y1 cos(x1 )
W x2 X W y2 X W cos(x2 ) X
W X W X W X
x = W . X, y=W . X=W .. X
U .. V U .. V U . V
xn+1 yn+1 cos(xn+1 )

We call this process a discretization of the function f (x) on our chosen interval.
We graph the relationship between the vector x and y with each point on our graph
defined by (xi , yi ). In the graph below, we discretized cos(x) with n = 20 corre-
2fi ≠ 0
sponding to a step size of h = .
20

The finer we make our discretization (the higher the value of n), the more our
graph of sampled points looks like the graph of the continuous function cos(x) on
our given interval.

49 c Jeffrey A. Anderson

Through the end of single-variable calculus, we study properties of continuous
functions. Graphs of these functions can be extremely useful for visualizing func-
tion behavior and studying the properties of families of functions. However, it is
impossible to plot all points of a continuous functions exactly. Instead, most graph-
ing processes use some kind of sampling technique to create an approximate plot of
the corresponding output. This is our first vivid demonstration of a major theme
in applied linear algebra: Continuity is great in theory but in practice we often
discretize in order to use the power of computers to solve real-world problems.

EXAMPLE 2.1.5
Let’s create an experiment to study the relationship between elongation of a spring
and the internal force stored in that spring. To conduct this experiment, we need
an extension single spring, an apparatus from which to hang the spring, and a set
of masses including two 200g masses. To measure our required data, we need access
to a metric ruler (one meter or longer) and a digital scale that measures from 0 to
500 grams in increments of 0.01g.
Let’s begin our set up with our extension spring which should have two movable
ends connected by a helix. We position our spring vertically so that one of the
movable ends is directly above the another. The spring should be perpendicular to
the surface of the ground below our feet. We now fix the top end of our spring to
our apparatus that holds that top end completely still. We let the bottom end of
our spring hang freely.
After we’ve properly set up our spring, we wait until the free end stops all
movement. We say that our spring is in an equilibrium position when the free
end has a zero velocity and experiences no acceleration. We now attach various
masses (measured in kilograms) to the bottom end of our spring and measure the
distance from the free end of the spring to the ground below (measured in cm). To
store this data, we use two column vectors.
First, we create a 3 ◊ 1 column vector mideal , which stores the ideal masses
we use in this experiment. The first coefficient m1 of vector mideal is set to 0,
representing the case where we hang no mass on the movable end of our spring. We
now add multiples of 0.2 kg masses to the free end of the spring.
Under this assumption, our ideal mass vector mideal has coefficients that satisfy
the recursion m1 = 0 and mi+1 = mi + 0.2 where i œ {1, 2}. In this case, we’ve
limited the range of our indexing variable i because we decided to collect a total of
3 data points. By solving this recursion in terms of m1 , we see mi+1 = 0 + 0.2 · i
for all i. This set up leads to the vector mideal given below.
Let’s use our scale to compare our ideal set up to the actual masses used in our
experiment. We create a second vector mobs which stores the observed masses used
in the experiment as follows:
S T S T
0.00 0.00000
mideal = U0.20V , mobs = U0.20010V .
0.40 0.40031
We notice that the ideal data vector mideal does not exactly match our observed
mass vector mobs . This is due to errors in the manufacturing process of our masses
and perhaps measurement errors from our digital scale. Such errors are an impor-
tant part of applied mathematical analysis and should not be ignored.
Next, let’s record the positions of the movable end of the spring in a position
vector xobs œ R3◊1 . The first coefficient of vector xobs is the distance from the
free end of the spring at equilibrium with no mass attached to the bottom of the
measuring apparatus. Notice that this entry x1 corresponds the the coefficient

c Jeffrey A. Anderson
• 50
m1 = 0 of mobs . To find all other coefficients xi with i = 2, 3, we attached our mass
mi to the free end of the spring and wait for the spring to reach an equilibrium
position. We then measure the distance from the bottom of the spring to the ground
(in m). We enter that measurement into the proper coefficient of xobs . The row
index of the collected position data should be identical to the row index of the entry
in mobs that stores the numerical value of the mass being used.
For the experiment, we have the following position vector:
S T
1.040
xobs = U0.932V
0.820

where these measurements are written in meters. Below is a graph of a sample data
set collected by the author.

You can access this data set on your course webpage. Each point on the graph
is given by (mi , xi ). When plotting this graph, we see something very interesting.
There seems to be a linear relationship between the mass hung on the free end and
the distance of the free end to the ground.

51 c Jeffrey A. Anderson

EXAMPLE 2.1.6
In this example, we collect empirical data on Ohm’s law. This is one of key laws
of physics that describes the behavior of electric resistors. Ohm’s law states that
there is a linear relationship between the current flowing through a resistor and
the voltage drop across that resistor in an electrical circuit. The associated ideal
mathematical model for Ohm’s law is given by

V = IR. (2.1)

In this equation, V is the voltage drop across the resistor, measured in volts (V).
The variable I is the current flowing through the resistor, measured in amperes
(A). For a single resistor, the positive constant term R is called the resistance and
is measured in ohms ( ). In ideal circuits with non-variable resistors, resistance
measurements are independent of current and voltage measurements.
To conduct this experiment, we need a solderless bread board, connecting wires,
a resistor, a multimeter and a power source that provides various voltage levels. We
begin with our bread board. Each of the points on our bread board is represented
by a coordinate system based on row and column labels. We see in the diagram to
the left that our bread board’s rows are identified by capital letters while columns
are indicated by numbers. Moreover, columns are organized in groups of five, each
group being separated by a slot. When considering a single row, the five points
between two slots are all electrically connected and allow current to flow from any
point in that strip. At the top of our board is our power rail which provides voltage
ports with varying voltage levels. The 30 connection points on the bottom go
to ground, the negative side of our battery input. Ground is also known as the
electrical reference node and is assumed to have a voltage value of 0 volts.
To begin our data collection process, we take a single red wire and insert the
wire from any of our voltage input to point D18. This will provide a positive voltage
potential to all points in row D from point D16 to D20. We input one lead of our
resistor into point D16 and input the other lead into point M16. Finally, we take a
second white wire and connect point M18 to ground to create a closed circuit.

c Jeffrey A. Anderson
• 52
We can visualize our circuit using an ideal circuit diagram as illustrated below.
More about how to create this ideal circuit model can be found in Appendix A: A
Primer on Circuit Theory.

u1

+
+
V ≠ ir vr R

ug •

Now let’s create a 4◊1 voltage vector videal that stores seven ideal voltage levels
to be applied to the open end of our red wire. The first coefficient v1 of vector videal
will have a value of 0 volts, representing the case where we have not turned on our
power supply. To create each subsequent entry, we apply multiples of 3V to the
free end of the wire. Under this assumption, entries of the vector videal satisfy the
recursion

v1 = 0, vk+1 = vk + 3.0

where k œ {1, 2, 3}.


While these ideal voltage levels are useful in designing our experiment, the actual
experimental conditions are likely not perfect. To address experimental error, we
use our multimeter to measure the actual voltages applied in our experimental set
up. We store the observed voltage data in a 4 ◊ 1 vector vobs . We then compare
the ideal voltages to the observed voltage values as follows:
S T S T
0.00 0.00
W3.00X W3.06X
videal = W X
U6.00V , vobs = W X
U6.13V .
9.00 9.18

Discrepancies between the ideal set up and the observed values are due to the
variance of voltage output available in our voltage sources (series Duracell 1.5 V
batteries) and measurement error from the multimeter.
Next, we create a corresponding 4 ◊ 1 output vector iobs , which stores the ob-
served current running through the resistor at any point in time. The first coefficient
i1 of vector i is the current through the resistor when no voltage is applied across
the resistor. Notice that this entry corresponds the the coefficient v1 = 0 of our
input vector v. For all other coefficients ik with k = 2, 3, 4, we apply voltage vk
to the free end of the first wire and wait for the circuit to reach an equilibrium
position. We then measure the current running through the resistor (in mA) and
enter that number into the proper coefficient of i. Notice that the row index of the
collected current should be identical to the row index of the entry in v that stores
the numerical value of the voltage being applied. After conducting this experiment,

53 c Jeffrey A. Anderson

we see
S T
0.00
W2.81X
iobs =W
U6.38V
X

9.57

Below is a graph of a sample data set collected by the author for the specific
resistor pictured in the text above.

You can access this data set on our course webpage. Notice that with this sample
data set, we can create an input-output graph. Each point on the graph is given
by (vk , ik ). When plotting this graph, we see something very interesting. Again we
see the resemblance of a linear relationship between the voltage across the resistor
and the current through the resistor.
One last important note: in this example we do not use our standard row index
variable i to represent row indices of each vector. This is is due to the fact that
we were using the letter i to represent the coefficient of the current vectors. We
also Ô
avoid using the index variable j since many electrical engineers state that
j = ≠1. Instead, we use the row index variable k to avoid any confusion. This
is an important consideration. When working on applications of linear algebra, we
want to be considerate of the professionals working in the scientific field and choose
notation that maximizes understanding and minimizes confusion.

c Jeffrey A. Anderson
• 54
Compare and contrast the example involving the mass spring system and the
example involving the resistor. As we will see throughout this text, there are strong
analogies between the behavior of mass-spring systems and linear circuits. We will
return to this point soon.
Notice also that the last two examples demonstrate reverse processes of Exam-
ple 2.1.4. Specifically, in Example 2.1.4 we begin with a description of a continuous
function y = cos(x) and use this function description to produce discrete data
points that lie on the graph. This example illustrates the process of transforming
description of a continuous function into two column vectors. This process can be
very helpful for manipulating data on a computer, especially when we begin with
knowledge about the behavior of our function.
The reverse process can also be very useful. In particular, it is common to start
with collected data and work to produce a continuous function that describes the
behavior captured in the data. In Example 2.1.5 and in Example 2.1.6, we do just
this. We begin by setting up an experiment and collecting quantitative data. Then,
we try to find a mathematical pattern for the behavior of our collected data. In both
the Hooke’s Law Experiment and the Ohm’s Law experiment, we see that our data
seems to fit the behavior of the function family of lines. This is where all the work
we’ve done in Calculus pays off. Because we are familiar with families of functions
and their properties, we can attempt to guess the type of behavior displayed in our
experiment based on our knowledge of the graphs of our data.

55 c Jeffrey A. Anderson

EXAMPLE 2.1.7
In Chapter 5 of this text, we will model coupled mass-spring chains using linear
systems of equations. For now, we will construct a vector model for a coupled
mass-spring chain to encode the positions of our masses at a given point in time.
Consider the following diagram representing a coupled mass-spring chain with three
springs and two masses.

Spring Mass Chain at equilibrium


with NO external force (t = 0 sec)

x+
k1

x1 (t) m1

k2

x2 (t) m2

k3

In the diagram above, let mi be a given mass (measured in kg) for i = 1, 2. In


the example we discussed in class, we saw that
5 6 5 6
m1 0.20018
m= =
m2 0.10009

Let kj be the spring constant corresponding to the ith spring, where the first spring
is the one on top, the second is right under the first and so on for j = 1, 2, 3. In
this case, kj is measured in N/m. For the in-class example, we used the excel
data that Jeff collected and the fact that all three springs were made by the same
manufacturer to conclude that
S T S T
k1 17.57
Uk2 V = U17.57V
k3 17.57

c Jeffrey A. Anderson
• 56
We will encode the positions of individual masses in a vector-valued function x(t)
where

x : R æ R2

We will define each component of the vector valued output separately as follows

x1 (t) = the height of mass m1 above ground in meters at time t seconds ,


x2 (t) = the height of mass m2 above ground in meters at time t seconds .

We measure distance in the positive direction starting from the zero position on
our measuring stick (which is toward the ground) and measuring in the upward
direction.
We also assume that at t Æ 0, the mass spring system is in a stable equilib-
rium (no movement) with no external forces acting on the system. Thus xi (0) is
represents the initial position (measured in meters) of the ith mass at t = 0 seconds.
We can encode the position of the masses at time t = 0 in our mass-spring chain
in vector form. Let x(0) be the vector encoding the position (measured in mm) of
the 2 masses at time t = 0 seconds. We can physically measure the equilibrium
position to find
5 6 5 6
x1 (0) 0.846
x(0) = =
x2 (0) 0.434

We then introduce the force of gravity on the system by flipping our apparatus 90¶
so that the white board is perpendicular to the ground. We take measurements of
the new positions of our masses when the system settles into equilibrium. Assuming
that t = T is the time after which there is no motion in the shifted system, we encode
our new positions in vector form as follows:
5 6 5 6
x (T ) 0.739
x(T ) = 1 =
x2 (T ) 0.348

In the next section, we will see how to use operations to calculated the displace-
ment of the masses and the elongation of the individual springs. For now, we have
established a useful vector model of a multi-dimensional mechanical system. Notice
that in this case the vector model stores positions of masses 1 and 2 at different
times in the experiment.

57 c Jeffrey A. Anderson

EXAMPLE 2.1.8
In this example, we study the individual node voltages of a circuit with a single
voltage source and three resistors connected in series. To conduct this experiment,
we will need a solderless bread board, connecting wires, three 1000 resistors, a
multimeter and a 9V voltage source. We now take a single blue wire and insert
the wire from any of our voltage input to point D30. This will provide a positive
voltage potential to all points in row D from point D26 to D30. We input one lead
of our first resistor R1 into point D29 and input the other lead to point D25. Our
second resistor R2 should connect points D24 to M24 while the third resistor R3
connects M23 to ground point G23. We now have an closed circuit.

We can visualize our circuit using an ideal circuit diagram as illustrated below:
R1
u2
• •u 1

R2


+
u3 V ≠

R3

ug•
To run this experiment, we will measure four node voltage levels, corresponding
to the voltage potentials at each of the ground nodes in this circuit. A node refers to

c Jeffrey A. Anderson
• 58
any point in an electrical circuit where two or more circuit elements are connected.
Each node on a circuit is assumed to have one unique voltage level. We will measure
the input voltage levels using our multimeter and store the data in a 4 ◊ 1 vector u.
In order to accurately identify our modeling scheme, we introduce some notation
to describe our ideal circuit representation by specifically labeling each node of the
circuit.
The positive lead of our 9V voltage source is connected to node u1 while the
negative lead is connected to the ground node ug . Our first resistor R1 connects
node u1 to node 2, labeled u2 . Resistor R2 connects node u2 to node u3 . Finally
resistor R3 connects node u3 to the ground node ug .
We now apply our 9V voltage source. To fill in the first coefficient u1 of vector
u, we enter the measured voltage potential at node 1. Similarly, u2 is the voltage
potential measured at node 2 and u3 is the voltage potential measured at node 3.
Finally, ug stores the reference voltage at the ground node. We can then store this
data in vector
S T
9.15
W6.10X
u=W
U3.05V
X

0.00
We will be using this vector modeling scheme again in our study of matrix-vector
multiplication to calculate the voltage drop across each element in our circuit. We
will also use this model to study both Kirchoff’s voltage law and Kirchoff’s current
law in our discussion of the inner product between vectors.

Look back on our previous examples involving masses, springs, resistors and
voltage sources. In both Examples 2.1.5 and 2.1.6, we used vector models to capture
the behavior of individual components of a mechanical or electrical system. In
particular, by sampling the response of a single component to various loads, we
began to detect patterns in our numerical data. This type of observation based
inquiry lies at the heart of the scientific method. As we will see, this very powerful
modeling scheme lies at the heart of the least squares problem and allows us to
describe problems that exist in the physical world by very well chosen mathematical
functions.
Compare and contrast the vector models used to create function descriptions
for individual components with the vector models in Examples 2.1.7 and 2.1.8. In
the latter examples, we store data about the behavior of an entire mechanical or
electrical systems in vector form. These models will enable us to describe the state
of each component of a system at various points in time. As we will see, we can
study the beginning and end behavior of electrical or mechanical systems using
both matrix-vector multiplication and linear systems problems. We will study the
dynamics of such systems at any time t in our discussion of eigenvalue problems.
Let’s look at a completely different use of vector modeling scheme that enables
storage of mass quantities of information in a very efficient form.

EXAMPLE 2.1.9
When we search the world wide web, how does google produce a list of relevant
resources that match our input query? This is one of many questions from the
field of information retrieval which focuses on representing, storing, organizing and
accessing informational resources for future reference.
Vectors can be a very powerful tool in web searching. One popular model for
encoding a text-based web resource is known as a term-document vector. This

59 c Jeffrey A. Anderson

is a column vector used to encode the textual information included in a particular
document based on the key words, called “terms,” that appear in that document. In
this example, we create a document library containing a single information resource:
a one-sentence “document.” We demonstrate how to encode this document as a
term-document vector by focusing only on a select few words as “terms.” Each
term is in bold typeface in the description below. Any word that is not in bold
typeface is ignored in this model.
With this in mind, consider the following document:

Document 1: Applied linear algebra is a subfield of mathematics focused


on encoding multidimensional data, manipulating matrices, and
solving linear-systems problems,least-squares problems,
and eigenvalue problems.
Notice that there are a total of 6 unique terms to be encoded from this document
in our library. Because we will be studying this example in more detail later in this
text, we choose to create a 10 ◊ 1 vector with 4 other terms not included in this
document.
The rows of this column vector represent all terms from our entire library (in
alphabetical order) and the coefficients of each vector represent the frequency with
which each term appears in one particular document. Below is term-document
vector associated with our library:

Term Doc 1
algebra 1
applied 1
computer 0
eigenvalue 1
information 0
least squares 1
linear 1
mathematics 1
matrix 0
regression 0

Notice that since document 1 includes the word “applied” one time, there is a 1 in
the entry of the vector associated with this term. On the other hand, document 1
does not include the word regression, and thus the corresponding vector has a 0 in
that entry.
Using this model, each document in our collection is encoded as a column vector
in R10 . As we will see in Chapter 3, we can organize these documents into a term-
document matrix.As we will see, this model encodes information in such a way that
we can use matrix-vector multiplication to determine which of the documents in
our library are relevant to our query.

c Jeffrey A. Anderson
• 60
Definition 2.4: Row Vector

Let n œ N be a positive integer. The vector x œ R1◊n given by


# $
x = x1 x2 · · · xn

is a row vector with n entries, xk œ R for k œ {1, 2, ..., n}, organized


in 1 row and n columns. When referring to a row vector x œ R1◊n , the
superscript on R represent the dimensions 1 ◊ n of the given vector. Just
like when referring to column vectors, the first argument 1 indicates the
number of rows and while the second argument n indicated the number of
columns. Thus R1◊n is the set of vectors that have 1 row and n columns.
It is less common to refer specifically to row vectors. Thus, it will
always be necessary to write both dimensions when specifically referring
to a row vector.

Notice that both column vectors and row vectors are specially organized arrays
of real numbers. Traditional calculus education teach vectors as ordered n-tuples
of real numbers each entry of which is delimited by a comma. However, in our
definition of column and row vectors, each entry of are vectors are written using a
very specific format.

Definition 2.5: Equal Column Vectors

Let x œ Rn and y œ Rm be column vectors These vectors are equal if


and only if the vectors have the same number of rows (i.e. n = m) and
xi = yi for all i œ {1, 2, ..., n}. In other words, when we look at the vector
equality x = y, this holds true if and only if
S T S T
x1 y1
W x2 X W y2 X
W X W X
W .. X = W .. X ,
U . V U.V
xn yn

where the dimensions of the vectors are identical and the individual coef-
ficients are identical.

61 c Jeffrey A. Anderson

Lesson 3: Vectors and Modeling- Suggested Problems:
For all the problems below, be sure to explicitly state the dimensions of the
vectors you use for each model.

1. Draw a series of diagrams of a spring-mass system used to verify Hooke’s Law


experimentally. Explain the entire experiment and how the position measure-
ments relate to your diagram. Remember to explain that different masses re-
late to different observed displacements. Show this by drawing clear diagrams
representing a few different cases, as discussed in class. Also, demonstrate how
to capture this data in a vector model.
2. Draw a diagram of the ideal circuit used to conduct the Ohm’s Law experi-
ment. Explain the entire experiment and how the voltage and current data
measurements relate to your diagram. Be sure to discuss the significance of
voltages and currents in terms of the circuit. Show how to capture this data
in a vector model.
3. Draw the diagram for the spring-mass chain with 3 springs and 2 masses
from memory. Explain the entire experiment and how the position measure-
ments relate to your diagram. Be sure to mention the significance of the
two measurements in terms of applied forces. Which position data represents
the absence of force and which represents the presence of an applied force?
Explain your choice of time in teach case.
4. Set up a model for a spring-mass chain with 4 springs and 3 masses. Explain
the corresponding vector model to capture the equilibrium positions.
5. Draw a diagram of the ideal circuit corresponding to the series resistor exper-
iment we talked about in class. Explain the entire experiment in detail. Show
how to create vectors that store the voltage potential data, the voltage change
across each resistor and the current through each resistor. Discuss how this
is related to Ohm’s Law.
6. Discretize the graph of y = sin(x) on the interval [0, 2fi]. Use n = 4, 8, 16 to
produce input and output vectors of various sizes.

c Jeffrey A. Anderson
• 62

You might also like