MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear...

66
MATH10212 Linear Algebra Lecture Notes Last change: 23 Apr 2018 Textbook Students are strongly advised to acquire a copy of the Textbook: D. C. Lay. Linear Algebra and its Applications. Pearson, 2006. ISBN 0-521-28713- 4. Other editions can be used as well; the book is easily available on Amazon (this in- cludes some very cheap used copies) and in Blackwell’s bookshop on campus. These lecture notes should be treated only as indication of the content of the course; the textbook contains detailed explanations, worked out examples, etc. About Homework The Undergraduate Student Handbook 1 says: As a general rule for each hour in class you should spend two hours on independent study. This will include reading lecture notes and textbooks, working on exercises and preparing for coursework and examinations. In respect of this course, MATH10212 Linear Algebra B, this means that students are expected to spend 8 (eight!) hours a week in private study of Linear Algebra. Normally, homework assignments will consist of some odd numbered exercises from the sections of the Textbook covered in the lectures up to Wednesday in particular week. The Textbook contains answers to most odd numbered exercises (but the num- bering of exercises might change from one edition to another). Homework N (already posted on the webpage and BB9 space of the course) should be returned to Supervision Classes teachers early in Week N, for marking and discussion at supervision classes on Tuesday and Wednesday. 1 http://www.maths.manchester.ac.uk/study/undergraduate/information-for-current-students/ undergraduatestudenthandbook/teachingandlearning/timetabledclasses/.

Transcript of MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear...

Page 1: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 Linear AlgebraLecture Notes

Last change: 23 Apr 2018

Textbook

Students are strongly advised to acquire a copy of the Textbook:

D. C. Lay. Linear Algebra and its Applications. Pearson, 2006. ISBN 0-521-28713-4.

Other editions can be used as well; the book is easily available on Amazon (this in-cludes some very cheap used copies) and in Blackwell’s bookshop on campus.

These lecture notes should be treated only as indication of the content of thecourse; the textbook contains detailed explanations, worked out examples, etc.

About Homework

The Undergraduate Student Handbook 1 says:

As a general rule for each hour in class you should spend two hours on independentstudy. This will include reading lecture notes and textbooks, working on exercises andpreparing for coursework and examinations.

In respect of this course, MATH10212 Linear Algebra B, this means that students areexpected to spend 8 (eight!) hours a week in private study of Linear Algebra.

Normally, homework assignments will consist of some odd numbered exercises fromthe sections of the Textbook covered in the lectures up to Wednesday in particularweek. The Textbook contains answers to most odd numbered exercises (but the num-bering of exercises might change from one edition to another).

Homework N (already posted on the webpage and BB9 space of the course) should bereturned to Supervision Classes teachers early in Week N, for marking and discussionat supervision classes on Tuesday and Wednesday.

1http://www.maths.manchester.ac.uk/study/undergraduate/information-for-current-students/

undergraduatestudenthandbook/teachingandlearning/timetabledclasses/.

Page 2: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

2

Communication

The Course Webpage is

http://www.maths.manchester.ac.uk/~avb/math10212-Linear-Algebra-B.html

The Course Webpage page is updated almost daily, sometimes several times a day.Refresh it (and files it is linked to) in your browser, otherwise you may miss thechanges.

Email: Feel free to write to me with questions, etc., at the address

[email protected]

but only from your university e-mail account.

Emails from Gmail, Hotmail, etc. automatically go to spam.

What is Linear Algebra?

It is well-known that the total cost of a purchase of amounts g1, g2, g3 of some goodsat prices p1, p2, p3, respectively, is an expression

p1g1 + p2g2 + p3g3 =3∑

i=1

pigi .

Expressions of this kind,a1x1 + · · · + anxn

are called linear forms in variables x1, . . . , xn with coefficients a1, . . . , an.

• Linear Algebra studies the mathematics of linear forms.

• Over the course, we shall develop increasingly compact notation for operationsof Linear Algebra. In particular, we shall discover that

p1g1 + p2g2 + p3g3

can be very conveniently written as

[p1 p2 p3

] g1

g2

g3

and then abbreviated [

p1 p2 p3] g1

g2

g3

= PT G,

where

P =

p1

p2

p3

and G =

g1

g2

g3

,

Page 3: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

3

and T (transposition) turns row vectors into column vectors, and vice versa:

PT =

p1

p2

p3

T

=[p1 p2 p3

],

and [p1 p2 p3

]T =

p1

p2

p3

.

• Physicists use even more short notation and, instead of

p1g1 + p2g2 + p3g3 =3∑

i=1

pigi

writep1g1 + p2g2 + p3g3 = pig i ,

omitting the summation sign entirely. This particular trick was invented by AlbertEinstein, of all people. I do not use “physics” tricks in my lectures, but amprepared to give a few additional lectures to physics students.

• Warning: Increasingly compact notation leads to increasingly compact and ab-stract language.

• Unlike, say, Calculus, Linear Algebra focuses more on the development of aspecial mathematics language rather than on procedures.

Page 4: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 1 • Linear systems • Last change: 23 Apr 2018 4

Lecture 1 Systems of linear equations [Lay 1.1]

A linear equation in the variables x1, . . . , xn is an equation that can be written in theform

a1x1 + a2x2 + · · · + anxn = bwhere b and the coefficients a1, . . . , an are real numbers. The subscript n can be anynatural number.

A system of simultaneous linear equations is a collection of one or more linearequations involving the same variables, say x1, . . . , xn. For example,

x1 + x2 = 3x1 − x2 = 1

We shall abbreviate the words “a system of simultaneous linear equations” just to“a linear system”.

A solution of the system is a list (s1, . . . , sn) of numbers that makes each equation atrue identity when the values s1, . . . , sn are substituted for x1, . . . , xn, respectively. Forexample, in the system above (2, 1) is a solution.

The set of all possible solutions is called the solution set of the linear system.

Two linear systems are equivalent if the have the same solution set.

We shall be use the following elementary operations on systems od simultaneousliner equations:

Replacement Replace one equation by the sum of itself and a multiple of anotherequation.

Interchange Interchange two equations.

Scaling Multiply all terms in a equation by a nonzero constant.

Note: The elementary operations are reversible.

Theorem: Elementary operations preserve solutions.

If a system of simultaneous linear equations is obtained from another system by ele-mentary operations, then the two systems have the same solution set.

We shall prove later in the course that a system of linear equations has either

• no solution, or

• exactly one solution, or

• infinitely many solutions,

under the assumption that the coefficients and solutions of the systems are real orcomplex numbers.

A system of linear equations is said to be consistent it if has solutions (either one orinfinitely many), and a system in inconsistent if it has no solution.

Page 5: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 1 • Linear systems • Last change: 23 Apr 2018 5

Solving a linear system

The basic strategy is

to replace one system with an equivalent system (that is, with the samesolution set) which is easier to solve.

Existence and uniqueness questions

• Is the system consistent?

• If a solution exist, is it unique?

Equivalence of linear systems

• When are two linear systems equivalent?

Checking solutions

Given a solution of the system of linear equations, how to check that it is correct?

Page 6: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 2 • Row reduction and echelon forms • Last change: 23 Apr 2018 6

Lecture 2 Row reduction and echelon forms [Lay 1.2]

Matrix notation

It is convenient to write coefficients of a linear system in the form of a matrix, a rect-angular table. For example, the system

x1 − 2x2 + 3x3 = 1x1 + x2 = 2

x2 + x3 = 3

has the matrix of coefficients 1 −2 31 1 00 1 1

and the augmented matrix 1 −2 3 1

1 1 0 20 1 1 3

;

notice how the coefficients are aligned in columns, and how missing coefficients arereplaced by 0.

The augmented matrix in the example above has 3 rows and 4 columns; we say thatit is a 3× 4 matrix. Generally, a matrix with m rows and n columns is called an m× nmatrix.

Elementary row operations

Replacement Replace one row by the sum of itself and a multiple of another row.

Interchange Interchange two rows.

Scaling Multiply all entries in a row by a nonzero constant.

The two matrices are row equivalent if there is a sequence of elementary row opera-tions that transforms one matrix into the other.

Note:

• The row operations are reversible.

• Row equivalence of matrices is an equivalence relation on the set of matrices.

Theorem: Row Equivalence.

If the augmented matrices of two linear systems are row equivalent, then the twosystems have the same solution set.

Page 7: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 2 • Row reduction and echelon forms • Last change: 23 Apr 2018 7

A nonzero row or column of a matrix is a row or column which contains at least onenonzero entry.

We can now formulate a theorem (to be proven later).

Theorem: Equivalence of linear systems.

Two linear systems are equivalent if and only if the augmented matrix of one of themcan be obtained from the augmented matrix of another system by frow operations andinsertion / deletion of zero rows.

Page 8: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 3 • Solution of Linear Systems • Last change: 23 Apr 2018 8

Lecture 3 Solution of Linear Systems [Lay 1.2]

A nonzero row or column of a matrix is a row or column which contains at least onenonzero entry. A leading entry of a row is the leftmost nonzero entry (in a non-zerorow).

Definition. A matrix is in echelon form (or row echelon form) if it has the followingthree properties:

1. All nonzero rows are above any row of zeroes.

2. Each leading entry of a row is in column to the right of the leading entry of therow above it.

3. All entries in a column below a leading entry are zeroes.

If, in addition, the following two conditions are satisfied,

4. All leading entries are equal 1.

5. Each leading 1 is the only non-zero entry in its column

then the matrix is in reduced echelon form.

An echelon matrix is a matrix in echelon form.

Any non-zero matrix can be row reduced (that, transformed by elementary row op-erations) into a matrix in echelon form (but the same matrix can give rise to differentechelon forms).

Examples. The following is a schematic presentation of an echelon matrix:

� ∗ ∗ ∗ ∗0 � ∗ ∗ ∗0 0 0 � ∗

and this is a reduced echelon matrix:

1 0 ∗ 0 ∗0 1 ∗ 0 ∗0 0 0 1 ∗

Theorem 1.2.1: Uniqueness of the reduced echelon form.

Each matrix is row equivalent to one and only one reduced echelon form.

Definition. A pivot position in a matrix A is a location in A that corresponds to aleading 1 in the reduced echelon form of A. A pivot column is a column of A thatcontains a pivot position.

Page 9: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 3 • Solution of Linear Systems • Last change: 23 Apr 2018 9

Example for solving in the lecture(The Row Reduction Algorithm):

0 2 2 2 21 1 1 1 11 1 1 3 31 1 1 2 2

A pivot is a nonzero number in a pivot position which is used to create zeroes in thecolumn below it.

A rule for row reduction:

1. Pick the leftmost non-zero column and in it the topmost nonzero entry; it is apivot.

2. Using scaling, make the pivot equal 1.

3. Using replacement row operations, kill all non-zero entries in the column belowthe pivot.

4. Mark the row and column containing the pivot as pivoted.

5. Repeat the same with the matrix made of not pivoted yet rows and columns.

6. When this is over, interchange the rows making sure that the resulting matrix isin echelon form.

7. Using replacement row operations, kill all non-zero entries in the column abovethe pivot entries.

Solution of Linear Systems

When we converted the augmented matrix of a linear system into its reduced rowechelon form, we can write out the entire solution set of the system.

Example. Let 1 0 −5 10 1 1 40 0 0 0

be the augmented matrix of a a linear system; then the system is equivalent to

x1 − 5x3 = 1x2 + x3 = 4

0 = 0

The variables x1 and x2 correspond to pivot columns in the matrix and a re called basicvariables (also leading or pivot variables). The other variable, x3 is a free variable.

Page 10: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 3 • Solution of Linear Systems • Last change: 23 Apr 2018 10

Free variables can be assigned arbitrary values and then leading variables expressedin terms of free variables:

x1 = 1 + 5x3

x2 = 4− x3

x3 is free

Theorem 1.2.2: Existence and Uniqueness

A linear system is consistent if and only if the rightmost column of the augmentedmatrix is not a pivot column—that is, if and only if an echelon form of the augmentedmatrix has no row of the form[

0 · · · 0 b]

with b nonzero

If a linear system is consistent, then the solution set contains either

(i) a unique solution, when there are no free variables, or

(ii) infinitely many solutions, when there is at least one free variable.

Using row reduction to solve a linear system

1. Write the augmented matrix of the system.

2. Use the row reduction algorithm to obtain an equivalent augmented matrix inechelon form. Decide whether the system is consistent.

3. if the system is consistent, get the reduced echelon form.

4. Write the system of equations corresponding to the matrix obtained in Step 3.

5. Express each basic variable in terms of any free variables appearing in the equa-tion.

Page 11: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 4 • Vector equations • Last change: 23 Apr 2018 11

Lecture 4 Vector equations [Lay 1.3]

A matrix with only one column is called a column vector, or simply a vector.

Rn is the set of all column vectors with n entries.

A row vector: a matric with one row.

Two vectors are equal if and only if they have

• the same shape,

• the same number of rows,

• and their corresponding entries are equal.

The set of al vectors with n entries is denoted Rn.

The sum u+v of two vectors u and v in Rn is obtained by adding corresponding entriesin u and v. For example in R2 [

12

]+[−1−1

]=[01

].

The scalar multiple cv of a vector v and a real number (“scalar”) c is the vectorobtained by multiplying each entry in v by c. For example in R3,

1.5

10−3

=

1.50−2

.

The vector whose entries are all zeroes is called the zero vector and denoted 0:

0 =

00...0

.

Operations with row vectors are defined in a similar way.

Algebraic properties of Rn

For all u, v, w ∈ Rn and all scalars c and d :

1. u + v = v + u

2. (u + v) + w = u + (v + w)

3. u + 0 = 0 + u = u

4. u + (−u) = −u + u = 0

Page 12: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 4 • Vector equations • Last change: 23 Apr 2018 12

5. c(u + v) = cu + cv

6. (c + d)u = cu + du

7. c(du) = (cd)u

8. 1u = u

(Here −u denotes (−1)u.)

Linear combinations

Given vectors v1, v2, . . . , vp in Rn and scalars c1, c2, . . . , cp, the vector

y = c1v1 + · · · cpvp

is called a linear combination of v1, v2, . . . , vp with weights c1, c2, . . . , cp.

Rewriting a linear system as a vector equation

Consider an example: the linear system

x2 + x3 = 2x1 + x2 + x3 = 3x1 + x2 − x3 = 2

can be written as equality of two vectors: x2 + x3

x1 + x2 + x3

x1 + x2 − x3

=

232

which is the same as

x1

011

+ x2

111

+ x3

11−1

=

232

Let us write the matrix 0 1 1 2

1 1 1 31 1 −1 2

in a way that calls attention to its columns:[

a1 a2 a3 b]

Denote

a1 =

011

, a2 =

111

, a3 =

11−1

Page 13: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 4 • Vector equations • Last change: 23 Apr 2018 13

and

b =

232

,

then the vector equation can be written as

x1a1 + x2a2 + x3a3 = b.

Notice that to solve this equation is the same as

express b as a linear combination of a1, a2, a3, and find all such expres-sions.

Therefore

solving a linear system is the same as finding an expression of the vector of the rightpart of the system as a linear combination of columns in its matrix of coefficients.

A vector equationx1a1 + x2a2 + · · · + xnan = b.

has the same solution set as the linear system whose augmented matrix is[a1 a2 · · · an b

]In particular b can be generated by a linear combination of a1, a2, . . . , an if and only ifthere is a solution of the corresponding linear system.

Definition. If v1, . . . , vp are in Rn, then the set of all linear combination of v1, . . . , vp isdenoted by

Span{v1, . . . , vp}

and is called the subset of Rn spanned (or generated) by v1, . . . , vp; or the span ofvectors v1, . . . , vp.

That is, Span{v1, . . . , vp} is the collection of all vectors which can be written in theform

c1v1 + c2v2 + · · · + cpvp

with c1, . . . , cp scalars.

We say that vectors v1, . . . , vp span Rn if

Span{v1, . . . , vp} = Rn

We can reformulate the definition of span as follows: iv a1, . . . , ap ∈ Rn, then

Span{a1, . . . , ap} = {b ∈ Rn such that[a1 · · · ap|b]is the augmented matrixof a consistent systemof linear equations},

Page 14: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 4 • Vector equations • Last change: 23 Apr 2018 14

or, in simpler words,

Span{a1, . . . , ap} = {b ∈ Rn such thatthe system of equationsx1a1 + · · · + xpap = bhas a solution}.

Page 15: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 5 • The matrix equation Ax = b • Last change: 23 Apr 2018 15

Lecture 5: The matrix equation Ax = b [Lay 1.4]

Definition. If A is an m × n matrix, with columns a1, . . . , an, and if x is in Rn, then theproduct of A and x, denoted Ax, is the linear combination of the columns of A usingthe corresponding entries in x as weights:

Ax =[a1a2 · · · an

] x1...

xn

= x1a1 + x2a2 + · · · + xnan

Example. The system

x2 + x3 = 2x1 + x2 + x3 = 3x1 + x2 − x3 = 2

was written asx1a1 + x2a2 + x3a3 = b.

where

a1 =

011

, a2 =

111

, a3 =

11−1

and

b =

232

.

In the matrix product notation it becomes0 1 11 1 11 1 −1

x1

x2

x3

=

232

or

Ax = b

where

A =[a1 a2 a3

], x =

x1

x2

x3

.

Theorem 1.4.3: If A is an m × n matrix, with columns a1, . . . , an, and if x is in Rn, thematrix equation

Ax = b

has the same solution set as the vector equation

x1a1 + x2a2 + · · · + xnan = b

Page 16: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 5 • The matrix equation Ax = b • Last change: 23 Apr 2018 16

which has the same solution set as the system of linear equations whose augmentedmatrix is [

a1 a2 · · · an b]

.

Existence of solutions. The equation Ax = b has a solution if and only if b is a linearcombination of columns of A.

Theorem 1.4.4: Let A be an m × n matrix. Then the following statements are equiva-lent.

(a) For each b ∈ Rn, the equation Ax = b has a solution.

(b) Each b ∈ Rn is a linear combination of columns of A.

(c) The columns of A span Rn.

(d) A has a pivot position in every row.

Row-vector rule for computing Ax. If the product Ax is defined then the i th entry inAx is the sum of products of corresponding entries from the row i of A and from thevector x.

Theorem 1.4.5: Properties of the matrix-vector product Ax.

If A is an m × n matrix, u, v ∈ Rn, and c is a scalar, then

(a) A(u + v) = Au + Av;

(b) A(cu) = c(Au).

Homogeneous linear systems

A linear system is homogeneous if it can be written as

Ax = 0.

A homogeneous system always has at least one solution x = 0 (trivial solution).

Therefore for homogeneous systems an important question os existence of a nontriv-ial solution, that is, a nonzero vector x which satisfies Ax = 0:

The homogeneous system Ax = b has a nontrivial solution if and only if the equationhas at least one free variable.

Example.

x1 + 2x2 − x3 = 0x1 + 3x3 + x3 = 0

Page 17: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 6 • Solution sets of linear equations • Last change: 23 Apr 2018 17

Lecture 6: Solution sets of linear equations [Lay 1.5]

Nonhomogeneous systems

When a nonhomogeneous system has many solutions, the general solution can bewritten in parametric vector form a one vector plus an arbitrary linea combination ofvectors that satisfy the corresponding homogeneous system.

Example.

x1 + 2x2 − x3 = 0x1 + 3x3 + x3 = 5

Theorem 1.5.6: Suppose the equation

Ax = b

is consistent for some given b, and p be a solution. Then the solution set of Ax = b isthe set of all vectors of the form

w = p + vh,

where vh is any solution of the homogeneous equation

Ax = 0.

Page 18: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 7 • Linear independence • Last change: 23 Apr 2018 18

Lecture 7: Linear independence [Lay 1.7]

Definition. An indexed set of vectors

{v1, . . . , vp }

in Rn is linearly independent if the vector equation

x1v1 + · · · + xpvp = 0

has only trivial solution.

The set{v1, . . . , vp }

in Rn is linearly dependent if there exist weights c1, . . . , cp, not all zero, such that

c1v1 + · · · + cpvp = 0

Linear independence of matrix columns. The matrix equation

Ax = 0

where A is made of columnsA =

[a1 · · · an

]can be written as

x1a1 + · · · + xnan = 0

Therefore the columns of matrix A are linearly independent if and only if the equation

Ax = 0

has only the trivial solution.

A set of one vectors {v1} is linearly dependent if v1 = 0.

A set of two vectors {v1, v2 } is linearly dependent if at least one of the vectors is amultiple of the other.

Theorem 1.7.7: Characterisation of linearly dependent sets. An indexed set

S = {v1, . . . , vp }

of two or more vectors is linearly dependent if and only if at least one of the vectors inS is a linear combination of the others.

Theorem 1.7.8: dependence of “big” sets. If a set contains more vectors thanentries in each vector, then the set is linearly dependent. Thus, any set

{v1, . . . , vp }

in Rn is linearly dependent if p > n.

Page 19: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 8 • Linear transformations • Last change: 23 Apr 2018 19

Lecture 8: Introduction to linear transformations [1.8]

Transformation. A transformation T from Rn to Rm is a rule that assigns to eachvector x in Rn a vector T (x) in Rm.

The set Rn is called the domain of T , the set Rm is the codomain of T .

Matrix transformations. With every m × n matrix A we can associated the transfor-mation

T : Rn −→ Rm

x 7→ Ax.

In short:T (x) = Ax.

The range of a matrix transformation. The range of T is the set of all linear combi-nations of the columns of A.

Indeed, this can be immediately seen from the fact that each image T (x) has the form

T (x) = Ax = x1a1 + · · · + xnan

Definition: Linear transformations. A transformation

T : Rn −→ Rm

is linear if:

• T (u + v) = T (u) + T (v) for all vectors u, v ∈ Rn;

• T (cu) = cT (u) for all vectors u and all scalars c.

Properties of linear transformations. If T is a linear transformation then

T (0) = 0

andT (cu + dv) = cT (u) + dT (v).

The identity matrix. An n × n matrix with 1’s on the diagonal and 0’s elsewhere iscalled the identity matrix In. For example,

I1 =[1]

, I2 =[1 00 1

],

I3 =

1 0 00 1 00 0 1

, I4 =

1 0 0 00 1 0 00 0 1 00 0 0 1

.

Page 20: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 8 • Linear transformations • Last change: 23 Apr 2018 20

The columns of the identity matrix In will be denoted

e1, e2, . . . , en.

For example, in R3

e1 =

100

, e2 =

010

, e3 =

001

.

Obsetrve that if x is an arbitrary vector in Rn,

x =

x1...

xn

,

then

x =

x1

x2

x3...

xn

= x1

100...0

+ x2

010...0

+ · · · + xn

000...1

= x1e1 + x2e2 + · · · + xnen.

The identity transformation. It is easy to check that

Inx = x for all x ∈ Rn.

Therefore the linear transformation associated with the identity matrix is the identitytransformation of Rn:

Rn −→ Rn

x 7→ x

The matrix of a linear transformation [Lay 1.9]

Theorem 1.9.10: The matrix of a linear transformation. Let

T : Rn −→ Rm

be a linear transformation.

Page 21: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 8 • Linear transformations • Last change: 23 Apr 2018 21

Then there exists a unique matrix A such that

T (x) = Ax for all x ∈ Rn.

In fact, A is the m × n matrix whose j th column is the vector T (ej) where ej is the j thcolumn of the identity matrix in Rn:

A =[T (e1) · · · T (en)

]Proof. First we express x in terms of e1, . . . , en:

x = x1e1 + x2e2 + · · · + xnen

and compute, using definition of linear transformation

T (x) = T (x1e1 + x2e2 + · · · + xnen)

= T (x1e1) + · · · + T (xnen)

= x1T (e1) + · · · + xnT (en)

and then switch to matrixnotation:

=[T (e1) · · · T (en)

] x1...

xn

= Ax.

The matrix A is called the standard matrix for the linear transformation T .

Definition. A transformationT : Rn −→ Rm

is onto Rm if each b ∈ Rm is the image of at least one x ∈ Rn.

A transformation T is one-to-one if each b ∈ Rm is the image of at most one x ∈ Rn.

Theorem: One-to-one transformations: a criterion. A linear transformation

T : Rn −→ Rm

is one-to-one if and only if the equation

T (x) = 0

has only the trivial solution.

Theorem: “One-to-one” and “onto” in terms of matrices. Let

T : Rn −→ Rm

be linear transformation and let A be the standard matrix for T . Then:

• T maps Rn onto Rm if and only if the columns of A span Rm.

• T is one-to-one if and only if the columns of A are linearly independent.

Page 22: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 9 • Matrix operations: Addition • Last change: 23 Apr 2018 22

Lecture 9: Matrix operations: Addition [Lay 2.1]

Labeling of matrix entries. Let A be an m × n matrix.

A =[a1 a2 · · · an

]

=

a11 · · · a1j · · · a1n...

......

ai1 · · · ai j · · · ain...

......

am1 · · · amj · · · amn

Notice that in ai j the first subscript i denotes the row number, the second subscript jthe column number of the entry ai j . In particular, the column aj is

aj =

a1j...

ai j...

amj

.

Diagonal matrices, zero matrices. The diagonal entries in A are

a11, a22, a33, . . .

For example, the diagonal entries of the matrix

A =

1 2 34 5 67 8 9

are 1, 5, and 9.

A square matrix is a matrix with equal numbers of rows and columns.

A diagonal matrix is a square matrix whose non-diagonal entries are zeroes.

Matrices [1 00 2

],

1 0 00 0 00 0 2

,

π 0 00√

2 00 0 3

are all diagonal. The identity matrices

[1]

,[1 00 1

],

1 0 00 1 00 0 1

, . . .

are diagonal.

Zero matrix. By definition, 0 is a m×n matrix whose entries are all zero. For example,matrices [

0 0]

,[0 0 00 0 0

]

Page 23: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 9 • Matrix operations: Addition • Last change: 23 Apr 2018 23

are zero matrices. Notice that zero square matrices, like

[0 00 0

],

0 0 00 0 00 0 0

are diagonal!

Sums. IfA =

[a1 a2 · · · an

]and

B =[b1 b2 · · · bn

]are m × n matrices then we define the sum A + B as

A + B =[a1 + b1 a2 + b2 · · · an + bn

]

=

a11 + b11 · · · a1j + b1j · · · a1n + b1n

......

...ai1 + bi1 · · · ai j + bi j · · · ain + bin

......

...am1 + bm1 · · · amj + bmj · · · amn + bmn

Scalar multiple. If c is a a scalar then we define

cA =[ca1 ca2 · · · can

]

=

ca11 · · · ca1j · · · ca1n

......

...cai1 · · · cai j · · · cain

......

...cam1 · · · camj · · · camn

Theorem 2.1.1: Properties of matrix addition. Let A, B, and C be matrices of thesame size and r and s be scalars.

1. A + B = B + A

2. (A + B) + C = A + (B + C)

3. A + 0 = A

4. r (A + B) = rA + rB

5. (r + s)A = rA + sA

6. r (sA) = (rs)A.

Page 24: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 10 • Matrix multiplication • Last change: 23 Apr 2018 24

Lecture 10: Matrix multiplication [Lay 2.1]

Composition of linear transformations. Let B be an m × n matrix and A an p ×mmatrix. They define linear transformations

T : Rn −→ Rm, x 7→ Bx

andS : Rm −→ Rp, y 7→ Ay.

Their composition(S ◦ T )(x) = S(T (x))

is a linear transformationS ◦ T : Rn −→ Rp.

From the previous lecture, we know that linear transformations are given by matrices.What is the matrix of S ◦ T?

Multiplication of matrices. To answer the above question, we need to compute A(Bx)in matrix form.

Write x as

x =

x1...

xn

and observe

Bx = x1b1 + · · · + xnbn.

Hence

A(Bx) = A(x1b1 + · · · + xnbn)

= A(x1b1) + · · · + A(xnbn)

= x1A(b1) + · · · + xnA(bn)

=[Ab1 Ab2 · · · Abn

]x

Therefore multiplication by the matrix

C =[Ab1 Ab2 · · · Abn

]transforms x into A(Bx). Hence C is the matrix of the linear transformation S ◦ T andit will be natural to call C the product of A and B and denote

C = A · B

(but the multiplication symbol “·” is frequently skipped).

Definition: Matrix multiplication. If A is an p × m matrix and B is an m × n matrixwith columns

b1, . . . , bn

Page 25: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 10 • Matrix multiplication • Last change: 23 Apr 2018 25

then the product AB is the p × n matrix whose columns are

Ab1, . . . , Abn :

AB = A[b1 · · · bn

]=[Ab1 · · · Abn

].

Columns of AB. Each column Abj of AB is a linear combination of columns of A withweights taken from the j th column of B:

Abj =[a1 · · · am

] b1j...

bmj

= b1ja1 + · · · + bmjam

Mnemonic rules

[m × n matrix] · [n × p matrix] = [m × p matrix]

columnj(AB) = A · columnj(B)

rowi(AB) = rowi(A) · B

Theorem 2.1.2: Properties of matrix multiplication. Let A be an m × n matrix andlet B and C be matrices for which indicated sums and products are defined. Then thefollowing identities are true:

1. A(BC) = (AB)C

2. A(B + C) = AB + AC

3. (B + C)A = BA + CA

4. r (AB) = (rA)B = A(rB) for any scalar r

5. ImA = A = AIn

Powers of matrix. As it is usual in algebra, we define, for a square matrix A,

Ak = A · · ·A (k times)

If A 6= 0 then we setA0 = I

Page 26: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 10 • Matrix multiplication • Last change: 23 Apr 2018 26

The transpose of a matrix. The transpose AT of an m × n matrix A is the n × mmatrix whose rows are formed from corresponding columns of A:

[1 2 34 5 6

]T

=

1 42 53 6

Theorem 2.1.3: Properties of transpose. Let A and B denote matrices whose sizesare appropriate for the following sums and products. Then we have:

1. (AT )T = A

2. (A + B)T = AT + BT

3. (rA)T = r (AT ) for any scalar r

4. (AB)T = BT AT

Page 27: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 11 • The inverse of a matrix • Last change: 23 Apr 2018 27

Lecture 11: The inverse of a matrix [Lay 2.2]

Invertible matrices

An n × n matrix A is invertible if there is an n × n matrix C such that

CA = I and AC = I

C is called the inverse of A.

The inverse of A, if exists, is unique (!) and is denoted A−1:

A−1A = I and AA−1 = I.

Singular matrices. A non-invertible matrix is called a singular matrix.

An invertible matrix is nonsingular.

Theorem 2.2.4: Inverse of a 2× 2 matrix. Let

A =[a bc d

]If ad − bc 6= 0 then A is invertible and[

a bc d

]−1

=1

ad − bc

[d −b−c a

]The quantity ad − bc is called the determinant of A:

det A = ad − bc

Theorem 2.2.5: Solving matrix equations. If A is an invertible n × n matrix, then foreach b ∈ Rn, the equation Ax = b has the unique solution

x = A−1b.

Theorem 2.2.6: Properties of invertible matrices.

(a) If A is an invertible matrix, then A−1 is also invertible and

(A−1)−1 = A

(b) If A and B are n × n invertible matrices, then so is AB, and

(AB)−1 = B−1A−1

(c) If A is an invertible matrix, then so is AT , and

(AT )−1 = (A−1)T

Page 28: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 12 • Characterizations of invertible matrices • Last change: 23 Apr 2018 28

Lecture 12: Characterizations of invertible matrices.

Definition: Elementary matrices. An elementary matrix is a matrix obtained byperforming a single elementary row operation on an identity matrix.

If an elementary row transformation is performed on an n × n matrix A, the result-ing matrix can be written as EA, where the m × m matrix is made by the same rowoperations on Im.

Each elementary matrix E is invertible. The inverse of E is the elementary matrix ofthe same type that transforms E back into I.

Theorem 2.2.7: Invertible matrices. An n × n matrix A is invertible if and only if A isrow equivalent to In, and in this case, any sequence of elementary row operations thatreduces A to In also transforms In into A−1.

Computation of inverses.

• Form the augmented matrix[A I

]and row reduce it.

• If A is row equivalent to I, then[A I

]is row equivalent to

[I A−1

].

• Otherwise A has no inverse.

The Invertible Matrix Theorem 2.3.8: For an n × n matrix A, the following are equiv-alent:

(a) A is invertible.

(b) A is row equivalent to In.

(c) A has n pivot positions.

(d) Ax = 0 has only the trivial solution.

(e) The columns of A are linearly independent.

(f) The linear transformation x 7→ Ax is one-to-one.

(g) Ax = b has at least one solution for each b ∈ Rn.

(h) The columns of A span Rn.

(i) x 7→ Ax maps Rn onto Rn.

(j) There is an n × n matrix C such that CA = I.

(k) There is an n × n matrix D such that AD = I.

(l) AT is invertible.

Page 29: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 12 • Characterizations of invertible matrices • Last change: 23 Apr 2018 29

One-sided inverse is the inverse. Let A and B be square matrices.

If AB = I then both A and B are invertible and

B = A−1 and A = B−1.

Theorem 2.3.9: Invertible linear transformations. Let

T : Rn −→ Rn

be a linear transformation and A its standard matrix.

Then T is invertible if and only if A is an invertible matrix.

In that case, the linear transformation

S(x) = A−1x

is the only transformation satisfying

S(T (x)) = x for all x ∈ Rn

T (S(x)) = x for all x ∈ Rn

Page 30: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 13 • Partitioned matrices • Last change: 23 Apr 2018 30

Lecture 13 Partitioned matrices [Lay 2.4]

Example: Partitioned matrix

A =

1 2 a3 4 bp q z

=[A11 A12

A21 A22

]

A is a 3× 3 matrix which can be viewed as a 2× 2 partitioned (or block) matrix withblocks

A11 =[1 23 4

], A12 =

[ab

],

A21 =[p q

], A22 =

[z]

Addition of partitioned matrices. If matrices A and B are of the same size andpartitioned the same way, they can be added block-by-block.

Similarly, partitioned matrices can be multiplied by a scalar blockwise.

Multiplication of partitioned matrices. If the column partition of A matches the rowpartition of B then AB can be computed by the usual row-column rule, with blockstreated as matrix entries.

A =

1 2 a3 4 bp q z

, B =

α β

γ δ

Γ ∆

Example

A =

1 2 a3 4 bp q z

=[A11 A12

A21 A22

],

B =

α β

γ δ

Γ ∆

=[B1

B2

]

AB =[A11 A12

A21 A22

] [B1

B2

]=[A11B1 + A12B2

A21B1 + A22B2

]

=

[1 23 4

] [α β

γ δ

]+[ab

] [Γ ∆

][p q

] [α β

γ δ

]+[z] [Γ ∆

]

Page 31: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 13 • Partitioned matrices • Last change: 23 Apr 2018 31

Theorem 2.4.10: Column-Row Expansion of AB. If A is m × n and B is n × p then

AB =[col1(A) col2(A) · · · coln(A)

]

row1(B)row2(B)

...rown(B)

= col1(A)row1(B) + · · · + coln(A)rown(B)

Example Partitioned matrices naturally arise in analysis of systems of simultaneouslinear equations. Consider a sysetm of equations:

x1 + 2x2 + 3x3 + 4x4 = 1x1 + 3x2 + 3x3 + 4x4 = 2

In matrix form, it looks as [1 2 3 41 3 3 4

]x1

x2

x3

x4

=[12

]

Denote

A =[1 21 3

]C =

[3 43 4

]Y1 =

[x1

x2

]Y2 =

[x3

x4

]B =

[12

]then we can rewrite the matrices involved in the matrix equation ar partitioned matri-ces: [

A C] [Y1

Y2

]= B

and, multiplying matrices as partitioned matrices,

AY1 + CY2 = B.

Please notice that matrix A is invertible – at this stage it should be an easy mentalcalculation for you. Multiplying the both parts of the last equation by A−1, we get

Y1 + A−1CY2 = A−1B

Page 32: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 13 • Partitioned matrices • Last change: 23 Apr 2018 32

andY1 = A−1B − A−1CY2

The entries of

Y2 =[x3

x4

]can be taken for free parameters: x3 = t , x4 = s, and x1 and x2 expressed as[

x1

x2

]= A−1B − A−1C

[ts

]Observe that

A−1 =[

3 −2−1 1

]and

A−1C =[

3 −2−1 1

]·[3 43 4

]=[3 40 0

]which gives us an answer:[

x1

x2

]=[

3 −2−1 1

] [12

]−[3 40 0

] [ts

]=[−11

]−[3t + 4s

0

][x3

x4

]=[

ts

]We may wish to bring it in a more traditional form:

x1

x2

x3

x4

=

−1100

+

−3t − 4s

0ts

=

−1100

+ t

−3010

+ s

−4001

Of course, when we solving a singles system of equations, the formulae of the kind

Y1 = A−1B − A−1CY2

do not save time and effort, but in many applications you have to solve millions ofsystems of linear equations with the same matrix of coefficients but different right-hand parts, and in this situation shortcuts based on compound matrices become veryuseful.

Page 33: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 14 • Subspaces • Last change: 23 Apr 2018 33

Lecture 14: Subspaces of Rn [Lay 2.8]

Subspace. A subspace of Rn is any set H that has the properties

(a) 0 ∈ H.

(b) For each vectors u, v ∈ H, the sum u + v ∈ H.

(c) For each vector u ∈ H and each scalar c, cu ∈ H.

Rn is a subspace of itself.

{0 } is a subspace, called the zero subspace.

Span. Span{v1, . . . , vp } is the subspace spanned (or generated) by v1, . . . , vp.

The column space of a matrix A is the set Col A of all linear combinations of columnsof A.

The null space of a matrix A is the set Nul A of all solutions to the homogeneoussystem

Ax = 0

Theorem 2.8.12: The null space. The null space of an m×n matrix A is a subspaceof Rn.

Equivalently, the set of all solutions to a system

Ax = 0

of m homogeneous linear equations in n unknowns is a subspace of Rn.

Basis of a subspace. A basis of a subspace H of Rn is a linearly independent set inH that spans H.

Theorem 2.8.13: Pivot columns of a matrix A form a basis of Col A.

Dimension and rank [Lay 2.9]

Theorem: Given a basis b1, . . . , bp in a subspace H of Rn, every vector u ∈ H isuniquely expressed as a linear combination of b1, . . . , bp.

Solving homogeneous systems. Finding a parametric solution of a system of ho-mogeneous linear equations

Ax = 0

means to find a basis of Nul A.

Coordinate system. LetB = {b1, . . . , bp }

be a basis for a subspace H.

Page 34: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 14 • Subspaces • Last change: 23 Apr 2018 34

For each x ∈ H, the coordinates of x relative to the basis B are the weights

c1, . . . , cp

such thatx = c1b1 + · · · + cpbp.

The vector [x]B =

c1...

cp

is the coordinate vector of x.

Dimension. The dimension of a nonzero subspace H, denoted by dim H, is thenumber of vectors in any basis of H.

The dimension of the zero subspace {0} is defined to be 0.

Rank of a matrix. The rank of a matrix A, denoted by rank A, is the dimension of thecolumn space Col A of A:

rank A = dim Col A

The Rank Theorem 2.9.14: If a matrix A has n columns,

rank A + dim Nul A = n.

The Basis Theorem 2.9.15: Let H be a p-dimensional subspace of Rn.

• Any linearly independent set of exactly p elements in H is automatically a basisfor H.

• Also, any set of p elements of H that spans H is automatically a basis of H.

For example, this means that the vectors100

,

230

,

456

form a basis of R3: there are three of them and they are linearly independent (the lattershould be obvious to students at this stage).

The Invertible Matrix Theorem (continued) Let A be an n × n matrix. Then thefollowing statements are each equivalent to the statement that A is an invertible matrix.

(m) The columns of A form a basis of Rn.

(n) Col A = Rn.

(o) dim Col A = n.

(p) rank A = n.

(q) Nul A = {0}.

(r) dim Nul A = 0.

Page 35: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 15 • Introduction to determinants • Last change: 23 Apr 2018 35

Lecture 15: Introduction to determinants [Lay 3.1]

The determinant det A of a square matrix A is a certain number assigned to the matrix;it is defined recursively, that is, we define first determinants of matrices of sizes 1×1,2 × 2, and 3 × 3, and then supply a formula which expresses determinants of n × nmatrices in terms of determinants of (n − 1)× (n − 1) matrices.

The determinant of a 1× 1 matrix A =[a11]

is defined simply as being equal its onlyentry a11:

det[a11]

= a11.

The determinant of a 2× 2 matrix is defined by the formula

det[a11 a12

a21 a22

]= a11a22 − a12a21.

The determinant of a 3× 3 matrix

A =

a11 a12 a13

a21 a22 a23

a31 a32 a33

is defined by the formula

det

a11 a12 a13

a21 a22 a23

a31 a32 a33

= a11 ·[a22 a23

a32 a33

]− a12 ·

[a21 a23

a31 a33

]+ a13 ·

[a21 a22

a31 a32

]

Example. The determinant det A of the matrix

A =

2 0 70 1 01 0 4

equals

2 · det[1 00 4

]+ 7 · det

[0 11 0

]which further simplifies as

2 · 4 + 7 · (−1) = 8− 7 = 1.

Submatrices. By definition, the submatrix Ai j is obtained from the matrix A by crossingout row i and column j .

For example, if

A =

1 2 34 5 67 8 9

,

Page 36: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 15 • Introduction to determinants • Last change: 23 Apr 2018 36

then

A22 =[1 37 9

], A31 =

[2 35 6

]Recursive definition of determinant. For n > 3, the determinant of an n × n matrixA is defined as the expression

det A = a11 det A11 − a12 det A12 + · · · + (−1)1+na1n det A1n

=n∑

j=1

(−1)1+ja1j det A1j

which involves the determinants of smaller (n− 1)× (n− 1) submatrices A1j , which, intheir turn, can be evaluated by a similar formula wich reduces the calcualtions to the(n − 2) × (n − 2) case, and can be repeated all the way down to determinants of size2× 2.

Cofactors. The (i , j)-cofactor of A is

Ci j = (−1)i+j det Ai j

Thendet A = a11C11 + a12C12 + · · · + a1nC1n

is cofactor expansion across the first row of A.

Theorem 3.1.1: Cofactor expansion. For any row i , the result of the cofactor expan-sion across the row i is the same:

det A = ai1Ci1 + ai2Ci2 + · · · + ainCin

The chess board pattern of signs in cofactor expansions. The signs

(−1)i+j

which appear in the formula for cofactors, form the easy-to-recognise and easy-to-remember “chess board” pattern:

+ − + · · ·− + −+ − +... . . .

Theorem 3.1.2: The determinant of a triangular matrix. If A is a triangular n × nmatrix then det A is the product of the diagonal entries of A.

Page 37: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 15 • Introduction to determinants • Last change: 23 Apr 2018 37

Proof: This proof contains more details than the one given in the textbook. It is basedon induction on n, which, to avoid the use of “general” notation is illustrated by a simpleexample. Let

A =

a11 0 0 0 0a21 a22 0 0 0a31 a32 a33 0 0a41 a42 a43 a44 0a51 a52 a53 a54 a55

.

All entries in the first row of A–with possible exception of a11—are zeroes,

a12 = · · · = a15 = 0,

therefore in the formula

det A = a11 det A11 + · · · + a55 det A55

all summand with possible exception of the first one,

a11 det A11,

are zeroes, and therefore

det A = a11 det A11

= a11 det

a22 0 0 0a32 a33 0 0a42 a43 a44 0a52 a53 a54 a55

.

But the smaller matrix A11 is also lower triangle, and therefore we can conclude byinduction that

det

a22 0 0 0a32 a33 0 0a42 a43 a44 0a52 a53 a54 a55

= a22 · · · a55

hence

det A = a11 · (a22 · · · a55)= a11a22 · · · a55

is the product of diagonal entries of A.

The basis of induction is the case n = 2; of course, in that case

det[a11 0a21 a22

]= a11a22 − 0 · a21

= a11a22

is the product of the diagonal entries of A.

Page 38: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 15 • Introduction to determinants • Last change: 23 Apr 2018 38

Corollary. The determinant of a diagonal matrix equals is the product of its diagonalelements:

det

d1 0 · · · 00 d2 0... . . . ...0 · · · dn

= d1d2 · · · dn.

Corollary. The determinant of the identity matrix equals 1:

det In = 1.

Corollary. The determinant of the zero matrix equals 0:

det 0 = 0.

Page 39: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 15–16 • Properties of determinants • Last change: 23 Apr 2018 39

Lectures 15–16: Properties of determinants [Lay 3.2]

Theorem 3.2.3: Row Operations. Let A be a square matrix.

(a) If a multiple of one row of A is added to another row to produce a matrix B, then

det B = det A.

(b) It two rows of A are swapped to produce B, then

det B = −det A.

(c) If one row of A is multiplied by k to produce B, then

det B = k det A.

Theorem 3.2.5: The determinant of the transposed matrix. If A is an n × n matrixthen

det AT = det A.

Example. Let

A =

1 2 00 1 00 3 4

,

then

AT =

1 0 02 1 30 0 4

and

det A = 1 · det[1 03 4

]

−2 · det[0 00 4

]

+0 · det[0 10 3

]= 1 · 4− 2 · 0 + 0 · 0= 4.

Similarly

det AT = 1 · det[1 30 4

]+ 0 + 0

= 1 · 4 = 4;

Page 40: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 15–16 • Properties of determinants • Last change: 23 Apr 2018 40

we got the same value.

Corollary: Cofactor expansion across a column. For any column j ,

det A = a1jC1j + a2jC2j + · · · + anjCnj

Example. We have already computed the determinant of the matrix

A = det

2 0 70 1 01 0 4

by expansion across the first row. Now we do it by expansion across the third column:

det A = 7 · (−1)1+3 · det[0 11 0

]

+0 · (−1)2+3 · det[2 01 0

]

+4 · (−1)3+3 · det[2 00 1

]= −7− 0 + 8= 1.

Proof: Columns of A are rows of AT which has the same determinant as A.

Corollary: Column operations. Let A be a square matrix.

(a) If a multiple of one column of A is added to another column to produce a matrixB, then

det B = det A.

(b) It two columns of A are swapped to produce B, then

det B = −det A.

(c) If one column of A is multiplied by k to produce B, then

det B = k det A.

Proof: Column operations on A are row operation of AT which has the same determi-nant as A.

Computing determinants. In computations by hand, the quickest method of comput-ing determinants is to work with both columns and rows:

• If a row or a column has a convenient scalar factor, take it out of the determinant.

Page 41: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 15–16 • Properties of determinants • Last change: 23 Apr 2018 41

• If convenient, swap two rows or two columns— but do not forget to change thesign of the determinant.

• Adding to a row (column) scalar multiples of other rows (columns), simplify thematrix to create a row (column) with just one nonzero entry.

• Expand across this row (column).

• Repeat until you get the value of the determinant.

Example.

det

1 0 31 3 11 1 −1

C3−3C1= det

1 0 01 3 −21 1 −4

2 out of C3= 2 · det

1 0 01 3 −11 1 −2

−1 out of C3= −2 · det

1 0 01 3 11 1 2

expand

= −2 · 1 · (−1)1+1 · det[3 11 2

]R1−3R2= −2 · det

[0 −51 2

]R1↔R2= −2 · (−1) · det

[1 20 −5

]= 2 · (−5)= −10.

Example. Compute the determinant

∆ = det

1 1 1 1 01 1 1 0 11 1 0 1 11 0 1 1 10 1 1 1 1

Solution: Subtracting Row 1 from Rows 2, 3, and 4, we rearrange the determinant as

∆ = det

1 1 1 1 00 0 0 −1 10 0 −1 0 10 −1 0 0 10 1 1 1 1

Page 42: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 15–16 • Properties of determinants • Last change: 23 Apr 2018 42

After expanding the determinant across the first column, we get

∆ = 1 · (−1)1+1 · det

0 0 −1 10 −1 0 1−1 0 0 11 1 1 1

= det

0 0 −1 10 −1 0 1−1 0 0 11 1 1 1

R4+R3= det

0 0 −1 10 −1 0 1−1 0 0 10 1 1 2

After expansion across the 1st column

∆ = (−1) · (−1)3+1 · det

0 −1 1−1 0 11 1 2

= −det

0 −1 1−1 0 11 1 2

R3+R2= −det

0 −1 1−1 0 10 1 3

After expanding the determinant across the first column we have

∆ = −(−1) · (−1)2+1 · det[−1 11 3

]

= −det[−1 11 3

]R3+R2= −det

[−1 10 4

]= −(−4)= 4.

As an exercise, I leave you with this question: wouldn’t you agree that the determinantof the similarly constructed matrix of size n× n should be ±(n− 1)? But how can onedetermine the correct sign?

Page 43: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 15–16 • Properties of determinants • Last change: 23 Apr 2018 43

And one more exercise: you should now be able to instantly compute

det

1 2 3 4 01 2 3 0 51 2 0 4 51 0 3 4 50 2 3 4 5

.

Theorem 3.2.4: Invertible matrices. A square matrix A is invertible if and only if

det A 6= 0.

Recall that this theorem has been already known to us in the case of 2×2 matrices A.

Example. The matrix

A =

2 0 70 1 01 0 4

has the determinant

det A = 2 · det[1 00 4

]+ 7 · det

[0 11 0

]= 2 · 4 + 7 · (−1)= 8− 7 = 1

hence A is invertible. Indeed,

A−1 =

4 0 −70 1 0−1 0 2

—check!

Theorem 3.2.6: Multiplicativity Property. If A and B are n × n matrices then

det AB = (det A) · (det B)

Example. Take

A =[1 03 2

]and B =

[1 50 1

],

thendet A = 2 and det B = 1.

But

AB =[1 03 2

] [1 50 1

]

=[1 53 17

]

Page 44: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 15–16 • Properties of determinants • Last change: 23 Apr 2018 44

anddet(AB) = 1 · 17− 5 · 3 = 2,

which is exactly the value of(det A) · (det B).

Corollary. If A is invertible,det A−1 = (det A)−1.

Proof. Set B = A−1, thenAB = I

and Theorem 3.2.6 yieldsdet A · det B = det I = 1.

Hencedet B = (det A)−1.

Cramer’s Rule [Lay 3.3]

Cramer’s Rule is an explicit (closed) formula for solving systems of n linear equationswith n unknowns and nonsigular (invertible) matrix of coefficients. It has importanttheoretical value, but is unsuitable for practical application.

For any n× n matrix A and any b ∈ Rn, denote by Ai(b) the matrix obtained from A byreplacing column i by the vector b:

Ai(b) =[a1 · · · ai−1 b ai+1 · · · an

].

Theorem 3.3.7: Cramer’s Rule. Let A be an invertible n × n matrix. For any b ∈ Rn,the unique solution x of the linear system

Ax = b

is given by

xi =det Ai(b)

det A, i = 1, 2, . . . , n.

For example, for a system

x1 + x2 = 3x1 − x2 = 1

Page 45: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 15–16 • Properties of determinants • Last change: 23 Apr 2018 45

Cramer’s rule gives the answer

x1 =det[3 11 −1

]det[1 11 −1

] =−4−2

= 2

x2 =det[1 31 1

]det[1 11 −1

] =−2−2

= 1

Theorem 3.3.8: An Inverse Formula. Let A be an invertible n × n matrix. Then

A−1 =1

det A

C11 C21 · · · Cn1

C12 C22 · · · Cn2...

......

C1n C2n · · · Cnn

where cofactors Cj i are given by

Cj i = (−1)j+i det Aj i

and Aj i is the matrix obtained from A by deleting row j and column i .

Notice that for a 2× 2 matrix

A =[a bc d

]the cofactors are

C11 = (−1)1+1 · d = dC21 = (−1)2+1 · b = −bC12 = (−1)1+2 · c = −cC22 = (−1)2+2 · a = a,

and we get the familiar formula

A−1 =1

det A

[d −b−c a

]

=1

ad − bc

[d −b−c a

].

Page 46: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 17 • Eigenvalues and eigenvectors • Last change: 23 Apr 2018 46

Lecture 17: Eigenvalues and eigenvectors

Quiz

What is the value of this determinant?

∆ = det

1 2 30 2 31 2 6

Quiz

Is Γ positive, negative, or zero?

Γ = det

0 0 710 93 0

87 0 0

Eigenvectors. An eigenvector of an n × n matrix A is a nonzero vector x such that

Ax = λx

for some scalar λ.

Eigenvalues. A scalar λ is called an eigenvalue of A if there is a non-trivial solutionx of

Ax = λx;

x is called an eigenvector corresponding to λ.

Eigenvalue. A scalar λ is an eigenvalue of A iff the equation

(A− λI)x = 0

has a non-trivial solution.

Eigenspace. The set of all solutions of

(A− λI)x = 0

is a subspace of Rn called the eigenspace of A corresponding to the eigenvalue λ.

Theorem: Linear independence of eigenvectors. If v1, . . . , vp are eigenvectors thatcorrespond to distinct eigenvalues of λ1, . . . , λp of an n × n matrix A, then the set

{v1, . . . , vp }

is linearly independent.

Page 47: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 17 • The characteristic equation • Last change: 23 Apr 2018 47

Lecture 18: The characteristic equation

Characteristic polynomial

The polynomialdet(A− λI)

in variable λ is characteristic polynomial of A.

For example, in the 2× 2 case

det[a− λ b

c d − λ

]= λ2 − (a + d)λ + (ad − bc).

det(A− λI) = 0

is the characteristic equation for A.

Characterisation of eigenvalues

Theorem. A scalar λ is an eigenvalue of an n× n matrix A if and only if λ satisfies thecharacteristic equation

det(A− λI) = 0

Zero as an eigenvalue. λ = 0 is an eigenvalue of A if and only if det A = 0.

The Invertible Matrix Theorem (continued). An n × n matrix A is invertible iff:

(s) The number 0 is not an eigenvalue of A.

(t) The determinant of A is not zero.

Theorem: Eigenvalues of a triangular matrix. The eigenvalues of a triangular matrixare the entries on its main diagonal.

Proof. This immediately follows from the fact the the determinant of a triangular ma-trices is the product of its diagonal elements. Therefore, for example, for the 3 × 3triangular matrix

A =

d1 a b0 d2 c0 0 d3

its characteristic polynomial det(A− λI) equals

det

d1 − λ a b0 d2 − λ c0 0 d3 − λ

and therefore

det(A− λI) = (d1 − λ)(d2 − λ)(d3 − λ)

has roots (eigenvalues of A)λ = d1, d2, d3.

Page 48: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 18–21 • Diagonalisation 48

Lectures 19–21: Diagonalisation • Last change: 23 Apr2018

Similar matrices. A is similar to B if there exist an invertible matrix P such that

A = PBP−1.

Example:

Occasionally the similarity relation is denoted by symbol ∼.

Similarity is an equivalence relation: it is

• reflexive: A ∼ A

• symmetric: A ∼ B implies B ∼ A

• transitive: A ∼ B and B ∼ C implies A ∼ C.

Conjugation. OperationAP = P−1AP

is called conjugation of A by P.

Properties of conjugation

• IP = I

• (AB)P = APBP ; as a corollary:

• (A + B)P = AP + BP

• (c · A)P = c · AP

• (Ak )P = (AP)k

• (A−1)P = (AP)−1

• (AP)Q = APQ

Theorem: Similar matrices have the same characteristic polynomial. If matricesA and B are similar then they have the same characteristic polynomials and eigenval-ues.

Diagonalisable matrices. A square matrix A is diagonalisable if it is similar to adiagonal matrix, that is,

A = PDP−1

for some diagonal matrix D and some invertible matrix P.

Of course, the diagonal entries of D are eigenvalues of A.

The Diagonalisation Theorem. An n×n matrix A is diagonalisable iff A has n linearlyindependent eigenvectors. In fact,

A = PDP−1

Page 49: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 18–21 • Diagonalisation 49

where D is diagonal iff the columns of P are n linearly independent eigenvectors of A.

Theorem: Matrices with all eigenvalues distinct. An n × n matrix with n distincteigenvalues is diagonalisable.

Example: Non-diagonalisable matrices

A =[2 10 2

]has repeated eigenvalues λ1 = λ2 = 2.

A is not diagonalisable. Why?

Page 50: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture • Vector spaces • Last change: 23 Apr 2018 50

Lecture 22: Vector spaces

A vector space is a non-empty space of elements (vectors), with operations of addi-tion and multiplication by a scalar.

By definition, the following holds for all u, v, w in a vector space V and for all scalars cand d .

1. The sum of u and v is in V .

2. u + v = v + u.

3. (u + v) + w = u + (v + w).

4. There is zero vector 0 such that u + 0 = u.

5. For each u there exists −u such that u + (−u) = 0.

6. The scalar multiple cu is in V .

7. c(u + v) = cu + cv.

8. (c + d)u = cu + du.

9. c(du) = (cd)u.

10. 1u = u.

Examples. Of course, the most important example of vector spaces is provided bystandard spaces Rn of column vectors with n components, with the usual operationsof component-wise addition and multiplication by scalar.

Another example is the set Pn of polynomials of degree at most n in variable x ,

Pn = {a0 + a1x + · · · + anxn}

with the usual operations of addition of polynomials multiplication by constant.

And here is another example: the set C[0, 1] of real-valued continuous functions onthe segment [0, 1], with the usual operations of addition of functions and multiplicationby constant.

Definitions

Most concepts introduced in the previous lectures for the vector spaces Rn can betransferred to arbitrary vector spaces. Let V be a vector space.

Given vectors v1, v2, . . . , vp in V and scalars c1, c2, . . . , cp, the vector

y = c1v1 + · · · cpvp

is called a linear combination of v1, v2, . . . , vp with weights c1, c2, . . . , cp.

Page 51: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture • Vector spaces • Last change: 23 Apr 2018 51

If v1, . . . , vp are in V , then the set of all linear combination of v1, . . . , vp is denoted bySpan{v1, . . . , vp} and is called the subset of V spanned (or generated) by v1, . . . , vp.

That is, Span{v1, . . . , vp} is the collection of all vectors which can be written in the form

c1v1 + c2v2 + · · · + cpvp

with c1, . . . , cp scalars.

Span{v1, . . . , vp} is a vector subspace of V , that is, it is closed with respect to addi-tion of vectors and multiplying vectors by scalars.

V is a subspace of itself.

{0 } is a subspace, called the zero subspace.

An indexed set of vectors{v1, . . . , vp }

in V is linearly independent if the vector equation

x1v1 + · · · + xpvp = 0

has only trivial solution.

The set{v1, . . . , vp }

in V is linearly dependent if there exist weights c1, . . . , cp, not all zero, such that

c1v1 + · · · + cpvp = 0

Theorem: Characterisation of linearly dependent sets. An indexed set

S = {v1, . . . , vp }

of two or more vectors is linearly dependent if and only if at least one of the vectors inS is a linear combination of the others.

A basis of V is a linearly independent set which spans V . A vector space V is calledfinite dimensional if it has a finite basis. Any two bases in a finite dimensional vectorspace have the same number of vectors; this number is called the dimension of Vand is denoted dim V .

If B = (b1, . . . , bn) is a basis of V , every vector x ∈ V can be written, and in a uniqueway, as a linear combination

x = x1b1 + · · · xnbn;

the scalars x1, . . . , xn are called coordinates of x with respect to the basis B.

Page 52: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 23 and 24 • Linear transformations • Last change: 23 Apr 2018 52

Lectures 23–24: Linear transformations of abstract vec-tor spaces

A transformation T from a vector space V to a vector space W is a rule that assignsto each vector x in V a vector T (x) in W .

The set V is called the domain of T , the set W is the codomain of T .

A transformationT : V −→W

is linear if:

• T (u + v) = T (u) + T (v) for all vectors u, v ∈ V ;

• T (cu) = cT (u) for all vectors u and all scalars c.

Properties of linear transformations. If T is a linear transformation then

T (0) = 0

andT (cu + dv) = cT (u) + dT (v).

The identity transformation of V is

V −→ Vx 7→ x.

The zero transformation of V is

V −→ Vx 7→ 0.

IfT : V −→W

is a linear transformation, its kernel

Ker T = {x ∈ V : T (x) = 0}

is a subspace of V , while its image

Im T = {y ∈W : T (x) = y for some x ∈ V}

is a subspace of W .

Page 53: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 25 • Symmetric matrices and inner product • Last change: 23 Apr 2018 53

Lecture 25: Symmetric matrices and inner product

Symmetric matrices. A matrix A is symmetric if AT = A.

An example:

A =

1 2 32 3 43 4 5

.

Notice that symmetric matrices are necessarily square.

Inner (or dot) product. For vectors u, v ∈ Rn their inner product (also called scalarproduct or dot product) u �v is defined as

u �v = uT v

=[u1 u2 · · · un

]

v1

v2...

vn

= u1v1 + u2v2 + · · · + unvn

Properties of dot product

Theorem 6.1.1. Let u, v, w ∈ Rn, and c be a scalar. Then

(a) u �v = v �u

(b) (u + v) �w = u �w + v �w

(c) (cu) �v = c(u �v)

(d) u �u > 0, and u �u = 0 if and only if u = 0

Properties (b) and (c) can be combined as

(c1u1 + · · · + cpup) �w = c1(u1 �w) + · · · + cp(up �w)

The length of a vector v is defined as

‖v‖ =√

v �v =√

v21 + v2

2 + · · · + v2n

In particular,‖v‖2 = v �v.

Page 54: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 25 • Symmetric matrices and inner product • Last change: 23 Apr 2018 54

We call v a unit vector if ‖v‖ = 1.

Orthogonal vectors. Vectors u and v are orthogonal to each other if

u �v = 0

Theorem. Vectors u and v are orthogonal if and only if

‖u‖2 + ‖v‖2 = ‖u + v‖2.

That is, vectors u and v are orthogonal if and only if the Pythagoras Theorem holdsfor the triangle formed by u and v as two sides (so that its third side is u + v).

Proof is a straightforward computation:

‖u + v‖2 = (u + v) � (u + v)= u �u + u �v + v �u + v �v= u �u + u �v + u �v + v �v= u �u + 2u �v + v �v= ‖u‖2 + 2u �v + ‖v‖2.

Hence‖u + v‖2 = ‖u‖2 + ‖v‖2 + 2u �v,

and‖u + v‖2 = ‖u‖2 + ‖v‖2 iff u �v = 0.

Orthogonal sets. A set of vectors

{u1, . . . , up }

in Rn is orthogonal ifui �uj = 0 whenever i 6= j .

Theorem 6.2.4. IfS = {u1, . . . , up }

is an orthogonal set of non-zero vectors in Rn then S is linearly independent.

Proof. Assume the contrary that S is linearly dependent. This means that there existscalars c1, . . . , cp, not all of them zeroes, such that

c1u1 + · · · + cpup = 0.

Forming the dot product of the left hand side and the right hand side of this equationwith ui , we get

(c1u1 + · · · + cpup) �ui = 0 �ui = 0

Page 55: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 25 • Symmetric matrices and inner product • Last change: 23 Apr 2018 55

After opening the brackets we have

c1u1 �ui + · · · + ci−1ui−1 + ciui �ui + ci+1ui+1 �ui + · · · + cpup �ui = 0.

In view of orthogonality of the set S, all dot products on the left hand side, with theexception of ui �u, equal 0. Hence what remains from the equality is

ciui �ui = 0

Since ui is non-zero,ui �ui 6= 0

and therefore ci = 0. This argument works for every index i = 1, . . . , p. We get acontradition with our assumption that one of ci is non-zero. �

An orthogonal basis for Rn is a basis which is also an orthogonal set.

For example, the two vectors [11

],[

1−1

]form an orthogonal basis of R2 (check!).

Theorem: Eigenvectors of symmetric matrices. Let

v1, . . . , vp

be eigenvectors of a symmetric matrix A for pairwise distinct eigenvalues

λ1, . . . , λp.

Then{v1, . . . , vp }

is an orthogonal set.

Proof. We need to prove the following:

If u and v are eigenvectors for A for eigenvalues λ 6= µ, then

u �v = 0.

For a proof, consider the following sequence of equalities:

λu �v = (λu) �v= (Au) �v= (Au)T v= (uT AT )v= (uT A)v= uT (Av)= uT (µv)= µuT v= µu �v.

Page 56: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 25 • Symmetric matrices and inner product • Last change: 23 Apr 2018 56

Henceλu �v = µu �v

and(λ− µ)u �v = 0.

Since λ− µ 6= 0, we have u �v = 0. �

Corollary. If A is an n × n symmetric matrix with n distinct eigenvalues

λ1, . . . , λn

then the corresponding eigenvectors

v1, . . . , vn

form an orthogonal basis of Rn.

An orthonormal basis in Rn is an orthogonal basis

u1, . . . , un

made of unit vectors,‖ui‖ = 1 for all i = 1, 2, . . . , n.

Notice that this definition can reformulated as

ui �uj ={

1, if i = j0, if i 6= j .

Theorem: Coordinates with respect to an orthonormal basis. If

{u1, . . . , un }

is an orthonormal basis and v a vector in Rn, then

v = x1u1 + · · · + xnun

wherexi = v �ui , for all i = 1, 2, . . . , n.

Proof. Letv = x1u1 + · · · + xnun,

then, for i = 1, 2, . . . , n,

v �ui = x1u1 �ui + · · · + xnun �ui

= xiui �ui

= xi .

Theorem: Eigenvectors of symmetric matrices. Let A be a symmetric n× n matrixwith n distinct eigenvalues

λ1, . . . , λn.

Then Rn has an orthonormal basis made of eigenvectors of A.

Page 57: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 26 • Orthogonal matrices • Last change: 23 Apr 2018 57

Lecture 26: Orthogonal matrices

A square matrix A is said to be orthogonal if

AAT = I.

Some basic properties of orthogonal matrices:

If A is orthogonal then

• AT is also orthogonal.

• A is invertible and A−1 = AT .

• det A = ±1.

• The identity matrix is orthogonal.

An example of an orthogonal matrix:

A =

[√2

2

√2

2√2

2 −√

22

]

Theorem: Characterisation of Orthogonal Matrices. For a square n × n matrix A,the following conditions are equivalent:

(a) A is orthogonal .

(b) Columns of A form an orthogonal basis of Rn.

Page 58: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 25 and 26 • Inner product spaces • Last change: 23 Apr 2018 58

Lectures 25 and 26: Inner product spaces

Inner (or dot) product is a function which associate, with each pair of vectors u andv in a vector space V a real number denoted

u �v,

subject to the following axioms:

1. u �v = v �u

2. (u + v) �w = u �w + v �w

3. (cu) �v = c(u �v)

4. u �u > 0 and u �u = 0 if and only if u = 0

Inner product space. A vector space with an inner product is called an inner productspace.

Example: School Geometry. The ordinary Euclidean plane of school geometry is aninner product space:

• Vectors: directed segments starting at the origin O

• Addition: parallelogram rule

• Product-by-scalar: stretching the vector by factor of c.

• Dot product:u �v = ‖u‖‖v‖ cos θ,

where θ is the angle between vectors u and v.

Example: C[0, 1]. The vector space C[0, 1] of real-valued continuous functions onthe segment [0, 1] becomes an inner product space if we define inner product by theformula

f �g =∫ 1

0f (x)g(x)dx .

In this example, the tricky bit is to show that the dot product on C[0, 1] satisfies theaxiom:

u �u > 0 and u �u = 0 if and only if u = 0,

that is, if f is a continuous function on [0, 1] and∫ 1

0f (x)2dx = 0

then f (x) = 0 for all x ∈ [0, 1]. This requires the use of properties of continuous func-tions; since we study linear algebra, not analysis, I am leaving it to the readers as an

Page 59: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 25 and 26 • Inner product spaces • Last change: 23 Apr 2018 59

exercise.

Length. The length of the vector u is defined as

‖u‖ =√

u �u.

Notice that‖u‖2 = u �u,

and‖u‖ = 0 ⇔ u = 0.

Orthogonality. We say that vectors u and v are orthogonal if

u �v = 0.

The Pythagoras Theorem. Vectors u and v are orthogonal if and only if

‖u‖2 + ‖v‖2 = ‖u + v‖2.

Proof is a straightforward computation, exactly the same as in Lectures 25–27:

‖u + v‖2 = (u + v) � (u + v)= u �u + u �v + v �u + v �v= u �u + u �v + u �v + v �v= u �u + 2u �v + v �v= ‖u‖2 + 2u �v + ‖v‖2.

Hence‖u + v‖2 = ‖u‖2 + ‖v‖2 + 2u �v,

and‖u + v‖2 = ‖u‖2 + ‖v‖2

if and only ifu �v = 0.

The Cauchy-Schwarz Inequality. In the Euclidean plane,

u �v = ‖u‖‖v‖ cos θ

hence|u �v| 6 ‖u‖‖v‖.

The following Theorem shows that this is is a general property of inner product spaces.

Page 60: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 25 and 26 • Inner product spaces • Last change: 23 Apr 2018 60

Theorem: The Cauchy-Schwarz Inequality. In any inner product space,

|u �v| 6 ‖u‖‖v‖.

The Cauchy-Schwarz Inequality: an example. In the vector space Rn with the dotproduct of

u =

u1...

un

and v =

v1...

vn

defined as

u �v = uT v = u1v1 + · · · + unvn,

the Cauchy-Schwarz Inequality becomes

|u1v1 + · · · + unvn| 6√

u21 + · · · + u2

n ·√

v21 + · · · + v2

n .

or, which is its equivalent form,

(u1v1 + · · · + unvn)2 6 (u21 + · · · + u2

n) · (v21 + · · · + v2

n ).

The Cauchy-Schwarz Inequality: one more example. In the inner product spaceC[0, 1] the Cauchy-Schwarz Inequality takes the form

∣∣∣∣∫ 1

0f (x)g(x)dx

∣∣∣∣ 6√∫ 1

0f (x)2dx ·

√∫ 1

0g(x)2dx ,

or, equivalently,(∫ 1

0f (x)g(x)dx

)2

6

(∫ 1

0f (x)2dx

)·(∫ 1

0g(x)2dx

).

Proof of the Cauchy-Schwarz Inequality given here is different from the one in thetextbook by Lay. Our proof is based on the following simple fact from school algebra:

Letq(t) = at2 + bt + c

be a quadratic function in variable t with the property that

q(t) > 0

for all t . Thenb2 − 4ac 6 0.

Page 61: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 25 and 26 • Inner product spaces • Last change: 23 Apr 2018 61

Now consider the function q(t) in variable t defined as

q(t) = (u + tv) � (u + tv)= u �u + 2tu �v + t2v �v= ‖u‖2 + (2u �v)t + (‖v‖2)t2.

Notice q(t) is a quadratic function in t and

q(t) > 0.

Hence(2u �v)2 − 4‖u‖2‖v‖2 6 0

which can be simplified as|u �v| 6 ‖u‖‖v‖.

Distance. We define distance between vectors u and v as

d(u, v) = ‖u− v‖.

It satisfies axioms of metric:

1. d(u, v) = d(v, u).

2. d(u, v) > 0.

3. d(u, v) = 0 iff u = v.

4. The Triangle Inequality:

d(u, v) + d(v, w) > d(u, w).

Axioms 1–3 immediately follow from the axioms for dot product, but the Triangle In-equality requires some attention.

Proof of the Triangle Inequality. It suffices to prove

‖u + v‖ 6 ‖u‖ + ‖v‖,

or‖u + v‖2 6 (‖u‖ + ‖v‖)2,

or(u + v) � (u + v) 6 ‖u‖2 + 2‖u‖‖v‖ + ‖v‖2,

oru �u + 2u �v + v �v 6 u �u + 2‖u‖‖v‖ + v �v,

or2u �v 6 2‖u‖‖v‖

But this is the Cauchy-Schwarz Inequality. Now observe that all rearrangements arereversible, hence the Triangle Inequality holds. �

Page 62: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lecture 27 • Orthogonalisation and the Gram-Schmidt Process • Last change: 23 Apr 201862

Lecture 27: Orthogonalisation and the Gram-SchmidtProcess

Orthogonal basis. A basis v1, . . . , vn in the inner product space V is called orthogo-nal if vi �vj = 0 for i 6= j .

Coordinates in respect to an orthogonal basis:

u = c1v1 + · · · + cnvn

iff

ci =u �vi

vi �vi

Orthonormal basis. A basis v1, . . . , vn in the inner product space V is called or-thonormal if it is orthogonal and ‖vi‖ = 1 for all i .

Equivalently,

vi �vj ={

1 if i = j0 if i 6= j .

Coordinates in respect to an orthonormal basis:

u = c1v1 + · · · + cnvn

iffci = u �vi

The Gram-Schmidt Orthogonalisation Process makes an orthogonal basis from abasis x1, . . . , xp:

v1 = x1

v2 = x2 −x2 �v1

v1 �v1v1

v3 = x3 −x3 �v1

v1 �v1v1 −

x3 �v2

v2 �v2v2

...

vp = xp −xp �v1

v1 �v1v1 −

xp �v2

v2 �v2v2 − · · · −

xp �vp−1

vp−1 �vp−1vp−1

Main Theorem about inner product spaces. Every finite dimensional inner productspace has an orthonormal basis and is isomorphic to on of Rn with the standard dotproduct

u �v = uT v =[u1 · · · un

] v1...

vn

.

Page 63: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 28–30 • Revision • Last change: 23 Apr 2018 63

Lectures 28–30: Revision, Systems of Linear Equations

Systems of linear equations

Here A is an m × n matrix.

We associate with A systems of simultaneous linear equations

Ax = b,

where b ∈ Rm and

x =

x1...

xn

is the column vector of unknowns.

Especially important is the homogeneous system of simultaneous linear equations

Ax = 0.

The setnull A = {x ∈ Rn : Ax = 0}

is called the null space of A; it is a vector subspace of Rn and coincides with thesolution space of the homogeneous system Ax = 0.

If a1, . . . , an are columns of A, so that

A =[a1 · · · an

],

then the column space of A is defined as

Col A = {c1a1 + · · · + cnan : ci ∈ R}= Span {a1, . . . , an}

and equals to the span of the system of vectors a1, . . . , an, that is, the set of all possiblelinear combinations of vectors a1, . . . , an.

The column space of A has another important characterisation:

Col A = {b ∈ Rm : Ax = b has a solution}.

Assume now that A is a square n × n matrix.

If we associate with A the linear transformation

TA : Rn −→ Rn

v 7→ Av

Page 64: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 28–30 • Revision • Last change: 23 Apr 2018 64

then the column space of A gets yet another interpretation: it is the image of the lineartransformation TA:

Col A = Im TA

= {v ∈ Rn : ∃v ∈ Rn s.t. TA(w) = v},

and the null space of A is the kernel of TA:

null A = ker TA

= {v ∈ R : TA(v) = 0}.

Page 65: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 28–30 • Revision • Last change: 23 Apr 2018 65

Linear dependence

If a1, . . . , ap are vectors in a vector space V , an expression

c1a1 + · · · + cpap, ci ∈ R

is called a linear combination of the vectors a1, . . . , ap, and coefficients ci are calledweights in this linear combination. If

c1a1 + · · · + cpap = 0

we say that weights c1, . . . , cp define a linear dependency of vectors a1, . . . , ap. Wealways have a trivial (or zero) dependency, in which all ci = 0. We say that vec-tors a1, . . . , ap are linearly dependent if the admit a non-zero (or non-trivial) lineardependency, that is, a dependency in which at least one weight ci 6= 0.

Let us arrange the weights c1, . . . , cp in a column

c =

c1...

cp

and form a matrix A using vectors a1, . . . , ap as columns, then

c1a1 + · · · + cpap =[a1 · · · ap

] c1...

cp

= Ac

and linear dependencies between vectors a1, . . . , ap are nothing else but solutions ofthe homogeneous system of linear equation

Ax = 0.

Therefore vectors a1, . . . , ap are linearly dependent if and only if the system

Ax = 0

has a non-zero solution.

Elementary row transformation

Elementary row transformations

Ri ↔ Rj , i 6= jRi ← Ri + λRj , i 6= jRi ← λRi , λ 6= 0

Page 66: MATH10212 Linear Algebra Lecture Notesavb/10212_pdf/10212_Lectures_Sans.… · MATH10212 Linear Algebra Lecture ... A system of simultaneous linear equations is a collection of one

MATH10212 • Linear Algebra B • Lectures 28–30 • Revision • Last change: 23 Apr 2018 66

performed on a matrix A amount to multiplication of A on the left by correspondingelementary matrices,

A← EA,

and therefore do not change dependencies between columns:

Ac = 0⇔ (EA)c = 0.

Therefore if certain columns of A were linearly dependent (respectively, independent)then the same columns of EA remain linearly dependent (respectively, independent)

Rank of a matrix

We took it without proof that if U is a vector subspace of Rn, then the maximal systemsof linearly independent subsets in U contain the same number of vectors. This numberis called the dimension of U and is denoted dim U.

A maximal system of linearly independent vectors in U is called a basis of U.

Each basis of U contains dim U vectors.

An important theorem:dim null A + dim Col A = n

dim Col A is called the rank of A and is denoted

rank A = dim Col A.

Thereforedim null A + rank A = n

.

Theorem. If rank A = p then among columns of A there are p linearly independentcolumns

Theorem. Since elementary row transformations of A do not change dependency ofcolumns, e=elementary row operation do not change rank A.