Skip to document

Linear algebra cheat sheet

Course

Linear Algebra and Applications (MATH 10)

4 Documents
Students shared 4 documents in this course
Academic year: 2020/2021
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
Pasadena City College

Comments

Please sign in or register to post comments.

Preview text

Linear algebra explained in four pages

Excerpt from the NO BULLSHIT GUIDE TO LINEAR ALGEBRAby Ivan Savov

Abstract—This document will review the fundamental ideas of linear algebra. We will learn about matrices, matrix operations, linear transformations and discuss both the theoretical and computational aspects of linear algebra. The tools of linear algebra open the gateway to the study of more advanced mathematics. A lot ofknowledge buzzawaits you if you choose to follow the path ofunderstanding, instead of trying to memorize a bunch of formulas.

I. INTRODUCTION Linear algebra is the math of vectors and matrices. Letnbe a positive integer and letRdenote the set of real numbers, thenRnis the set of all n-tuples of real numbers. A vector~v∈Rnis ann-tuple of real numbers. The notation “∈S” is read “element ofS.” For example, consider a vector that has three components:

~v= (v 1 , v 2 , v 3 )∈ (R,R,R)≡R 3.

A matrixA∈Rm×nis a rectangular array of real numbers withmrows andncolumns. For example, a 3 × 2 matrix looks like this:

A=

2

4

a 11 a 12 a 21 a 22 a 31 a 32

3

5 ∈

2

4

R R

R R

R R

3

5 ≡R 3 × 2.

The purpose of this document is to introduce you to the mathematical operations that we can perform on vectors and matrices and to give you a feel of the power of linear algebra. Many problems in science, business, and technology can be described in terms of vectors and matrices so it is important that you understand how to work with these.

Prerequisites

The only prerequisite for this tutorial is a basic understanding of high school math concepts 1 like numbers, variables, equations, and the fundamental arithmetic operations on real numbers: addition (denoted+), subtraction (denoted−), multiplication (denoted implicitly), and division (fractions). You should also be familiar withfunctionsthat take real numbers as inputs and give real numbers as outputs,f :R →R. Recall that, by definition, theinverse functionf− 1 undoesthe effect off. If you are givenf(x)and you want to findx, you can use the inverse function as follows:f− 1 (f(x)) =x. For example, the functionf(x) = ln(x)has the inversef− 1 (x) =ex, and the inverse ofg(x) =

xisg− 1 (x) =x 2.

II. DEFINITIONS

A. Vector operations

We now define the math operations for vectors. The operations we can perform on vectorsu= (u 1 , u 2 , u 3 )andv= (v 1 , v 2 , v 3 )are: addition, subtraction, scaling, norm (length), dot product, and cross product:

u+v= (u 1 +v 1 , u 2 +v 2 , u 3 +v 3 ) u−v= (u 1 −v 1 , u 2 −v 2 , u 3 −v 3 ) α~u= (αu 1 , αu 2 , αu 3 )

||~u||=

q u 21 +u 22 +u 23 v=u 1 v 1 +u 2 v 2 +u 3 v 3 v=(u 2 v 3 −u 3 v 2 , u 3 v 1 −u 1 v 3 , u 1 v 2 −u 2 v 1 )

The dot product and the cross product of two vectors can also be described in terms of the angleθbetween the two vectors. The formula for the dot product of the vectors isv=‖u‖‖v‖cosθ. We say two vectorsuand ~vareorthogonalif the angle between them is 90 ◦. The dot product of orthogonal vectors is zero:v=‖u‖‖v‖cos(90◦) = 0. Thenormof the cross product is given by‖v‖=‖u‖‖v‖sinθ. The cross product is not commutative:v 6 =u, in factv=−v×~u.

1 A good textbook to (re)learn high school math isminireference

B. Matrix operations We denote byAthe matrix as a whole and refer to its entries asaij. The mathematical operations defined for matrices are the following: - addition (denoted+)

C=A+B ⇔ cij=aij+bij.

  • subtraction (the inverse of addition)
  • matrix product. The product of matricesA∈Rm×nandB∈Rn×ℓ is another matrixC∈Rm×ℓgiven by the formula

C=AB ⇔ cij=

Xn

k=

aikbkj, 2 4

a 11 a 12 a 21 a 22 a 31 a 32

3

5

»

b 11 b 12 b 21 b 22

=

2

4

a 11 b 11 +a 12 b 21 a 11 b 12 +a 12 b 22 a 21 b 11 +a 22 b 21 a 21 b 12 +a 22 b 22 a 31 b 11 +a 32 b 21 a 31 b 12 +a 32 b 22

3

5

  • matrix inverse (denotedA− 1 )
  • matrix transpose (denotedT): » α 1 α 2 α 3 β 1 β 2 β 3

– T

=

2

4

α 1 β 1 α 2 β 2 α 3 β 3

3

5.

  • matrix trace: Tr[A]≡

Pn i=1aii

  • determinant (denoted det(A)or|A|) Note that the matrix product is not a commutative operation:AB 6 =BA.

C. Matrix-vector product The matrix-vector product is an important special case of the matrix- matrix product. The product of a 3 × 2 matrixAand the 2 × 1 column vectorxresults in a 3 × 1 vectorygiven by:

y=Ax ⇔

2

4

y 1 y 2 y 3

3

5 =

2

4

a 11 a 12 a 21 a 22 a 31 a 32

3

5

»

x 1 x 2

=

2

4

a 11 x 1 +a 12 x 2 a 21 x 1 +a 22 x 2 a 31 x 1 +a 32 x 2

3

5

=x 1

2

4

a 11 a 21 a 31

3

5 +x 2

2

4

a 12 a 22 a 32

3

5 (C)

=

2

4

(a 11 , a 12 )·x (a 21 , a 22 )·x (a 31 , a 32 )·~x

3

5. (R)

There are two 2 fundamentally different yet equivalent ways to interpret the matrix-vector product. In the column picture,(C), the multiplication of the matrixAby the vectorxproduces alinear combination of the columns of the matrix:y=Ax=x 1 A[:,1]+x 2 A[:,2], whereA[:,1]andA[:,2]are the first and second columns of the matrixA. In the row picture,(R), multiplication of the matrixAby the vectorx produces a column vector with coefficients equal to thedot products of rows of the matrixwith the vector~x.

D. Linear transformations The matrix-vector product is used to define the notion of alinear transformation, which is one of the key notions in the study of linear algebra. Multiplication by a matrixA∈ Rm×ncan be thought of as computing alinear transformationTAthat takesn-vectors as inputs and producesm-vectors as outputs:

TA:Rn→Rm. 2 For more info see the video of Prof. Strang’s MIT lecture:bit/10vmKcL

1

2

Instead of writingy=TA(x)for the linear transformationTAapplied to the vectorx, we simply writey=Ax. Applying the linear transformation TAto the vectorxcorresponds to the product of the matrixAand the column vector~x. We sayTAisrepresented bythe matrixA. You can think of linear transformations as “vector functions” and describe their properties in analogy with the regular functions you are familiar with:

functionf:R→R ⇔ linear transformationTA:Rn→Rm inputx∈R ⇔ inputx∈Rn outputf(x)⇔ outputTA(x) =Ax∈Rm g◦f=g(f(x)) ⇔ TB(TA(x)) =BA~x function inversef− 1 ⇔ matrix inverseA− 1 zeros off ⇔ N(A)≡null space ofA range off ⇔ C(A)≡column space ofA=range ofTA

Note that the combined effect of applying the transformationTAfollowed byTBon the input vectorxis equivalent to the matrix productBAx.

E. Fundamental vector spaces

Avector spaceconsists of a set of vectors and all linear combinations of these vectors. For example the vector spaceS=span{v 1 , ~v 2 }consists of all vectors of the formv=αv 1 +βv 2 , whereαandβare real numbers. We now define three fundamental vector spaces associated with a matrixA. Thecolumn spaceof a matrixAis the set of vectors that can be produced as linear combinations of the columns of the matrixA:

C(A)≡{y∈Rm|y=Axfor somex∈Rn}.

The column space is therangeof the linear transformationTA(the set of possible outputs). You can convince yourself of this fact by reviewing the definition of the matrix-vector product in the column picture(C). The vectorAxcontainsx 1 times the 1stcolumn ofA,x 2 times the 2ndcolumn ofA, etc. Varying over all possible inputsx, we obtain all possible linear combinations of the columns ofA, hence the name “column space.” Thenull spaceN(A)of a matrixA∈Rm×nconsists of all the vectors that the matrixAsends to the zero vector:

N(A)≡

̆

x∈Rn|Ax=~ 0

̄

.

The vectors in the null space areorthogonalto all the rows of the matrix. We can see this from the row picture(R): the output vectors is~ 0 if and only if the input vectorxis orthogonal to all the rows ofA. Therow spaceof a matrixA, denotedR(A), is the set of linear combinations of the rows ofA. The row spaceR(A)is the orthogonal complement of the null spaceN(A). This means that for all vectors ~v∈ R(A)and all vectorsw∈ N(A), we havew= 0. Together, the null space and the row space form the domain of the transformationTA, Rn=N(A)⊕R(A), where⊕stands fororthogonal direct sum.

F. Matrix inverse

By definition, the inverse matrixA− 1 undoesthe effects of the matrixA. The cumulative effect of applyingA− 1 afterAis the identity matrix✶:

A− 1 A=✶≡

2

4

1 0

.. . 0 1

3

5.

The identity matrix (ones on the diagonal and zeros everywhere else) corresponds to the identity transformation:T✶(x) =✶x=x, for allx. The matrix inverse is useful for solving matrix equations. Whenever we want to get rid of the matrixAin some matrix equation, we can “hit”A with its inverseA− 1 to make it disappear. For example, to solve for the matrixXin the equationXA=B, multiply both sides of the equation byA− 1 from the right:X=BA− 1. To solve forXinABCXD=E, multiply both sides of the equation byD− 1 on the right and byA− 1 ,B− 1 andC− 1 (in that order) from the left:X=C− 1 B− 1 A− 1 ED− 1.

III. COMPUTATIONAL LINEAR ALGEBRA

Okay, I hear what you are saying “Dude, enough with the theory talk, let’s see some calculations.” In this section we’ll look at one of the fundamental algorithms of linear algebra called Gauss–Jordan elimination.

A. Solving systems of equations Suppose we’re asked to solve the following system of equations: 1 x 1 + 2x 2 = 5, 3 x 1 + 9x 2 = 21.

(1)

Without a knowledge of linear algebra, we could use substitution, elimina- tion, or subtraction to find the values of the two unknownsx 1 andx 2. Gauss–Jordan elimination is a systematic procedure for solving systems of equations based the followingrow operations: α) Adding a multiple of one row to another row β) Swapping two rows γ) Multiplying a row by a constant These row operations allow us to simplify the system of equations without changing their solution. To illustrate the Gauss–Jordan elimination procedure, we’ll now show the sequence of row operations required to solve the system of linear equations described above. We start by constructing anaugmented matrixas follows: » 1 2 5 3 9 21

.

The first column in the augmented matrix corresponds to the coefficients of the variablex 1 , the second column corresponds to the coefficients ofx 2 , and the third column contains the constants from the right-hand side. The Gauss-Jordan elimination procedure consists of two phases. During the first phase, we proceed left-to-right by choosing a row with a leading one in the leftmost column (called apivot) and systematically subtracting that row from all rows below it to get zeros below in the entire column. In the second phase, we start with the rightmost pivot and use it to eliminate all the numbers above it in the same column. Let’s see this in action. 1) The first step is to use the pivot in the first column to eliminate the variablex 1 in the second row. We do this by subtracting three times the first row from the second row, denotedR 2 ←R 2 − 3 R 1 , » 1 2 5 0 3 6

.

  1. Next, we create a pivot in the second row usingR 2 ← 13 R 2 : » 1 2 5 0 1 2

.

  1. We now start the backward phase and eliminate the second variable from the first row. We do this by subtracting two times the second row from the first rowR 1 ←R 1 − 2 R 2 : » 1 0 1 0 1 2

.

The matrix is now inreduced row echelon form(RREF), which is its “simplest” form it could be in. The solutions are:x 1 = 1,x 2 = 2.

B. Systems of equations as matrix equations We will now discuss another approach for solving the system of equations. Using the definition of the matrix-vector product, we can express this system of equations (1) as a matrix equation: » 1 2 3 9

– »

x 1 x 2

=

»

5

21

.

This matrix equation had the formAx=b, whereAis a 2 × 2 matrix,x is the vector of unknowns, andbis a vector of constants. We can solve for ~xby multiplying both sides of the equation by the matrix inverseA− 1 :

A− 1 Ax=✶x=

»

x 1 x 2

=A− 1 ~b=

»

3 − 23

− 113

– »

5

21

=

»

1

2

.

But how did we know what the inverse matrixA− 1 is?

4

C. Dimension and bases for vector spaces

Thedimensionof a vector space is defined as the number of vectors in a basis for that vector space. Consider the following vector space S=span{(1, 0 ,0),(0, 1 ,0),(1, 1 ,0)}. Seeing that the space is described by three vectors, we might think thatSis 3 -dimensional. This is not the case, however, since the three vectors are not linearly independent so they don’t form a basis forS. Two vectors are sufficient to describe any vector inS; we can writeS=span{(1, 0 ,0),(0, 1 ,0)}, and we see these two vectors are linearly independent so they form a basis anddim(S) = 2. There is a general procedure for finding a basis for a vector space. Suppose you are given a description of a vector space in terms ofmvectors V=span{v 1 , ~v 2 ,... , ~vm}and you are asked to find a basis forVand the dimension ofV. To find a basis forV, you must find a set of linearly independent vectors that spanV. We can use the Gauss–Jordan elimination procedure to accomplish this task. Write the vectorsvias the rows of a matrixM. The vector spaceVcorresponds to the row space of the matrix M. Next, use row operations to find the reduced row echelon form (RREF) of the matrixM. Since row operations do not change the row space of the matrix, the row space of reduced row echelon form of the matrixMis the same as the row space of the original set of vectors. The nonzero rows in the RREF of the matrix form a basis for vector spaceVand the numbers of nonzero rows is the dimension ofV.

D. Row space, columns space, and rank of a matrix

Recall the fundamental vector spaces for matrices that we defined in Section II-E: the column spaceC(A), the null spaceN(A), and the row spaceR(A). A standard linear algebra exam question is to give you a certain matrixAand ask you to find the dimension and a basis for each of its fundamental spaces. In the previous section we described a procedure based on Gauss–Jordan elimination which can be used “distill” a set of linearly independent vectors which form a basis for the row spaceR(A). We will now illustrate this procedure with an example, and also show how to use the RREF of the matrixAto find bases forC(A)andN(A). Consider the following matrix and its reduced row echelon form:

A=

2

4

1 3 3 3

2 6 7 6

3 9 9 10

3

5 rref(A) =

2

4

1 3 0 0

0 0 1 0

0 0 0 1

3

5.

The reduced row echelon form of the matrixAcontains three pivots. The locations of the pivots will play an important role in the following steps. The vectors{(1, 3 , 0 ,0),(0, 0 , 1 ,0),(0, 0 , 0 ,1)}form a basis forR(A). To find a basis for the column spaceC(A)of the matrixAwe need to find which of the columns ofAare linearly independent. We can do this by identifying the columns which contain the leading ones in rref(A). The corresponding columns in the original matrix form a basis for the column space ofA. Looking at rref(A)we see the first, third, and fourth columns of the matrix are linearly independent so the vectors {(1, 2 ,3)T,(3, 7 ,9)T,(3, 6 ,10)T}form a basis forC(A). Now let’s find a basis for the null space,N(A)≡{x∈R 4 |Ax=~ 0 }. The second column does not contain a pivot, therefore it corresponds to a free variable, which we will denotes. We are looking for a vector with three unknowns and one free variable(x 1 , s, x 3 , x 4 )Tthat obeys the conditions:

2 4

1 3 0 0 0 0 1 0 0 0 0 1

3 5

2 66 4

x 1 s x 3 x 4

3 77 5 =

2 4

0 0 0

3 5 ⇒

1 x 1 + 3s = 0 1 x 3 = 0 1 x 4 = 0

Let’s express the unknownsx 1 ,x 3 , andx 4 in terms of the free variables. We immediately see thatx 3 = 0andx 4 = 0, and we can writex 1 =− 3 s. Therefore, any vector of the form(− 3 s, s, 0 ,0), for anys∈R, is in the null space ofA. We writeN(A) =span{(− 3 , 1 , 0 ,0)T}. Observe that thedim(C(A)) = dim(R(A)) = 3, this is known as the rankof the matrixA. Also,dim(R(A)) + dim(N(A)) = 3 + 1 = 4, which is the dimension of the input space of the linear transformationTA.

E. Invertible matrix theorem There is an important distinction between matrices that are invertible and those that are not as formalized by the following theorem. Theorem ann×nmatrixA, the following statements are equivalent: 1) Ais invertible 2) The RREF ofAis then×nidentity matrix 3) The rank of the matrix isn 4) The row space ofAisRn 5) The column space ofAisRn 6) Adoesn’t have a null space (only the zero vectorN(A) ={~ 0 }) 7) The determinant ofAis nonzerodet(A) 6 = 0 For a given matrixA, the above statements are either all true or all false. An invertible matrixAcorresponds to a linear transformationTAwhich maps then-dimensional input vector spaceRnto then-dimensional output vector spaceRnsuch that there exists an inverse transformationTA− 1 that can faithfully undo the effects ofTA. On the other hand, ann×nmatrixBthat is not invertible maps the input vector spaceRnto a subspaceC(B)( Rnand has a nonempty null space. OnceTBsends a vector~w∈N(B)to the zero vector, there is no TB− 1 that can undo this operation.

F. Determinants The determinant of a matrix, denoteddet(A)or|A|, is a special way to combine the entries of a matrix that serves to check if a matrix is invertible or not. The determinant formulas for 2 × 2 and 3 × 3 matrices are ̨ ̨ ̨ ̨

a 11 a 12 a 21 a 22

̨

̨ ̨

̨=a 11 a 22 −a 12 a 21 , and ̨ ̨ ̨ ̨ ̨ ̨

a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33

̨ ̨

̨ ̨

̨ ̨=a 11

̨

̨ ̨

̨

a 22 a 23 a 32 a 33

̨

̨ ̨

̨−a 12

̨

̨ ̨

̨

a 21 a 23 a 31 a 33

̨

̨ ̨

̨+a 13

̨

̨ ̨

̨

a 21 a 22 a 31 a 32

̨

̨ ̨

̨.

If the|A|= 0thenAis not invertible. If|A|6= 0thenAis invertible.

G. Eigenvalues and eigenvectors The set of eigenvectors of a matrix is a special set of input vectors for which the action of the matrix is described as a simplescaling. When a matrix is multiplied by one of its eigenvectors the output is the same eigenvector multiplied by a constantAeλ=λeλ. The constantλis called aneigenvalueofA. To find the eigenvalues of a matrix we start from the eigenvalue equation Aeλ=λeλ, insert the identity✶, and rewrite it as a null-space problem: Aeλ=λ✶eλ ⇒ (A−λ✶)eλ= 0. This equation will have a solution whenever|A−λ✶|= 0. The eigenvalues ofA∈Rn×n, denoted{λ 1 , λ 2 ,... , λn}, are the roots of thecharacteristic polynomial p(λ) = |A−λ✶|. Theeigenvectors associated with the eigenvalueλiare the vectors in the null space of the matrix(A−λi✶). Certain matrices can be written entirely in terms of their eigenvectors and their eigenvalues. Consider the matrixΛthat has the eigenvalues of the matrixAon the diagonal, and the matrixQconstructed from the eigenvectors ofAas columns:

Λ =

2 66 66 66 64

λ 1 ··· 0 .. .

..

. 0

0 0 λn

3 77 77 77 75

, Q=

2 66 66 66 64

̨

̨ |

~eλ 1 ··· ~eλn ̨ ̨ |

3 77 77 77 75

, then A=QΛQ− 1.

Matrices that can be written this way are called diagonalizable. The decomposition of a matrix into its eigenvalues and eigenvectors gives valuable insights into the properties of the matrix. Google’s original PageRankalgorithm for ranking webpages by “importance” can be formalized as an eigenvector calculation on the matrix of web hyperlinks.

VI. TEXTBOOK PLUG If you’re interested in learning more about linear algebra, you can check out my new book, the NO BULLSHIT GUIDE TO LINEAR ALGEBRA. A pre-release version of the book is available here:gum/noBSLA

Was this document helpful?

Linear algebra cheat sheet

Course: Linear Algebra and Applications (MATH 10)

4 Documents
Students shared 4 documents in this course
Was this document helpful?
Linear algebra explained in four pages
Excerpt from the NO BULLSHIT GUIDE TO LINEAR ALGEBRA by Ivan Savov
Abstract—This document will review the fundamental ideas of linear algebra.
We will learn about matrices, matrix operations, linear transformations and
discuss both the theoretical and computational aspects of linear algebra. The
tools of linear algebra open the gateway to the study of more advanced
mathematics. A lot of knowledge buzz awaits you if you choose to follow the
path of understanding, instead of trying to memorize a bunch of formulas.
I. INTRODUCTION
Linear algebra is the math of vectors and matrices. Let nbe a positive
integer and let Rdenote the set of real numbers, then Rnis the set of all
n-tuples of real numbers. A vector ~v Rnis an n-tuple of real numbers.
The notation S is read “element of S. For example, consider a vector
that has three components:
~v = (v1, v2, v3)(R,R,R)R3.
A matrix ARm×nis a rectangular array of real numbers with mrows
and ncolumns. For example, a 3×2matrix looks like this:
A=2
4
a11 a12
a21 a22
a31 a32
3
52
4
R R
R R
R R
3
5R3×2.
The purpose of this document is to introduce you to the mathematical
operations that we can perform on vectors and matrices and to give you a
feel of the power of linear algebra. Many problems in science, business,
and technology can be described in terms of vectors and matrices so it is
important that you understand how to work with these.
Prerequisites
The only prerequisite for this tutorial is a basic understanding of high school
math concepts1like numbers, variables, equations, and the fundamental
arithmetic operations on real numbers: addition (denoted +), subtraction
(denoted ), multiplication (denoted implicitly), and division (fractions).
You should also be familiar with functions that take real numbers as
inputs and give real numbers as outputs, f:RR. Recall that, by
definition, the inverse function f1undoes the effect of f. If you are
given f(x)and you want to find x, you can use the inverse function as
follows: f1(f(x)) = x. For example, the function f(x) = ln(x)has the
inverse f1(x) = ex, and the inverse of g(x) = xis g1(x) = x2.
II. DEFINITIONS
A. Vector operations
We now define the math operations for vectors. The operations we can
perform on vectors ~u = (u1, u2, u3)and ~v = (v1, v2, v3)are: addition,
subtraction, scaling, norm (length), dot product, and cross product:
~u +~v = (u1+v1, u2+v2, u3+v3)
~u ~v = (u1v1, u2v2, u3v3)
α~u = (αu1, αu2, αu3)
||~u|| =qu2
1+u2
2+u2
3
~u ·~v =u1v1+u2v2+u3v3
~u ×~v =(u2v3u3v2, u3v1u1v3, u1v2u2v1)
The dot product and the cross product of two vectors can also be described
in terms of the angle θbetween the two vectors. The formula for the dot
product of the vectors is ~u ·~v =k~ukk~vkcos θ. We say two vectors ~u and
~v are orthogonal if the angle between them is 90. The dot product of
orthogonal vectors is zero: ~u ·~v =k~ukk~vkcos(90) = 0.
The norm of the cross product is given by k~u ×~vk=k~ukk~vksin θ. The
cross product is not commutative: ~u ×~v 6=~v ×~u, in fact ~u ×~v =~v ×~u.
1A good textbook to (re)learn high school math is minireference.com
B. Matrix operations
We denote by Athe matrix as a whole and refer to its entries as aij .
The mathematical operations defined for matrices are the following:
addition (denoted +)
C=A+Bcij =aij +bij .
subtraction (the inverse of addition)
matrix product. The product of matrices ARm×nand BRn×
is another matrix CRm×given by the formula
C=AB cij =
n
X
k=1
aikbkj ,
2
4
a11 a12
a21 a22
a31 a32
3
5»b11 b12
b21 b22=2
4
a11b11 +a12b21 a11b12 +a12b22
a21b11 +a22b21 a21b12 +a22b22
a31b11 +a32b21 a31b12 +a32b22
3
5
matrix inverse (denoted A1)
matrix transpose (denoted T):
»α1α2α3
β1β2β3T
=2
4
α1β1
α2β2
α3β3
3
5.
matrix trace: Tr[A]Pn
i=1 aii
determinant (denoted det(A)or |A|)
Note that the matrix product is not a commutative operation: AB 6=BA.
C. Matrix-vector product
The matrix-vector product is an important special case of the matrix-
matrix product. The product of a 3×2matrix Aand the 2×1column
vector ~x results in a 3×1vector ~y given by:
~y =A~x 2
4
y1
y2
y3
3
5=2
4
a11 a12
a21 a22
a31 a32
3
5»x1
x2=2
4
a11x1+a12x2
a21x1+a22x2
a31x1+a32x2
3
5
=x1
2
4
a11
a21
a31
3
5+x2
2
4
a12
a22
a32
3
5(C)
=2
4
(a11, a12)·~x
(a21, a22)·~x
(a31, a32)·~x
3
5.(R)
There are two2fundamentally different yet equivalent ways to interpret the
matrix-vector product. In the column picture, (C), the multiplication of the
matrix Aby the vector ~x produces a linear combination of the columns
of the matrix:~y =A~x =x1A[:,1] +x2A[:,2], where A[:,1] and A[:,2] are
the first and second columns of the matrix A.
In the row picture, (R), multiplication of the matrix Aby the vector ~x
produces a column vector with coefficients equal to the dot products of
rows of the matrix with the vector ~x.
D. Linear transformations
The matrix-vector product is used to define the notion of a linear
transformation, which is one of the key notions in the study of linear
algebra. Multiplication by a matrix ARm×ncan be thought of as
computing a linear transformation TAthat takes n-vectors as inputs and
produces m-vectors as outputs:
TA:RnRm.
2For more info see the video of Prof. Strang’s MIT lecture: bit.ly/10vmKcL
1