MT2025 Linear Algebra Lecture Notes


Remaining TODOs: 30

Relevant reading:

For chapters 1-5: Jim Hefferon. Linear Algebra.

For chapter 6: Lloyd N. Trefethen & David Bau. Numerical Linear Algebra.


1 Linear systems

1.i Solving Linear Systems

Definition 1.1.1: A linear combination of variables ๐‘ฅ1,๐‘ฅ2,โ€ฆ,๐‘ฅ๐‘› has the form ๐‘Ž1๐‘ฅ1+๐‘Ž2๐‘ฅ2+โ€ฆ+๐‘Ž๐‘›๐‘ฅ๐‘›, with ๐‘Ž1,โ€ฆ,๐‘Ž๐‘›โˆˆโ„.
Definition 1.1.2: A linear equation has the form ๐‘Ž1๐‘ฅ1+โ€ฆ+๐‘Ž๐‘›๐‘ฅ๐‘›=๐‘‘, ๐‘‘โˆˆโ„. An ๐‘›-tuple (๐‘†1,โ€ฆ,๐‘†๐‘›) is a solution of that equation, or satisfies that equation, if substituting ๐‘ฅ๐‘– for ๐‘†๐‘– gives a true statement.

In a system of equations, the ๐‘›th row is denoted with the Greek letter rho as ๐œŒ๐‘›.

Definition 1.1.3: Elementary row operations are operations that can be carried out on a system of linear equations without changing the solution set.

These operations, all affecting row ๐‘–, are:

  1. swapping two rows, ๐œŒ๐‘—โ†”๐œŒ๐‘–, where ๐‘–โ‰ ๐‘—;
  2. scaling a row, ๐‘›๐œŒ๐‘– where ๐‘›โˆˆโ„\{0};
  3. adding one row to another row, ๐‘›๐œŒ๐‘—+๐œŒ๐‘–, where ๐‘›โˆˆโ„\{0} and ๐‘–โ‰ ๐‘—.

Lemma 1.1.4: Elementary row operations preserve the solution set of a linear system.

Proof:

Consider some system of linear equations

๐‘Ž1,1๐‘ฅ1+๐‘Ž1,2๐‘ฅ2+โ€ฆ+๐‘Ž1,๐‘›๐‘ฅ๐‘›=๐‘‘1;๐‘Ž2,1๐‘ฅ1+๐‘Ž2,2๐‘ฅ2+โ€ฆ+๐‘Ž2,๐‘›๐‘ฅ๐‘›=๐‘‘2;โ‹ฎ๐‘Ž๐‘–,1๐‘ฅ1+๐‘Ž๐‘–,2๐‘ฅ2+โ€ฆ+๐‘Ž๐‘–,๐‘›๐‘ฅ๐‘›=๐‘‘๐‘–.

For the tuple (๐‘†1,๐‘†2,โ€ฆ,๐‘†๐‘›) to satisfy this system of equations, we must have that ๐‘Ž1,1๐‘†1+โ€ฆ+๐‘Ž1,๐‘›๐‘†๐‘›=๐‘‘1 and that ๐‘Ž2,1๐‘†1+โ€ฆ+๐‘Ž2,๐‘›๐‘†๐‘›=๐‘‘2, and so on; swapping the order of two of the linear equations in the system does not change the validity of this solution, as logical and is commutative. Hence operation (i) is an elementary row operation.

If we multiply a linear equation by some non-zero scalar ๐œ†, that equation still holds true, and so the solution set to the system is still valid. Hence operation (ii) is an elementary operation.

Any solution set that satisfies the system of linear equations must satisfy each individual equation. If we add two equations together, the solutions will still hold, so operation (iii) is an elementary row operation.

Definition 1.1.5: A leading variable is the first variable in an equation with a non-zero coefficient.
Definition 1.1.6: A system of equations is in echelon form if each rowโ€™s leading variable is to the right of the leading variable in the row immediately above it, with the exception of the first row, and any rows with all-zero coefficients are at the bottom of the system.
Definition 1.1.7: In an echelon form linear system, any variables that do not appear as leading variables are free variables. These can be used as parameters to describe a solution set.

Example: If we have a system of equations

๐‘ฅ+3๐‘ฆ+2๐‘ง+6๐‘ค=5๐‘ง+2๐‘ค=3

then ๐‘ฆ and ๐‘ค are free variables. We can parametrise the solution set using ๐‘ฆ and ๐‘ค as parameters to say that

{(๐‘ฅ๐‘ฆ๐‘ง๐‘ค)=(2030)+๐‘ฆ(โˆ’3100)+๐‘ค(โˆ’40โˆ’21),๐‘ฆ,๐‘คโˆˆโ„}

but it is more clear to write ๐‘ฆ and ๐‘ค as new variables:

{(๐‘ฅ๐‘ฆ๐‘ง๐‘ค)=(2030)+๐œ†(โˆ’3100)+๐œ‡(โˆ’40โˆ’21),๐œ†,๐œ‡โˆˆโ„}
Definition 1.1.8: A linear equation is homogeneous if the constant is zero.

The Gaussian elimination of a system of linear equations follows the same operations as the Gaussian elimination of its associated system of homogeneous linear equations.

It is helpful to study homogeneous systems because these always have a particular solution, the zero vector.

In general, we can say that the general solution to a system of linear equations is the sum of a particular solution and the solution to the associated system of homogeneous equations.

Lemma 1.1.9: The zero vector is always a particular solution of a homogeneous system of linear equations.

Proof:

Take substituting ๐‘ฅ1,โ€ฆ,๐‘ฅ๐‘› for 0 in each equation in a homogeneous system gives ๐‘Ž1,1(0)+โ€ฆ+๐‘Ž1,๐‘›(0)=0;โ€ฆ;๐‘Ž๐‘–,1(0)+โ€ฆ+๐‘Ž๐‘–,๐‘›(0)=0 which is trivially true and so 0โƒ— is a particular solution of any homogeneous system of linear equations.

Lemma 1.1.10: For any homogeneous linear system of equations, there exist vectors ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘˜ such that the solution set of the system is

{๐‘1๐›ฝโƒ—1+โ€ฆ+๐‘๐‘›๐›ฝโƒ—๐‘˜|๐‘1,โ€ฆ,๐‘๐‘˜โˆˆโ„},

where ๐‘˜ is the number of free variables in an echelon form of the system.

This can be rephrased as: every leading variable in a homogeneous system can be expressed as a linear combination of free variables.

Proof:

Consider some homogeneous system that has been transformed into echelon form, ignoring any trivially true equations (0=0). If the system consists entirely of tautologies, the lemma is trivially true as there are no leading variables which need be expressed.

We will denote the index of the leading variable in a row ๐‘Ÿ as ๐“๏ธ€(๐‘Ÿ).

Consider the bottom equation, row ๐‘–,

๐‘Ž๐‘–,๐“๏ธ€(๐‘–)๐‘ฅ๐“๏ธ€(๐‘–)+๐‘Ž๐‘–,๐“๏ธ€(๐‘–)+1๐‘ฅ๐“๏ธ€(๐‘–)+1+โ€ฆ+๐‘Ž๐‘–,๐‘›๐‘ฅ๐‘›=0,

where ๐‘Ž๐“๏ธ€(๐‘–)โ‰ 0. Here, ๐‘ฅ๐“๏ธ€(๐‘–)+1,โ€ฆ,๐‘ฅ๐‘› are free variables as there are no rows below this in which they could be leading. The leading variable ๐‘ฅ๐“๏ธ€(๐‘–) can be expressed in terms of the free variables:

๐‘ฅ๐“๏ธ€(๐‘–)=โˆ’(๐‘Ž๐‘–,๐“๏ธ€(๐‘–)+1๐‘ฅ๐“๏ธ€(๐‘–)+1+โ€ฆ+๐‘Ž๐‘–,๐‘›๐‘ฅ๐‘›)๐‘Ž๐‘–,๐“๏ธ€(๐‘–).

Suppose that every leading variable ๐‘ฅ๐“๏ธ€(๐‘š) for ๐‘šโˆˆ{๐‘–โˆ’๐‘˜+1,โ€ฆ,๐‘–โˆ’1,๐‘–} for arbitrary ๐‘˜ can be expressed as a linear combination of free variables. Then the leading variable of the ๐‘˜th equation can be expressed as a linear combination of free variables, since every other variable in the ๐‘˜th equation is either a free variable, or is a leading variable in a lower equation and so can be expressed as a linear combination of free variables itself.

Hence if the (๐‘–โˆ’๐‘˜1)th leading variable can be expressed as a linear combination of free variables, so can the (๐‘–โˆ’๐‘˜)th equation. Hence by induction, every leading variable can be expressed as a linear combination of free variables.

Definition 1.1.11: The set of vectors {๐‘1๐›ฝโƒ—1+โ€ฆ+๐‘๐‘›๐›ฝโƒ—๐‘˜|๐‘1,โ€ฆ,๐‘๐‘˜โˆˆโ„} is generated by by or is spanned by by the set {๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘˜}.

Lemma 1.1.12: For a linear system and a particular solution ๐‘โƒ—, the system is satisfied by the solution set

{๐‘โƒ—+๐‘1๐›ฝโƒ—1+โ€ฆ+๐‘๐‘›๐›ฝโƒ—๐‘˜|๐‘1,โ€ฆ,๐‘๐‘˜โˆˆโ„}.

Proof:

Suppose that ๐‘ โƒ— satisfies the system. Then โ„Žโƒ—=๐‘ โƒ—โˆ’๐‘โƒ— satisfies the associated homogeneous system since for all ๐‘˜โˆˆ{1,โ€ฆ,๐‘–},

๐‘Ž๐‘˜,1(๐‘ 1โˆ’๐‘1)+โ€ฆ+๐‘Ž๐‘˜,๐‘›(๐‘ 1โˆ’๐‘1)=(๐‘Ž๐‘˜,1๐‘ 1+โ€ฆ+๐‘Ž๐‘˜,๐‘›๐‘ ๐‘›)โˆ’(๐‘Ž๐‘˜,1๐‘1+โ€ฆ+๐‘Ž๐‘˜,๐‘›๐‘๐‘›)=๐‘‘๐‘˜โˆ’๐‘‘๐‘˜=0,

where ๐‘‘๐‘˜ is the constant of the ๐‘˜th equation and ๐‘ ๐‘— and ๐‘๐‘— are the ๐‘—th components of ๐‘ โƒ— and ๐‘โƒ— respectively.

Suppose that we have a vector โ„Žโƒ— that satisfies the associated homogeneous system, then ๐‘โƒ—+โ„Žโƒ— satisfies the system because, for all ๐‘˜โˆˆ{1,โ€ฆ,๐‘˜},

๐‘Ž๐‘˜,1(๐‘1+โ„Ž1)+โ€ฆ+๐‘Ž๐‘˜,๐‘›(๐‘1+โ„Ž1)=(๐‘Ž๐‘˜,1๐‘1+โ€ฆ+๐‘Ž๐‘˜,๐‘›๐‘๐‘›)+(๐‘Ž๐‘˜,1โ„Ž1+โ€ฆ+๐‘Ž๐‘˜,๐‘›โ„Ž๐‘›)=๐‘‘๐‘˜+0=๐‘‘๐‘˜.

Theorem 1.1.13: The solution set of any linear system has the form

{๐‘โƒ—+๐‘1๐›ฝโƒ—1+โ€ฆ+๐‘๐‘˜๐›ฝโƒ—๐‘˜|๐‘1,โ€ฆ,๐‘๐‘˜โˆˆโ„},

where ๐‘ is any particular solution and ๐‘˜ is the number of free variables in the echelon form of the system.

Proof:

This follows from Lemmaย 1.1.10 and Lemmaย 1.1.12.

Corollary 1.1.14: A linear system of equations has either no solutions, one solution, or infinitely many solutions.

1.ii Linear Geometry

Definition 1.2.1: A square matrix is nonsingular if it is the matrix of coefficients of a homogeneous system with a unique solution. Otherwise (i.e. the homogeneous system has infinitely many solutions), it is singular.

Definition 1.2.2: The line (in โ„2), plane (in โ„3), or ๐‘˜-dimensional linear surface, ๐‘˜-flat or ๐‘˜-dimensional hyperplane (in โ„๐‘˜) is a set of the form

{๐‘Žโƒ—+๐‘ก1๐‘ฃโƒ—1+โ€ฆ+๐‘ก๐‘˜๐‘ฃโƒ—๐‘˜|๐‘ก1,โ€ฆ,๐‘ก๐‘›โˆ’1โˆˆโ„},
where ๐‘ฃโƒ—1,โ€ฆ,๐‘ฃโƒ—๐‘˜โˆˆโ„๐‘› and ๐‘˜โ‰ค๐‘›. More specifically, it is comprised of the endpoints of these vectors when their tips are at the origin.
Remark: That the column vectors associated with a parameter ๐‘กโˆ— lie entirely within the line, not just their tips.

Definition 1.2.3: The length of a vector ๐‘ฃโƒ— is defined as

|๐‘ฃโƒ—|=โ€–๐‘ฃโƒ—โ€–=๐‘ฃ12+โ€ฆ+๐‘ฃ๐‘›2.
Definition 1.2.4: For any nonzero vector ๐‘ฃโƒ—, we normalise ๐‘ฃโƒ— to unit length by carrying out ๐‘ฃโƒ—/โ€–๐‘ฃโƒ—โ€–.

Definition 1.2.5: The dot product, scalar product or inner product of two vectors ๐‘ขโƒ— and ๐‘ฃโƒ— is defined as

๐‘ขโƒ—โ‹…๐‘ฃโƒ—=๐‘ขโˆ’1๐‘ฃ1+โ€ฆ+๐‘ข๐‘›๐‘ฃ๐‘›.
Remark: That ๐‘ฃโƒ—โ‹…๐‘ฃโƒ—=๐‘ฃ12+โ€ฆ+๐‘ฃ๐‘›2=โ€–๐‘ฃโƒ—โ€–2.

Theorem 1.2.6 (Cauchy-Schwartz inequality): For any ๐‘ขโƒ—,๐‘ฃโƒ—โˆˆโ„๐‘›,

|๐‘ขโƒ—โ‹…๐‘ฃโƒ—|โ‰ค|๐‘ขโƒ—||๐‘ฃโƒ—|,

with equality only if there exists ๐‘˜โˆˆ๐‘… such that ๐‘ขโƒ—=๐‘˜๐‘ฃโƒ—.

Proof:

|๐‘ขโƒ—โ‹…๐‘ฃโƒ—|โ‰ค|๐‘ขโƒ—||๐‘ฃโƒ—|โŸบ๐‘ขโƒ—โ‹…๐‘ฃโƒ—โ‰ค|๐‘ขโƒ—||๐‘ฃโƒ—|โŸบ(|๐‘ขโƒ—|๐‘ฃโƒ—||)(๐‘ขโƒ—โ‹…๐‘ฃโƒ—)โ‰ค|๐‘ขโƒ—|2|๐‘ฃโƒ—|2โŸบ0โ‰ค|๐‘ขโƒ—|2|๐‘ฃโƒ—|2โˆ’(|๐‘ขโƒ—||๐‘ฃโƒ—|)(๐‘ขโƒ—โ‹…๐‘ฃโƒ—)โŸบ0โ‰ค12(|๐‘ขโƒ—|2|๐‘ฃโƒ—|2โˆ’2(|๐‘ขโƒ—|๐‘ฃโƒ—)โ‹…(|๐‘ฃโƒ—|๐‘ขโƒ—)+|๐‘ขโƒ—|2|๐‘ฃโƒ—|2)โŸบ0โ‰ค12(|๐‘ขโƒ—|๐‘ฃโƒ—โˆ’|๐‘ฃโƒ—|๐‘ขโƒ—)โ‹…(|๐‘ขโƒ—|๐‘ฃโƒ—โˆ’|๐‘ฃโƒ—|๐‘ขโƒ—)โŸบ0โ‰ค12|(|๐‘ขโƒ—|๐‘ฃโƒ—โˆ’|๐‘ฃโƒ—|๐‘ขโƒ—)|2โŸบ0โ‰ค12|(|๐‘ขโƒ—|๐‘ฃโƒ—โˆ’|๐‘ฃโƒ—|๐‘ขโƒ—)|2

which is true because |โˆ—| is always positive, so |โˆ—|2 is also always positive.

Equality occurs iff (|๐‘ขโƒ—|๐‘ฃโƒ—โˆ’|๐‘ฃโƒ—|๐‘ขโƒ—)=0.

If โˆƒ๐‘˜โˆˆโ„:๐‘ขโƒ—=๐‘˜๐‘ฃโƒ—, then (|๐‘ขโƒ—|๐‘ฃโƒ—โˆ’|๐‘ฃโƒ—|๐‘ขโƒ—)=(๐‘˜|๐‘ฃโƒ—|๐‘ฃโƒ—โˆ’๐‘˜|๐‘ฃโƒ—|๐‘ฃโƒ—)=0.

If (|๐‘ขโƒ—|๐‘ฃโƒ—โˆ’|๐‘ฃโƒ—|๐‘ขโƒ—)=0, then

โˆ€๐‘–<๐‘›:๐‘ข12+โ€ฆ+๐‘ข๐‘›2๐‘ฃ๐‘–=๐‘ฃ12+โ€ฆ+๐‘ฃ๐‘›2๐‘ข๐‘–โŸน ๐‘ข12+โ€ฆ+๐‘ข๐‘›2๐‘ฃ12+โ€ฆ+๐‘ฃ๐‘›2=๐‘ข๐‘–๐‘ฃ๐‘–โŸน๐‘ข๐‘–๐‘ฃ๐‘–=๐‘˜,๐‘˜โˆˆโ„โŸนโˆƒ๐‘˜โˆˆโ„:๐‘ขโƒ—=๐‘˜๐‘ฃโƒ—.

Hence equality occurs iff โˆƒ๐‘˜โˆˆโ„:๐‘ขโƒ—=๐‘˜๐‘ฃโƒ—.

Theorem 1.2.7 (Triangle inequality): For any ๐‘ขโƒ—,๐‘ฃโƒ—โˆˆโ„๐‘›, |๐‘ขโƒ—+๐‘ฃโƒ—|โ‰ค|๐‘ขโƒ—|+|๐‘ฃโƒ—|, with equality iff โˆƒ๐‘˜โˆˆโ„:๐‘ขโƒ—=๐‘˜๐‘ฃโƒ—.

Proof:

Both sides of the inequality are positive, so squaring both sides does not change the validity of the inequality.

|๐‘ขโƒ—+๐‘ฃโƒ—|2โ‰ค(|๐‘ขโƒ—|+|๐‘ฃโƒ—|)2โŸบ(๐‘ขโƒ—+๐‘ฃโƒ—)โ‹…(๐‘ขโƒ—+๐‘ฃโƒ—)โ‰ค|๐‘ขโƒ—|2+2|๐‘ขโƒ—||๐‘ฃโƒ—|+|๐‘ฃโƒ—|2โŸบ๐‘ขโƒ—โ‹…๐‘ขโƒ—+2(๐‘ขโƒ—โ‹…๐‘ฃโƒ—)+๐‘ฃโƒ—โ‹…๐‘ฃโƒ—โ‰ค|๐‘ขโƒ—|2+2|๐‘ขโƒ—||๐‘ฃโƒ—|+|๐‘ฃโƒ—|2โŸบ|๐‘ขโƒ—|2+2(๐‘ขโƒ—โ‹…๐‘ฃโƒ—)+|๐‘ฃโƒ—|2โ‰ค|๐‘ขโƒ—|2+2|๐‘ขโƒ—||๐‘ฃโƒ—|+|๐‘ฃโƒ—|2โŸบ2(๐‘ขโƒ—โ‹…๐‘ฃโƒ—)โ‰ค2|๐‘ขโƒ—||๐‘ฃโƒ—|

which is true by the Cauchy-Schwartz inequality (Theoremย 1.2.6).

Equality occurs iff โˆƒ๐‘˜โˆˆโ„:๐‘ขโƒ—=๐‘˜๐‘ฃโƒ—, by the Cauchy-Schwartz inequality again.

Definition 1.2.8: The angle between two vectors ๐‘ขโƒ—,๐‘ฃโƒ—โˆˆโ„๐‘› is defined as

๐œƒ=arccos(๐‘ขโƒ—โ‹…๐‘ฃโƒ—|๐‘ขโƒ—||๐‘ฃโƒ—|).

Remark: That this is always defined since, following from the Cauchy-Schwartz inequality,

๐‘ขโƒ—โ‹…๐‘ฃโƒ—|๐‘ขโƒ—||๐‘ฃโƒ—|โˆˆ[โˆ’1,1].
Remark: That this always gives an angle in the range [0,๐œ‹].
Remark: That this corresponds to our intuition about angles.

Remark: The formula in Definitionย 1.2.8 follows from the Law of Cosines.

Proof:

Consider two vectors ๐‘ขโƒ—,๐‘ฃโƒ—โˆˆโ„, and call the angle between them ๐œƒ. Using the Law of Cosines on the triangle with sides ๐‘ขโƒ—, ๐‘ฃโƒ— and (๐‘ขโƒ—โˆ’๐‘ฃโƒ—) gives that

|๐‘ขโƒ—โˆ’๐‘ฃโƒ—|2=|๐‘ขโƒ—|2+|๐‘ฃโƒ—|2โˆ’2|๐‘ขโƒ—||๐‘ฃโƒ—|cos๐œƒ.

The left side gives

(๐‘ข1โˆ’๐‘ฃ1)2+โ€ฆ+(๐‘ข๐‘›+๐‘ฃ๐‘›)2=(๐‘ข12โˆ’2๐‘ข1๐‘ฃ1+๐‘ฃ12)+โ€ฆ+(๐‘ข๐‘›2โˆ’2๐‘ข๐‘›๐‘ฃ๐‘›+๐‘ฃ๐‘›2),

while the right side gives

(๐‘ข12+โ€ฆ+๐‘ข๐‘›2)+(๐‘ฃ12+โ€ฆ+๐‘ฃ๐‘›2)โˆ’2|๐‘ขโƒ—||๐‘ฃโƒ—|cos๐œƒ.

Combining the two sides and cancelling like terms gives

โˆ’2(๐‘ข1๐‘ฃ1+โ€ฆ+๐‘ข๐‘›๐‘ฃ๐‘›)=โˆ’2๐‘ขโƒ—โ‹…๐‘ฃโƒ—=โˆ’2|๐‘ขโƒ—||๐‘ฃโƒ—|cos๐œƒ,

which simplifies and rearranges to give Definitionย 1.2.8.

Remark: That the Law of Cosines is just an extension of Pythagorasโ€™ theorem:

๐‘2=๐‘Ž2+๐‘2โŸPythagoras' theoremโˆ’ 2๐‘Ž๐‘cos๐œƒ

Corollary 1.2.9: Vectors from โ„๐‘› are orthogonal (perpendicular) iff their dot product is zero (since arccos0=๐œ‹2). They are parallel iff the absolute value of their dot product is the product of their length (since arccos1=arccos(โˆ’1)=0).

1.iii Reduced echelon form

Definition 1.3.1: In reduced echelon form, every leading variable has a coefficient of 1, and is the only nonzero entry in its column.
Remark: That for free variables, there are no restrictions on coefficients, or other entries in that column.

This is useful because we can just read the solution off.

Example: Consider the following system matrix in reduced echelon form:

(10033010040011/21).

The solution set of this system is simply

{(3410)+๐œ†(301/21)|๐œ†โˆˆโ„}.

To get to reduced echelon form, we use Gauss-Jordan reduction, whereby we first carry out Gaussian elimination, then scale each row such that the leading variables have coefficients of 1, then eliminate any non-leading and non-free variables in each row by working upwards.

Lemma 1.3.2: Elementary row operations are reversible.

Proof:

๐œŒ๐‘–โ†”๐œŒ๐‘— has the inverse of ๐œŒ๐‘—โ†”๐œŒ๐‘–. ๐‘˜๐œŒ๐‘– has the inverse of 1๐‘˜๐œŒ๐‘– for ๐‘˜โ‰ 0. ๐‘˜๐œŒ๐‘–+๐œŒ๐‘— has the inverse โˆ’๐‘˜๐œŒ๐‘–+๐œŒ๐‘—, where ๐‘–โ‰ ๐‘—.

Definition 1.3.3: Matrices that reduce to each other (using elementary row operations) are interreducible, equivalent with respect to the relationship of row reducibility, or row equivalent. They are said to be in the same row equivalence class.
Remark: Row equivalence classes are disjoint; any matrix belongs to exactly one row equivalence class.

Lemma 1.3.4: Between matrices, โ€˜reduces toโ€™ is an equivalence relation.

Proof:

To be an equivalence relation, โ€˜reduces toโ€™ must satisfy reflexivity, symmetry and transitivity.

Reflexivity is trivial since we can reduce ๐ดโ†’๐ด through carryig out no operations.

Symmetry follows from Lemmaย 1.3.2.

The relation is transitive because if we can reduce ๐ดโ†’๐ต and ๐ตโ†’๐ถ, we can carry out the operations in order to go from ๐ดโ†’๐ตโ†’๐ถ to reduce ๐ดโ†’๐ถ.

Lemma 1.3.5 (Linear combination lemma): A linear combination of linear combinations is a linear combination.

Proof:

Given the set of linear combinations {๐‘๐‘–,1๐‘ฅ1+โ€ฆ๐‘๐‘–,๐‘›๐‘ฅ๐‘›|๐‘–โˆˆ{1,โ€ฆ,๐‘š},๐‘šโˆˆโ„•1}, consider the linear combination of these

๐‘‘1(๐‘1,1๐‘ฅ1+โ€ฆ๐‘1,๐‘›๐‘ฅ๐‘›)+โ€ฆ+๐‘‘๐‘š(๐‘๐‘š,1๐‘ฅ1+โ€ฆ๐‘๐‘š,๐‘›๐‘ฅ๐‘›)=(๐‘‘1๐‘1,1๐‘ฅ1+โ€ฆ+๐‘‘1๐‘1,๐‘›๐‘ฅ๐‘›)+โ€ฆ+(๐‘‘๐‘š๐‘๐‘š,1๐‘ฅ1+โ€ฆ+๐‘‘๐‘š๐‘๐‘š,๐‘›๐‘ฅ๐‘›)=(๐‘‘1๐‘1,1+โ€ฆ+๐‘‘๐‘š๐‘๐‘š,1)๐‘ฅ1+โ€ฆ+(๐‘‘1๐‘1,๐‘›+โ€ฆ+๐‘‘๐‘š๐‘๐‘š,๐‘›)๐‘ฅ๐‘›

which is a linear combination.

Corollary 1.3.6: Where one matrix reduces to another, each row of the second is a linear combination of the first.

Lemma 1.3.7: In an echelon form matrix, no nonzero row is a linear combination of the other nonzero rows.

Proof:

Consider any row of the matrix. The leading entry in that row is one, but the entry in that column in every other row is equal to zero (by the definition of reduced echelon form), so there is no linear combination of other rows that can make this row.

Remark: The thing that Gaussian elimination really eliminates is any linear relationships between rows.
Theorem 1.3.8: Each matrix is row equivalent to a unique (โ€œcanonicalโ€) reduced echelon form matrix.

Proof:

We proceed by induction on the number of columns, ๐‘›, for a fixed arbitrary number of rows ๐‘š.

Let ๐ดโˆˆโ„ณ๏ธ€๐‘šร—1.

If ๐ด is the zero matrix, then it is in reduced echelon form and is not row-equivalent to any other matrix (this follows from Corollaryย 1.3.6). Otherwise, when reduced to reduced-echelon form, the only nonzero entry must be a 1 in the first row. Regardless, the reduced echelon form matrix is unique.

Now assume that, for some ๐‘›>1, all ๐‘šร—๐‘˜ matrices for ๐‘˜<๐‘› have a unique reduced echelon form matrix, and consider ๐ดโˆˆโ„ณ๏ธ€๐‘šร—๐‘›.

Suppose that ๐ด reduces to two distinct reduced echelon form matrices, ๐ต and ๐ถ. Let ๐ดฬ‚ be the matrix consisting of the first ๐‘›โˆ’1 columns of ๐ด. Any sequence of operations that reduces ๐ด to reduced echelon form must also reduce ๐ดฬ‚ to reduced echelon form, and by the inductive hypothesis, ๐ดฬ‚ reduces to a unique reduced echelon form matrix. Therefore, ๐ต and ๐ถ must differ in the ๐‘›th column.

We write the linear system with matrix of coefficients ๐ด as

๐‘Ž1,1๐‘ฅ1+โ€ฆ+๐‘Ž1,๐‘›๐‘ฅ๐‘š=0;โ‹ฎ๐‘Ž๐‘š,1๐‘ฅ1+โ€ฆ+๐‘Ž๐‘š,๐‘›๐‘ฅ๐‘š=0;

the systems with matrices of coefficients ๐ต and ๐ถ are written similarly. These systems must all have the same solution sets, since carrying out elementary row operations on linear systems does not change the solution set. With ๐ต and ๐ถ differing only in the ๐‘›th column, suppose they differ in row ๐‘–. We subtract row ๐‘– of the systems represented by ๐ต and ๐ถ to get that (๐‘๐‘–,๐‘›โˆ’๐‘๐‘–,๐‘›)๐‘ฅ๐‘›=0. Since ๐‘๐‘–,๐‘›โ‰ ๐‘๐‘–,๐‘›, ๐‘ฅ๐‘›=0.

Therefore, ๐‘ฅ๐‘› is not a free variable, so the ๐‘›th columns of ๐ต and ๐ถ must contain the leading entry of some row, since any column that does not have a leading entry is associated with a free variable.

Because the first (๐‘›โˆ’1) columns of ๐ต and ๐ถ are equal, a leading variable in the ๐‘›th column must be in the same position in ๐ต and ๐ถ, and must be equal to 1; therefore, ๐ต and ๐ถ are equal, so ๐ด reduces to a unique reduced echelon form matrix.


Remark: To decide if two matrices are row-equivalent, we reduce them to reduced echelon form and see if they are equivalent (this works because equivalence relations are transitive).

2 Vector spaces

2.i Definition of vector space

Definition 2.1.1: A vector space (over โ„) consists of a set ๐‘‰ along with two operations โ€˜+โ€™ and โ€˜โ‹…โ€™ subject to the condition that, for all ๐‘ขโƒ—,๐‘ฃโƒ—,๐‘คโƒ—โˆˆ๐‘‰,๐‘Ÿ,๐‘ โˆˆโ„:

  1. ๐‘‰ is closed under addition i.e. ๐‘ขโƒ—+๐‘ฃโƒ—โˆˆ๐‘‰
  2. addition is commutative i.e. ๐‘ขโƒ—+๐‘ฃโƒ—=๐‘ฃโƒ—+๐‘ขโƒ—
  3. addition is associative
  4. there is an additive identity, i.e. โˆƒ0โƒ—โˆˆ๐‘‰.โˆ€๐‘ฃโƒ—โˆˆ๐‘‰.๐‘ฃโƒ—+0โƒ—=๐‘ฃโƒ—
  5. every element of ๐‘‰ has an additive inverse, i.e. โˆ€๐‘ฃโƒ—โˆˆ๐‘‰.โˆƒ๐‘คโƒ—โˆˆ๐‘‰.๐‘ฃโƒ—+๐‘คโƒ—=0โƒ—
  6. ๐‘‰ is closed under scalar multiplication i.e. ๐‘Ÿโ‹…๐‘ฃโƒ—โˆˆ๐‘‰
  7. scalar multiplication distributes over addition of scalars, i.e. (๐‘Ÿ+๐‘ )โ‹…๐‘ฃโƒ—=๐‘Ÿโ‹…๐‘ฃโƒ—+๐‘ โ‹…๐‘ฃโƒ—
  8. scalar multiplication distributes over vector addition, i.e. ๐‘Ÿโ‹…(๐‘ขโƒ—+๐‘ฃโƒ—)=๐‘Ÿโ‹…๐‘ขโƒ—+๐‘Ÿโ‹…๐‘ฃโƒ—
  9. ordinary scalar multiplication associates with scalar multiplication, i.e. (๐‘Ÿ๐‘ )๐‘ฃโƒ—=๐‘Ÿโ‹…(๐‘ โ‹…๐‘ฃโƒ—)
  10. 1โ‹…๐‘ฃโƒ—=๐‘ฃโƒ—
Remark: A vector space is space in which linear combinations can be made.
Example: For all ๐‘›, โ„๐‘› is a vector space under the natural operations.
Example: For all ๐‘›, the set of ๐‘›th degree polynomials, ๐’ซ๏ธ€๐‘›={๐‘Ž0+๐‘Ž1๐‘ฅ+๐‘Ž2๐‘ฅ2+โ€ฆ+๐‘Ž๐‘›๐‘ฅ๐‘›|๐‘Ž0,โ€ฆ,๐‘Ž๐‘›โˆˆโ„} is a vector space under the natural operations.
Example: The set of ๐‘šร—๐‘› matrices ๐‘€๐‘šร—๐‘› is a vector space.
Remark: That โˆ… is not a vector space because it does not have an additive identity, but {(00)} is a vector space.
Definition 2.1.2: A vector space with one element is a trivial vector space.

Lemma 2.1.3: In any vector space ๐‘‰, for any ๐‘ฃโƒ—โˆˆ๐‘‰ and ๐‘Ÿโˆˆโ„, we have

  1. 0โ‹…๐‘ฃโƒ—=0โƒ—
  2. (โˆ’1โ‹…๐‘ฃโƒ—)+๐‘ฃโƒ—=0โƒ—
  3. ๐‘Ÿโ‹…0โƒ—=0โƒ—

Proof:

For (i), note that ๐‘ฃโƒ—=(1+0)โ‹…๐‘ฃโƒ—=๐‘ฃโƒ—+(0โ‹…๐‘ฃโƒ—). Add to both sides the additive inverse ๐‘ค such that ๐‘ฃโƒ—+๐‘คโƒ—=0โƒ—.

๐‘คโƒ—+๐‘ฃโƒ—=๐‘คโƒ—+๐‘ฃโƒ—+0โ‹…๐‘ฃ0โƒ—=0โƒ—+0โ‹…๐‘ฃ0โƒ—=0โ‹…๐‘ฃ.

(ii): (โˆ’1โ‹…๐‘ฃโƒ—)+๐‘ฃโƒ—=(โˆ’1+1)โ‹…๐‘ฃโƒ—=0โ‹…๐‘ฃโƒ—=0โƒ—.

(iii) ๐‘Ÿโ‹…0โƒ—=๐‘Ÿโ‹…(0โ‹…0โƒ—)=(๐‘Ÿโ‹…0)โ‹…0โƒ—=0โƒ—

Definition 2.1.4: For any vector space, a subspace is a subset that is itself a vector space, under the inherited operations.
Remark: Any vector space has a trivial subspace {0โƒ—}.
Remark: Any vector space has itself for a subspace.
Definition 2.1.5: A subspace that it not the entire space is a proper subset.

Lemma 2.1.6: For a nonempty subset ๐‘† of a vector space, under the inherited operations the following are equivalent statements

  1. ๐‘† is a subspace of that vector space
  2. ๐‘† is closed under linear combinations of pairs of vectors
  3. ๐‘† is closed under linear combinations of any number of vectors
Remark: It is often easier to verify closure if the solution set is parametrised, e.g. rather than {(๐‘ฅ๐‘ฆ๐‘ง)|2๐‘ฅโˆ’๐‘ฆ+๐‘ง=0}, use {๐‘ฆ(1210)+๐‘ง(โˆ’1201)|๐‘ฆ,๐‘งโˆˆโ„}.
Definition 2.1.7: The span (or linear closure) of a nonempty subset ๐‘† of a vector space is the set of all linear combinations of vectors from ๐‘†. [๐‘†]=span(๐‘†)={๐‘1๐‘ โƒ—1+โ€ฆ+๐‘๐‘›๐‘ โƒ—๐‘›|๐‘1,โ€ฆ,๐‘๐‘›โˆˆ๐‘…,๐‘ โƒ—1,โ€ฆ,๐‘ โƒ—๐‘›โˆˆ๐‘†}.
Definition 2.1.8: [โˆ…]={0โƒ—}.

Lemma 2.1.9: In a vector space, the span of any subset is a subspace.

Proof:

If the subset ๐‘† is empty, its span is the trivial subspace by definition. Otherwise, for two elements of [๐‘†], ๐‘ฃโƒ—=๐‘1๐‘ โƒ—1+โ€ฆ+๐‘๐‘›๐‘ โƒ—๐‘›,๐‘คโƒ—=๐‘‘1๐‘ โƒ—1+โ€ฆ+๐‘‘๐‘›๐‘ โƒ—๐‘›, where ๐‘ โƒ—โˆ—โˆˆ๐‘† and ๐‘,๐‘Ÿโˆˆโ„,

๐‘โ‹…๐‘ฃโƒ—+๐‘Ÿโ‹…๐‘คโƒ—=(๐‘๐‘1๐‘ โƒ—1+โ€ฆ+๐‘๐‘๐‘›๐‘ โƒ—๐‘›)+(๐‘Ÿ๐‘‘1๐‘ โƒ—1+โ€ฆ+๐‘Ÿ๐‘‘๐‘›๐‘ โƒ—๐‘›)=(๐‘๐‘1+๐‘Ÿ๐‘‘1)๐‘ โƒ—1+โ€ฆ+(๐‘๐‘๐‘›+๐‘Ÿ๐‘‘๐‘›)๐‘ โƒ—๐‘›

which is a linear combination of elements of ๐‘† and so is a member of [๐‘†], hence [๐‘†] is closed under linear combinations of pairs of elements; by Lemmaย 2.1.6, [๐‘†] is a subspace.

Remark: To express a subspace as a span, parametrise then the span is of the set containing the vector coefficients of each parameter.
Remark: Spans are not unique.

2.ii Linear Independence

Definition 2.2.1: In any vector space, a set of vectors is linearly independent if none of its elements is a linear combination of the others from the set. Otherwise the set is linearly dependent.
Definition 2.2.2: If a set is linearly dependent, its vectors are in a linear relationship.

Lemma 2.2.3: A subset ๐‘† of a vector space is linearly independent iff among its elements the only linear relationship ๐‘1๐‘ 1+โ€ฆ+๐‘๐‘›๐‘ ๐‘›=0 is the trivial one, ๐‘โˆ—=0.

Proof:

If ๐‘† is linearly independent, there is no vector ๐‘ โˆˆ๐‘† that can be expressed as a linear combination of other elements of ๐‘†, so there is no linear relationship between elements of ๐‘† with non-zero coefficients, i.e. the only linear relationship is the trivial one.

If ๐‘† is linearly dependent, there exists a vector ๐‘ โˆˆ๐‘† that can be represented as a linear combination of other elements of ๐‘†, so there is a linear relationship among the elements of ๐‘† with at least one non-zero coefficient, being that of ๐‘ . Hence by contraposition, if the only linear relationship among elements of ๐‘† is the trivial one, ๐‘† is linearly independent.

Lemma 2.2.4: Suppose ๐‘‰ is a vector space, ๐‘† is a subset of that space, and ๐‘ฃโƒ—โˆˆ๐‘‰, then

[๐‘†โˆช{๐‘ฃโƒ—}]=[๐‘†]โŸบ๐‘ฃโƒ—โˆˆ[๐‘†].

Proof:

โŸน: Suppose ๐‘ฃโƒ—โˆ‰[๐‘†], then [๐‘†โˆช{๐‘ฃโƒ—}]โ‰ [๐‘†] since ๐‘ฃโƒ—โˆˆ[๐‘†โˆช{๐‘ฃโƒ—}]; the implication follows from contraposition.

โŸธ: Suppose ๐‘ฃโƒ—โˆˆ[๐‘†], then ๐‘ฃโƒ—=๐‘1๐‘ โƒ—1+โ€ฆ+๐‘๐‘›๐‘ โƒ—๐‘› for ๐‘1,โ€ฆ,๐‘๐‘›โˆˆโ„,๐‘ โƒ—1,โ€ฆ,๐‘ โƒ—๐‘›โˆˆ๐‘†. Then for any ๐‘คโƒ—โˆˆ[๐‘†โˆช{๐‘ฃโƒ—}],

๐‘คโƒ—=๐‘‘1๐‘ โƒ—1+โ€ฆ+๐‘‘๐‘›๐‘ โƒ—๐‘›+๐‘‘๐‘›+1๐‘ฃโƒ—=(๐‘‘1+๐‘1๐‘‘๐‘›1)๐‘ โƒ—1+โ€ฆ+(๐‘‘๐‘›+๐‘๐‘›๐‘‘๐‘›+1)๐‘ โƒ—๐‘›by expansion of๐‘ฃโƒ—,

so ๐‘คโƒ—โˆˆ[๐‘†]. Therefore, [๐‘†โˆช{๐‘ฃโƒ—}]โІ[๐‘†]. Note also that clearly [๐‘†]โІ[๐‘†โˆช{๐‘ฃโƒ—}], so by double inclusion [๐‘†โˆช{๐‘ฃโƒ—}]=[๐‘†].

Corollary 2.2.5: For ๐‘ฃโƒ—โˆˆ๐‘†, [๐‘†]=[๐‘†\{๐‘ฃโƒ—}] iff ๐‘ฃโƒ— is dependent on other vectors in ๐‘†.
Corollary 2.2.6: A set ๐‘† is linearly independent iff for any ๐‘ฃโƒ—โˆˆ๐‘†, [๐‘†\{๐‘ฃโƒ—}]โŠ‚[๐‘†].

Lemma 2.2.7: Suppose that ๐‘† is linearly independent and that ๐‘ฃโƒ—โˆ‰๐‘†, then ๐‘†โˆช{๐‘ฃโƒ—} is linearly independent iff ๐‘ฃโƒ—โˆ‰[๐‘†].

Proof:

Suppose that ๐‘ฃโƒ—โˆˆ[๐‘†], so ๐‘ฃโƒ—=๐‘1๐‘ โƒ—1+โ€ฆ+๐‘๐‘›๐‘ โƒ—๐‘› for ๐‘ โƒ—1,โ€ฆ,๐‘ โƒ—๐‘›โˆˆ๐‘†. Since ๐‘ฃโˆ‰๐‘†, it is not equal to any of the ๐‘ โƒ—๐‘–s so this is a nontrivial linear dependence among elements of ๐‘†โˆช{๐‘ฃโƒ—}. Therefore, ๐‘ โˆช{๐‘ฃโƒ—} is not linearly independent.

Now suppose that ๐‘†โˆช{๐‘ฃโƒ—} is linearly dependent, so there exists a nontrivial combination 0โƒ—=๐‘1๐‘ โƒ—1+โ€ฆ+๐‘๐‘›๐‘ โƒ—๐‘›+๐‘๐‘›+1๐‘ฃโƒ—. By assumption, ๐‘† is linear independent, so ๐‘๐‘›+1โ‰ 0. Therefore, we can rearrange the equation to find that ๐‘ฃโƒ—=(๐‘1๐‘๐‘›+1)๐‘ โƒ—1+โ€ฆ+(๐‘๐‘›๐‘๐‘›+1)๐‘ โƒ—๐‘›, so ๐‘ฃโƒ—โˆˆ[๐‘†].

Therefore we have that ๐‘†โˆช{๐‘ฃโƒ—} is linearly dependent iff ๐‘ฃโƒ—โˆˆ[๐‘†], so ๐‘†โˆช{๐‘ฃโƒ—} is linear independent iff ๐‘ฃโƒ—โˆ‰[๐‘†].

Corollary 2.2.8: In a vector space, any finite set has a linearly independent subset with the same span.

Proof:

For a finite set ๐‘†โ‰”{๐‘ โƒ—1,โ€ฆ,๐‘ โƒ—๐‘›}, if ๐‘† is linearly independent then the statement is trivially true as ๐‘†โІ๐‘†. Note that if ๐‘† is a singleton set, it is trivially linearly independent.

Otherwise, there exists an ๐‘ โƒ—๐‘– which can be expressed as a linear combination of the other elements of ๐‘†; by Corollaryย 2.2.5, ๐‘†โ€ฒโ‰”๐‘†\{๐‘ โƒ—๐‘–} has the same span as ๐‘†. |๐‘†โ€ฒ|<|๐‘†|, and since ๐‘†โ€ฒ is finite we can keep removing dependent elements until we either reach a nontrivial independent set with the same span, or we reach a singleton set, which is trivially independent.

Corollary 2.2.9: A subset ๐‘†={๐‘ โƒ—1,โ€ฆ,๐‘ โƒ—๐‘›} is linearly dependent iff some ๐‘ ๐‘–โˆˆ๐‘† can be represented as a linear combination of other elements in ๐‘† listed before it.

Proof:

Let ๐‘†0={},๐‘†1={๐‘ โƒ—1},๐‘†2={๐‘ โƒ—1,๐‘†โƒ—2},โ€ฆ. Then if ๐‘† is linearly dependent, there exists a first ๐‘–โ‰ฅ1 such that ๐‘†๐‘–โˆ’1โˆช{๐‘ โƒ—๐‘–} is linearly dependent, i.e. ๐‘ โƒ—๐‘–โˆˆ[๐‘†๐‘–โˆ’1].

Lemma 2.2.10: Any subset of a linearly independent set is also linearly independent. Any superset of a linearly dependent set is linearly dependent.

2.iii Basis and dimension

Definition 2.3.1: A basis for a vector space is a sequence of vectors that is linearly independent and that spans the space. Denoted โŸจ๐›ฝ1,๐›ฝ2,โ€ฆโŸฉ.

Definition 2.3.2: For any โ„๐‘›,

๐œ€๐‘›=โŸจ(10โ‹ฎ0),(01โ‹ฎ0),โ€ฆ,(00โ‹ฎ1)โŸฉ
is the standard basis or natural basis. We denote these vectors ๐‘’โƒ—1,โ€ฆ,๐‘’โƒ—๐‘›. (Sometimes the vectors in ๐œ€3 are denoted ๐‘–โƒ—,๐‘—โƒ—,๐‘˜โƒ—.)

Theorem 2.3.3: In any vector space, a subset is a basis iff each vector in the space can be expressed as a linear combination of elements of the subset in exactly one way.

Proof:

A sequence is a basis iff its elements form a spanning subset of the space, and is linearly independent. A subset is spanning iff each vector in the space can be expressed as a linear combination of elements in the subset, so we need only show that a spanning subset is linearly independent iff every vector in the space has a unique expression as a linear combination of elements of the subset.

Consider two such expressions of a vector ๐‘ฃโƒ—, ๐‘ฃโƒ—=๐‘1๐›ฝโƒ—1+โ€ฆ+๐‘๐‘›๐›ฝโƒ—๐‘› and ๐‘ฃโƒ—=๐‘‘1๐›ฝโƒ—1+โ€ฆ+๐‘‘๐‘›๐›ฝโƒ—๐‘› for a subset ๐‘†โ‰”{๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘›}. These are equal by transitivity of equality, so we can subtract them to get that (๐‘1โˆ’๐‘‘1)๐›ฝโƒ—1+โ€ฆ+(๐‘๐‘›โˆ’๐‘‘๐‘›)๐›ฝโƒ—๐‘›=0โƒ—. The ๐‘๐‘–s equal the ๐‘‘๐‘–s iff ๐‘๐‘–โˆ’๐‘‘๐‘–=0 for 1โ‰ค๐‘–โ‰ค๐‘›, which holds iff ๐‘† is linearly independent, since the only linear dependence amongst its elements is the trivial one.

Definition 2.3.4: In a vector space with bases ๐ต the representation of ๐‘ฃโƒ— with respect to ๐ต is the column vector of the coefficients used to express ๐‘ฃโƒ— as a linear combination of the bases vectors:

Rep๐ต(๐‘ฃโƒ—)=(๐‘1โ‹ฎ๐‘๐‘›)๐ต

where ๐ต=โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘›โŸฉ and ๐‘ฃโƒ—=๐‘1๐›ฝโƒ—1+โ€ฆ+๐‘๐‘›๐›ฝโƒ—๐‘›.

๐‘1,โ€ฆ,๐‘๐‘› are the coordinates of ๐‘ฃโƒ— with respect to ๐‘ฃโƒ—.

Remark: Any ๐‘คโƒ—โˆˆโ„๐‘› has Rep๐œ€๐‘›(๐‘คโƒ—)=๐‘คโƒ—.

Lemma 2.3.5: If ๐ต is an ๐‘›-element basis of a vector space ๐’ฑ๏ธ€, then for any set of vectors {๐‘ฃโƒ—1,โ€ฆ,๐‘ฃโƒ—๐‘˜},

๐‘Ž1๐‘ฃโƒ—1+โ€ฆ+๐‘Ž๐‘˜๐‘ฃโƒ—๐‘˜=0โƒ—๐’ฑ๏ธ€โŸบ๐‘Ž1Rep๐ต(๐‘ฃโƒ—1)+โ€ฆ+๐‘Ž๐‘˜Rep๐ต(๐‘ฃโƒ—๐‘˜)=0โƒ—โ„๐‘›.

Proof:

Take a basis ๐ต=โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘›โŸฉ and suppose Rep๐ต(๐‘ฃโƒ—๐‘–) is the ๐‘–th column of a matrix ๐ถโˆˆโ„ณ๏ธ€๐‘˜ร—๐‘› for 1โ‰ค๐‘–โ‰ค๐‘˜ such that ๐‘ฃโƒ—1=๐‘1,1๐›ฝโƒ—1+โ€ฆ+๐‘๐‘›,1๐›ฝโƒ—๐‘› etc.

Then we can substitute these into ๐‘Ž1๐‘ฃโƒ—1+โ€ฆ+๐‘Ž๐‘˜๐‘ฃโƒ—๐‘˜=0โƒ—๐’ฑ๏ธ€ to give

0โƒ—๐’ฑ๏ธ€=๐‘Ž1(๐‘1,1๐›ฝโƒ—1+โ€ฆ+๐‘๐‘›,1๐›ฝโƒ—๐‘›)+โ€ฆ+๐‘Ž๐‘˜(๐‘1,๐‘˜๐›ฝโƒ—1+โ€ฆ+๐‘๐‘›,๐‘˜๐›ฝโƒ—๐‘›)=(๐‘Ž1๐‘1,1+โ€ฆ+๐‘Ž๐‘˜๐‘1,๐‘˜)๐›ฝโƒ—1+โ€ฆ+(๐‘Ž1๐‘๐‘›,1+โ€ฆ+๐‘Ž๐‘˜๐‘๐‘›,๐‘˜)๐›ฝโƒ—๐‘˜.

Because elements of bases are linearly independent, this only holds if ๐‘Ž1๐‘1,1+โ€ฆ+๐‘Ž๐‘˜๐‘1,๐‘˜=โ€ฆ=๐‘Ž1๐‘๐‘›,1+โ€ฆ+๐‘Ž๐‘˜๐‘๐‘›,๐‘˜=0. This gives us a linear system which we can re-express with column vectors, giving

0โƒ—โ„๐‘›=๐‘Ž1(๐‘1,1โ‹ฎ๐‘๐‘›,1)+โ€ฆ+๐‘Ž๐‘˜(๐‘1,๐‘˜โ‹ฎ๐‘๐‘›,๐‘˜)=๐‘Ž1Rep๐ต(๐‘ฃโƒ—1)+โ€ฆ+๐‘Ž๐‘˜Rep๐ต(๐‘ฃโƒ—๐‘˜).

Note that not only does the relationship hold, but the coefficients ๐‘Žโˆ— are the same.

Definition 2.3.6: A vector space is finite-dimensional if it has a basis with only finitely many vectors.

Theorem 2.3.7: In any finite-dimensional vector space, all bases have the same number of elements.

Proof:

Consider some finite-dimensional vector space; by definition, it has a finite basis. Pick one finite basis ๐ต=โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘›โŸฉ of minimal size, and, for the sake of contradiction, take any other basis ๐ท=โŸฉ๐›ฟโƒ—1,โ€ฆ,๐›ฟโƒ—๐‘šโŸฉ, with ๐‘šโ‰ ๐‘›, noting that ๐‘š>๐‘› since ๐ต is minimal.

Assume that the elements of ๐ท are unique (otherwise it would not be a basis), then the only linear relationship amongst the ๐›ฟ๐‘–s must be the trivial one. By Lemmaย 2.3.5, the only linear relationship amongst the representations of the ๐›ฟ๐‘–s with respect to ๐ต is the trivial one.

A linear relationship amongst the representations of the ๐›ฟ๐‘–s with respect to ๐ต can be represented by a homogeneous system of ๐‘› linear equations, with ๐‘š>๐‘› unknowns. Since there are more unknowns than equations, and the system is homogeneous, there are infinitely many solutions and so there must be more than just the trivial linear relationship among the ๐›ฟ๐‘–s. Therefore, the ๐›ฟ๐‘–s are not linearly independent, so ๐ท is not a basis; this is a contradiction, so all bases of ๐’ฑ๏ธ€ must be the same size.

Definition 2.3.8: The dimension of a vector space is the number of vectors in any of its bases.
Corollary 2.3.9: No linearly independent set can have a size greater than the dimension of the enclosing space, assuming a finite-dimensional space.

Corollary 2.3.10: Any linearly independent set can be expanded to make a basis.

Proof:

Take a linearly independent set ๐‘† of a vector space ๐’ฑ๏ธ€.

If ๐‘† is not already a basis for ๐‘‰, then it must not span the space. Therefore we can add a vector that is not in [๐‘†] to ๐‘†, and retain linear independence by Lemmaย 2.2.7. Keep adding until the resulting set does span the space, which will occur in a finite number of steps by Corollaryย 2.3.9.

Corollary 2.3.11: Any spanning set can be shrunk to a basis.

Proof:

Take a spanning set ๐‘†. If ๐‘†=โˆ… then it is already a basis (and the enclosing space must be trivial). If ๐‘†={0โƒ—} then it can be shrunk to the empty basis without changing its span.

Otherwise, โˆƒ๐‘ โƒ—โˆˆ๐‘† s.t. ๐‘ โƒ—โ‰ 0โƒ— and we can form a basis ๐ตโ‰”โŸจ๐‘ โƒ—โŸฉ. If [๐ต]=[๐‘†] then we are done. Otherwise, โˆƒ๐‘กโƒ—โˆˆ[๐‘†] s.t. ๐‘กโƒ—โˆ‰[๐ต], so we can append ๐‘กโƒ— to ๐ต. By Lemmaย 2.2.7, ๐ต is still linearly independent. We can then check if [๐ต]=[๐‘†], and keep repeating this process until the spans are equal, which must happen in a finite number of steps.

Corollary 2.3.12: In an ๐‘›-dimensional space, a set composed of ๐‘› vectors is linearly independent iff it spans the space.

Proof:

A set composed of ๐‘› vectors is linearly independent iff it is a basis: the โ€œifโ€ direction is clear, and the other directions holds because any linearly independent set can be expanded to a basis, but it already has ๐‘› elements so must already be a basis.

A subset of ๐‘› vectors spans the space iff it is a basis: again the โ€œifโ€ direction is clear, and the other direction holds because any spanning set can be shrunk to a basis, but it already has ๐‘› elements so must already be a basis.

Definition 2.3.13: The row space of a matrix is the span of the set of its rows. The row rank is the dimension of this space, the number of linearly independent rows.

Lemma 2.3.14: If two matrices ๐ด and ๐ต are related by a row operation, ๐œŒ๐‘–โ†”๐œŒ๐‘—, ๐‘˜๐œŒ๐‘– or ๐‘˜๐œŒ๐‘–+๐œŒ๐‘— for ๐‘–โ‰ ๐‘—, then their row spaces are equal.

Proof:

By Corollaryย 1.3.6, each row of ๐ต is a linear combination of the rows of ๐ด; that is, each row of ๐ต is in the rowspace of ๐ด. It follows by the Linear Combination Lemma that Rowspace(๐ต) โІ Rowspace(๐ด), since each element of the rowspace of ๐ต is a linear combination of the rows of ๐ต, so is a linear combination of a linear combination of the rows of ๐ด, i.e. just a linear combination of the rows of ๐ด. Because elementary row operations are reversible (by Lemmaย 1.3.2), the same argument can be applied to show that Rowspace(๐ต) โЇ Rowspace(๐ด); by double-inclusion, the rowspaces are equal.

Corollary 2.3.15: Row-equivalent matrices have the same row space and therefore the same row rank.

Lemma 2.3.16: The nonzero rows of an echelon form matrix make up a linearly independent set.

Proof:

This is a restatement of Lemmaย 1.3.7 using new terminology.

Definition 2.3.17: The column space of a matrix is the span of the set of its columns. The column rank is the dimension of the column space, the number of linearly independent columns.
Definition 2.3.18: The transpose of a matrix is the result of interchanging its rows and columns, so that the column ๐‘— of the matrix ๐ด is row ๐‘— of ๐ดโŠค and vice-versa.

Lemma 2.3.19: Row operations do not change the column rank.

Proof:

By Lemmaย 1.1.4, row operations do not change the solution space of a system, so they must preserve linear relationships among columns. Therefore, they do not change the number of linearly independent columns, so they preserve column rank.

Remark: Unlike the row space, the column space might change under row operations; it is only the column rank that is invariant under row operations.

Theorem 2.3.20: For any matrix, the row rank and column rank are equal.

Proof:

Any matrix ๐ด is row-equivalent to a reduced echelon form matrix, with the same row and column rank as ๐ด by Lemmasย 2.3.15 and ย 2.3.19. The row rank of ๐ด is the number of nonzero rows in the reduced echelon form matrix, which is equal to the number of leading entries in the reduced echelon form matrix; the column rank of ๐ด is also equal to the number of leading entries, since the columns containing leading entries form a subset of the standard basis, so all other columns can be expressed as a linear combination of the rows containing leading entries.

Definition 2.3.21: The rank of a matrix is its row rank or column rank.

Theorem 2.3.22: For linear systems with ๐‘› unknowns and with matrix of coefficients ๐ด, the rank of ๐ด is ๐‘Ÿ iff the vector space of solutions of the associated homogeneous system has dimension (๐‘›โˆ’๐‘Ÿ).

Proof:

The rank of ๐ด is ๐‘Ÿ iff the reduced echelon form matrix of ๐ด has ๐‘Ÿ leading variables. There must be (๐‘›โˆ’๐‘Ÿ) free variables in the reduced echelon form matrix, so the solution space of the associated homogeneous system has dimension (๐‘›โˆ’๐‘Ÿ).


Corollary 2.3.23: Where the matrix ๐ด is ๐‘›ร—๐‘›, the following statements are equivalent:

  1. the rank of ๐ด is ๐‘›
  2. ๐ด is nonsingular
  3. the rows of ๐ด form a linearly independent set
  4. the columns of ๐ด form a linearly independent set
  5. any linear system whose matrix of coefficients is ๐ด has one and only one solution.

Proof:

TODO

Definition 2.3.24: Where ๐‘Š1,โ€ฆ,๐‘Š๐‘˜ are subspaces of a vector space, their sum is the span of their union: ๐‘Š1+โ€ฆ+๐‘Š๐‘˜=[๐‘Š1โˆชโ€ฆโˆช๐‘Š๐‘˜].

Definition 2.3.25: The concatenation of the sequences ๐ต1,โ€ฆ,๐ต๐‘˜ adjoins them into a single sequence.

๐ต1โœ๐ต2โœโ€ฆโœ๐ต๐‘˜=โŸจ๐›ฝโƒ—1,1,โ€ฆ,๐›ฝโƒ—1,๐‘›1,โ€ฆ,๐›ฝโƒ—๐‘˜,1,โ€ฆ,๐›ฝโƒ—๐‘˜,๐‘›๐‘˜โŸฉ
Definition 2.3.26: A collection of subspaces {๐‘Š1,โ€ฆ,๐‘Š๐‘˜} is independent if no nonzero vector from any ๐‘Š๐‘– is a linear combination of vectors from the other subspaces. Equivalently, among ๐‘คโƒ—๐‘–s from different ๐‘Š๐‘–s, any linear relationship is trivial.

Lemma 2.3.27: Let ๐‘‰ be a vector space that is the sum of some of its subspaces, ๐‘‰=๐‘Š1+โ€ฆ+๐‘Š๐‘˜. Let ๐ต1,โ€ฆ,๐ต๐‘˜ be bases for these subspaces. Then the following are equivalent:

  1. Any ๐‘ฃโƒ—โˆˆ๐‘‰ can be expressed as a combination of unique ๐‘คโƒ—๐‘–โˆˆ๐‘Š๐‘–, ๐‘ฃโƒ—=๐‘คโƒ—1,โ€ฆ,๐‘คโƒ—๐‘˜;
  2. The concatenation ๐ต1โœโ€ฆโœ๐ต๐‘˜ is a basis for ๐‘‰;
  3. The ๐‘Š๐‘–s are independent.
Proof: TODO? possibly out of scope
Definition 2.3.28: A vector space ๐‘‰ is the direct sum (or internal direct sum) of its subspaces ๐‘Š1,โ€ฆ,๐‘Š๐‘˜ if ๐‘‰=๐‘Š1+โ€ฆ+๐‘Š๐‘˜ and the collection {๐‘Š1,โ€ฆ,๐‘Š๐‘˜} is independent. We write ๐‘‰=๐‘Š1โŠ•๐‘Š2โŠ•โ€ฆโŠ•๐‘Š๐‘˜.
Remark: If the conditions of Lemmaย 2.3.27 hold, then ๐‘‰ is a direct sum of ๐‘Š1,โ€ฆ,๐‘Š๐‘˜.

Corollary 2.3.29: The dimension of a direct sum is the sum of the dimensions of its summands.

Proof:

In Lemmaย 2.3.27, the number of vectors in the concatenated basis is the same as the sum of the number of vectors in each sub-basis.

Definition 2.3.30: When a vector space is the direct sum of two of its subspaces, those subspaces are complements.

Example: In โ„2, the ๐‘ฅ- and ๐‘ฆ-axes are complements.

Lemma 2.3.31: A vector space is the direct sum of two of its subspaces ๐‘Š1,๐‘Š2 iff ๐‘‰=๐‘Š1+๐‘Š2 and ๐‘Š1โˆฉ๐‘Š2={0โƒ—} i.e. their intersection is trivial.

Proof:

If ๐‘‰=๐‘Š1โŠ•๐‘Š2, then by definition of direct sum, ๐‘‰=๐‘Š1+๐‘Š2; furthermore, since ๐‘Š1 and ๐‘Š2 are independent, the linear combination ๐‘ฃโƒ—=๐‘ฃโƒ— for ๐‘ฃโˆˆ๐‘Š1โˆฉ๐‘Š2 can only have the trivial solution ๐‘ฃโƒ—=0โƒ— if we want a member of ๐‘Š1 on the left side and a member of ๐‘Š2 on the right, w.l.o.g.

Conversely, if ๐‘Š1โˆฉ๐‘Š2 then if we express ๐‘คโƒ—0โˆˆ๐‘Š1 as a linear combination of ๐‘คโƒ—1,โ€ฆ,๐‘คโƒ—๐‘›โˆˆ๐‘Š2, ๐‘ค0=๐‘1๐‘คโƒ—1+โ€ฆ+๐‘๐‘›๐‘คโƒ—๐‘› then ๐‘คโƒ—0 must also be in ๐‘Š2, as linear combinations of elements of a vector space are also in that vector space. But the intersection of ๐‘Š1 and ๐‘Š2 is trivial, so ๐‘Š1 and ๐‘Š2 satisfy the definition of independence; since they sum to ๐‘‰, they form a direct sum of ๐‘‰.

3 Maps between spaces

3.i Isomorphisms

Definition 3.1.1: An isomorphism between two vector spaces ๐‘‰ and ๐‘Š is a map ๐‘“:๐‘‰โ†’๐‘Š such that

  1. ๐‘“ is a bijection/correspondence;
  2. ๐‘“ preserves structure: if ๐‘ฃ1,๐‘ฃ2โˆˆ๐‘‰ then

    ๐‘“(๐‘ฃ1+๐‘ฃ2)=๐‘“(๐‘ฃ1)+๐‘“(๐‘ฃ2)

    and if ๐‘ฃโˆˆ๐‘‰ and ๐‘Ÿโˆˆโ„ then

    ๐‘“(๐‘Ÿ๐‘ฃ)=๐‘Ÿ๐‘“(๐‘ฃ).

(We write ๐‘‰โ‰…๐‘Š, read โ€œV is isomorphic to Wโ€, when such a map exists.)

To verify that ๐‘“:๐‘‰โ†’๐‘Š is an isomorphism, show that:

  • ๐‘“ is injective/one-to-one, i.e. ๐‘“(๐‘ฃโƒ—1)=๐‘“(๐‘ฃโƒ—)2โ‡”๐‘ฃโƒ—1=๐‘ฃโƒ—2โˆ€๐‘ฃโƒ—1,๐‘ฃโƒ—2โˆˆ๐‘‰;
  • ๐‘“ is surjective/onto, i.e. โˆ€๐‘คโƒ—โˆˆ๐‘Šโˆƒ๐‘ฃโƒ—โˆˆ๐‘‰:๐‘“(๐‘ฃโƒ—)=๐‘คโƒ—;
  • ๐‘“ preserves addition, i.e. ๐‘“(๐‘ฃโƒ—1+๐‘ฃโƒ—2)=๐‘“(๐‘ฃโƒ—1)+๐‘“(๐‘ฃโƒ—2)โˆ€๐‘ฃโƒ—1,๐‘ฃโƒ—2โˆˆ๐‘‰;
  • ๐‘“ preserves scalar multiplication, i.e. ๐‘“(๐‘Ÿโ‹…๐‘ฃโƒ—)=๐‘Ÿโ‹…๐‘“(๐‘ฃโƒ—)โˆ€๐‘ฃโƒ—โˆˆ๐‘‰,๐‘Ÿโˆˆโ„.
Remark: Structure preservation is special. Many bijections do not preserve addition and scalar multiplication.
Definition 3.1.2: An automorphism is an isomorphism of a space with itself.
Example: A dilation map ๐‘‘๐‘ :โ„2โ†’โ„2 that multiplies all vectors by a nonzero scalar ๐‘  is an automorphism of โ„2.
Example: A rotation or turning map ๐‘ก๐œƒ that rotates all vectors through an angle ๐œƒ is an automorphism.
Remark: Automorphisms are relevant to study, despite seeming trivial, because they formalise the intuitive notion that space near the ๐‘ฅ-axis is like space near the ๐‘ฆ-axis.

Lemma 3.1.3: An isomorphism maps the zero vector to the zero vector.

Proof: Where ๐‘“:๐‘‰โ†’๐‘Š is an isomorphism, fix some ๐‘ฃโƒ—โˆˆ๐‘‰. Then

๐‘“(0โƒ—๐‘‰)=๐‘“(0โ‹…๐‘ฃโƒ—)=0โ‹…๐‘“(๐‘ฃโƒ—)=0โƒ—๐‘Š.

Lemma 3.1.4: For any map ๐‘“:๐‘‰โ†’๐‘Š between vector spaces, the following statements are equivalent:

  1. ๐‘“ preserves structure
  2. ๐‘“ preserves linear combinations of two vectors
  3. ๐‘“ preserves linear combinations of any finite number of vectors

Proof:

TODO (in Hefferon)

Lemma 3.1.5: The inverse of an isomorphism is also an isomorphism.

Proof:

Suppose that ๐‘‰โ‰…๐‘Š by ๐‘“:๐‘‰โ†’๐‘Š. Because isomorphisms are bijections, ๐‘“ has an inverse ๐‘“โˆ’1:๐‘Šโ†’๐‘‰.

Suppose that ๐‘คโƒ—1,๐‘คโƒ—2โˆˆ๐‘Š. Because it is an isomorphism, ๐‘“ is surjective and โˆƒ๐‘ฃโƒ—1,๐‘ฃโƒ—2โˆˆ๐‘‰:๐‘คโƒ—1=๐‘“(๐‘ฃโƒ—1),๐‘คโƒ—2=๐‘“(๐‘ฃโƒ—2). Then

๐‘“โˆ’1(๐‘1โ‹…๐‘คโƒ—1+๐‘2โ‹…๐‘คโƒ—2)=๐‘“โˆ’1(๐‘1โ‹…๐‘“(๐‘ฃโƒ—1)+๐‘2โ‹…๐‘“(๐‘ฃโƒ—2))=๐‘“โˆ’1(๐‘“(๐‘1โ‹…๐‘ฃโƒ—1+๐‘2โ‹…๐‘ฃโƒ—2))=๐‘1โ‹…๐‘ฃโƒ—1+๐‘2โ‹…๐‘ฃโƒ—2=๐‘1โ‹…๐‘“โˆ’1(๐‘คโƒ—1)+๐‘2โ‹…๐‘“โˆ’1(๐‘คโƒ—2)since๐‘คโƒ—1=๐‘“(๐‘ฃโƒ—1)and๐‘คโƒ—2=๐‘“(๐‘ฃโƒ—2).

Therefore ๐‘“โˆ’1 preserves structure and hence satisfies the necessary conditions to be an isomorphism.

Theorem 3.1.6: Isomorphism is an equivalence relation between vector spaces.

Proof:

Isomorphism is reflexive, since the identity function is an isomorphism, since it is clearly a bijection and preserves structure:

id(๐‘1๐‘ฃโƒ—1+๐‘2๐‘ฃโƒ—2)=๐‘1๐‘ฃโƒ—1+๐‘2๐‘ฃโƒ—2=๐‘1id(๐‘ฃโƒ—1)+๐‘2id(๐‘ฃโƒ—2).

Symmetry holds by Lemmaย 3.1.5.

For transitivity, suppose that ๐‘‰โ‰…๐‘Š and ๐‘Šโ‰…๐‘ˆ, and let ๐‘“:๐‘‰โ†’๐‘Š and ๐‘”:๐‘Šโ†’๐‘ˆ be isomorphisms. Then ๐‘”โˆ˜๐‘“ is bijective, and structure preserving:

(๐‘“โˆ˜๐‘”)(๐‘1๐‘ฃโƒ—1+๐‘2๐‘ฃโƒ—2)=๐‘“(๐‘”(๐‘1๐‘ฃโƒ—1+๐‘2๐‘ฃโƒ—2))=๐‘“(๐‘1๐‘”(๐‘ฃโƒ—1)+๐‘2๐‘”(๐‘ฃโƒ—2))=๐‘1๐‘“(๐‘”(๐‘ฃโƒ—1))+๐‘2๐‘“(๐‘”(๐‘ฃโƒ—2))=๐‘1(๐‘“โˆ˜๐‘”)(๐‘ฃโƒ—1)+๐‘2(๐‘“โˆ˜๐‘”)(๐‘ฃโƒ—2).

Lemma 3.1.7: If spaces are isomorphic then they have the same dimension.

Proof:

TODO (in Hefferon)

Lemma 3.1.8: If spaces have the same dimension then they are isomorphic.

Proof:

TODO (in Hefferon)

Theorem 3.1.9: Vector spaces are isomorphic iff they have the same dimension.

Corollary 3.1.10: Every finite-dimensional vector space is isomorphic to exactly one of the โ„๐‘›.

Thus the real spaces {โ„๐‘›|๐‘›โˆˆโ„•} form a set of canonical representatives of the isomorphism classes.

3.ii Homomorphisms

Definition 3.2.1: A homomorphism or linear map between vector spaces is a function โ„Ž:๐‘‰โ†’๐‘Š that preserves addition and scalar multiplication. Such a function is said to satisfy linearity.

Lemma 3.2.2: A linear map maps the zero vector to the zero vector.

Proof:

The proof is the same as the proof to Lemmaย 3.1.3.

Lemma 3.2.3: The following statements are equivalent for any map ๐‘“:๐‘‰โ†’๐‘Š between vector spaces:

  1. ๐‘“ is a homomorphism;
  2. ๐‘“(๐‘1โ‹…๐‘ฃโƒ—1+๐‘2โ‹…๐‘ฃโƒ—2)=๐‘1โ‹…๐‘“(๐‘ฃโƒ—1)+๐‘2โ‹…๐‘“(๐‘ฃโƒ—2);
  3. ๐‘“(๐‘1โ‹…๐‘ฃโƒ—1+โ€ฆ+๐‘๐‘›โ‹…๐‘ฃโƒ—๐‘›)=๐‘1๐‘“(๐‘ฃโƒ—1)+โ€ฆ+๐‘๐‘›๐‘“(๐‘ฃโƒ—๐‘›).

Proof:

TODO (in Hefferon)

Example: The inclusion map ๐œ„:โ„2โ†’โ„3;(๐‘ฅ๐‘ฆ)โ†ฆ(๐‘ฅ๐‘ฆ0) is a homomorphism.
Example: The derivative is a homomorphism on polynomial spaces (and in general).

Definition 3.2.4: The trace of a square matrix is the sum down the upper-left to bottom-right diagonal. So Tr:โ„ณ๏ธ€2ร—2โ†’โ„ is:

Tr((๐‘Ž๐‘๐‘๐‘‘))=๐‘Ž+๐‘‘.
Remark: Tr is a linear map.

Theorem 3.2.5: A homomorphism is determined by its action on a basis: if ๐‘‰ is a vector space with basis โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘›โŸฉ, ๐‘Š is a vector space, and ๐‘คโƒ—1,โ€ฆ,๐‘คโƒ—๐‘›โˆˆ๐‘Š (not necessarily distinct), then there exists a homomorphism from ๐‘‰ to ๐‘Š sending each ๐›ฝโƒ—๐‘– to ๐‘คโƒ—๐‘–, and that homomorphism is unique.

Proof:

TODO (in Hefferon)

Definition 3.2.6: Let ๐‘‰ and ๐‘Š be vector spaces and let ๐ต=โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘›โŸฉ be a basis for ๐‘‰. A function defined on that basis ๐‘“:๐ตโ†’๐‘Š is extended linearly to a function ๐‘“ฬ‚:๐‘‰โ†’๐‘Š if, for all ๐‘ฃโƒ—โˆˆ๐‘‰ s.t. ๐‘ฃโƒ—=๐‘1โ‹…๐›ฝโƒ—1+โ€ฆ+๐‘๐‘›โ‹…๐›ฝโƒ—๐‘›, the action of the map is ๐‘“ฬ‚(๐‘ฃโƒ—)=๐‘1โ‹…๐‘“(๐›ฝโƒ—1)+โ€ฆ+๐‘๐‘›๐‘“(๐›ฝโƒ—๐‘›).

Example (Derivation of ๐‘ก๐œƒ (rotation)):

(10)โ†ฆ(cos๐œƒsin๐œƒ);(01)โ†ฆ(โˆ’sin๐œƒcos๐œƒ).

Extending linearly:

๐‘ก๐œƒ((๐‘ฅ๐‘ฆ))=๐‘ก๐œƒ(๐‘ฅโ‹…(10)+๐‘ฆโ‹…(01))=๐‘ฅโ‹…๐‘ก๐œƒ((10))+๐‘ฆโ‹…๐‘ก๐œƒ(01)=๐‘ฅโ‹…(cos๐œƒsin๐œƒ)+๐‘ฆโ‹…(โˆ’sin๐œƒ,cos๐œƒ)=(๐‘ฅcos๐œƒโˆ’๐‘ฆsin๐œƒ๐‘ฅsin๐œƒ+๐‘ฆcos๐œƒ).
Definition 3.2.7: A linear map from a space into itself ๐‘ก:๐‘‰โ†’๐‘‰ is a linear transformation. This is also known as an endomorphism.
Remark: An automorphism is a bijective endomorphism.

Lemma 3.2.8: For vector spaces ๐‘‰ and ๐‘Š, the set of linear functions from ๐‘‰ to ๐‘Š is itself a vector space, a subspace of the space of all functions from ๐‘‰ to ๐‘Š. We denote the space of linear maps from ๐‘‰ to ๐‘Š by โ„’๏ธ€(๐‘‰,๐‘Š).

Alternatively: a linear combination of homomorphisms is also a homomorphism.

Proof:

TODO (in Hefferon)

Lemma 3.2.9: Under a homomorphism, the image of any subspace of the domain is a subspace of the codomain. In particular, the image of the entire space, the range of the homomorphism, is a subspace of the codomain.

That is, given vector spaces ๐‘‰,๐‘Š and a homomorphism โ„Ž:๐‘‰โ†’๐‘Š, ๐‘Šโ€ฒโ‰”{โ„Ž(๐‘ฃ):๐‘ฃโˆˆ๐‘‰โ€ฒ}โІ๐‘Šโˆ€๐‘‰โ€ฒโІ๐‘‰ where ๐‘‰โ€ฒ and ๐‘Šโ€ฒ are subspaces of ๐‘‰ and ๐‘Š respectively.

Proof:

TODO (in Hefferon)

Definition 3.2.10: The range space of a homomorphism โ„Ž:๐‘‰โ†’๐‘Š is

โ„›๏ธ€(โ„Ž)={โ„Ž(๐‘ฃโƒ—)|๐‘ฃโƒ—โˆˆ๐‘‰},
sometimes denoted โ„Ž(๐‘‰). The dimension of the range space is the mapโ€™s rank.
Definition 3.2.11: For any function โ„Ž:๐‘‰โ†’๐‘Š, the set of elements of ๐‘‰ that map to ๐‘คโƒ—โˆˆ๐‘Š is the inverse image โ„Žโˆ’1(๐‘คโƒ—)={๐‘ฃโƒ—โˆˆ๐‘‰|โ„Ž(๐‘ฃโƒ—)=๐‘คโƒ—}.

Lemma 3.2.12: For any homomorphism the inverse image of a subspace of the range is a subspace of the domain. In particular, the inverse image of the trivial subspace of the range is a subspace of the domain.

Proof:

TODO (in Hefferon)

Definition 3.2.13: The null space, or kernel, of a linear map โ„Ž:๐‘‰โ†’๐‘Š is the inverse image of 0โƒ—๐‘Š.

๐’ฉ๏ธ€(โ„Ž)=โ„Žโˆ’1(0โƒ—๐‘Š)={๐‘ฃโƒ—โˆˆ๐‘‰|โ„Ž(๐‘ฃโƒ—)=0โƒ—๐‘Š}.
Definition 3.2.14: The dimension of the null space is the mapโ€™s nullity.

Theorem 3.2.15 (rank-nullity theorem): Given a linear map โ„Ž:๐‘‰โ†’๐‘Š,

Dim(๐‘‰)=Dim(โ„›๏ธ€(โ„Ž))+Dim(๐’ฉ๏ธ€(โ„Ž)).

Proof:

TODO (in Hefferon)

Lemma 3.2.16: Under a linear map, the image of a linearly dependent set is linearly dependent.

Proof:

Suppose that ๐‘1๐‘ฃโƒ—1+โ€ฆ+๐‘๐‘›๐‘ฃโƒ—๐‘›=0โƒ—๐‘‰ with some ๐‘๐‘– nonzero. Apply โ„Ž to both sides: โ„Ž(๐‘1๐‘ฃโƒ—1+โ€ฆ+๐‘๐‘›๐‘ฃโƒ—๐‘›)=๐‘1โ„Ž(๐‘ฃโƒ—1)+โ€ฆ+๐‘๐‘›โ„Ž(๐‘ฃโƒ—๐‘›) and โ„Ž(0โƒ—๐‘‰)=0โƒ—๐‘Š. We still have some ๐‘๐‘– nonzero, so the set of the โ„Ž(๐‘ฃโƒ—๐‘–)s is linearly dependent.

Theorem 3.2.17: Where ๐‘‰ is an ๐‘›-dimensional vector space, these are equivalent statements:

  1. โ„Ž is one-to-one/injective;
  2. โ„Ž has an inverse from its range to its domain that is a linear map;
  3. ๐’ฉ๏ธ€(โ„Ž)={0โƒ—}, that is, nullity(โ„Ž)=0;
  4. rank(โ„Ž)=๐‘› ;
  5. if โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘›โŸฉ is a basis for ๐‘‰ then โŸจโ„Ž(๐›ฝโƒ—1),โ€ฆ,โ„Ž(๐›ฝโƒ—๐‘›) is a basis for โ„›๏ธ€(โ„Ž).

Proof:

TODO (in Hefferon)

Remark: A one-to-one homomorphism is an isomorphism.

3.iii Computing linear maps

Definition 3.3.1: Suppose that ๐‘‰ and ๐‘Š are vector space of dimensions ๐‘› and ๐‘š with bases ๐ต and ๐ท, and that โ„Ž:๐‘‰โ†’๐‘Š is a linear map. If

Rep๐ท(โ„Ž(๐›ฝโƒ—1))=(โ„Ž1,1โ‹ฎโ„Ž๐‘š,1)๐ท;โ€ฆ=โ€ฆ; Rep๐ท(โ„Ž(๐›ฝโƒ—๐‘›))=(โ„Ž1,๐‘›โ‹ฎโ„Ž๐‘š,๐‘›)๐ท

then

Rep๐ต,๐ท(โ„Ž)=(โ„Ž1,1โ€ฆโ„Ž1,๐‘›โ‹ฑโ‹ฎโ„Ž๐‘š,๐‘›)๐ต,๐ท
is the matrix representation of โ„Ž with respect to ๐ต,๐ท.

Theorem 3.3.2: Assume that ๐‘‰ and ๐‘Š are vector spaces of dimensions ๐‘› and ๐‘š, and that โ„Ž:๐‘‰โ†’๐‘Š is a linear map. If โ„Ž is represented by

Rep๐ต,๐ท(โ„Ž)=(โ„Ž1,1โ€ฆโ„Ž1,๐‘›โ‹ฑโ‹ฎโ„Ž๐‘š,๐‘›)๐ต,๐ท

and ๐‘ฃโƒ— is represented by

Rep๐ต(๐‘ฃโƒ—)=(๐‘1โ‹ฎ๐‘๐‘›)

then the representation of the image of ๐‘ฃโƒ— is

Rep๐ท(โ„Ž(๐‘ฃโƒ—))=(๐‘1โ„Ž1,1+โ€ฆ+๐‘๐‘›โ„Ž1,๐‘›โ‹ฎ๐‘1โ„Ž๐‘š,1+โ€ฆ+๐‘๐‘›โ„Ž๐‘š,๐‘›)๐ท.

Definition 3.3.3: The matrix-vector product of an ๐‘šร—๐‘› matrix and an ๐‘›ร—1 vector is

(๐‘Ž1,1โ‹ฏ๐‘Ž1,๐‘›โ‹ฎโ‹ฑโ‹ฎ๐‘Ž๐‘š,1โ‹ฏ๐‘Ž๐‘š,๐‘›)(๐‘ฃ1โ‹ฎ๐‘ฃ๐‘›)=(๐‘Ž1,1๐‘ฃ1+โ€ฆ+๐‘Ž1,๐‘›๐‘ฃ๐‘›โ‹ฎ๐‘Ž๐‘š,1๐‘ฃ1+โ€ฆ+๐‘Ž๐‘š,๐‘›๐‘ฃโƒ—๐‘›).

Theorem 3.3.4: Any matrix represents a homomorphism between vector spaces of appropriate dimensions, with respect to any pair of bases.

Proof:

TODO (in Hefferon)

Theorem 3.3.5: The rank of a matrix equals the rank of any map that it represents.

Proof:

TODO (in Hefferon)

Definition 3.3.7: A linear map that is one-to-one and onto is nonsingular, otherwise it is singular. That is, a linear map is nonsingular iff it is an isomorphism.

Lemma 3.3.8: A nonsingular map is represented by a square matrix. A square matrix represents nonsingular maps iff it is a nonsingular matrix. Thus, a matrix represents an isomorphism iff it is nonsingular.

Proof:

Assume that the homomorphism โ„Ž:๐‘‰โ†’๐‘Š is nonsingular. Thus by Corollaryย 3.3.6, for any matrix ๐ป representing โ„Ž, ๐ป has full column rank and full row rank. Since a matrixโ€™s row rank is equal to its column rank, the number of rows is equal to the number of columns and so ๐ป is a square matrix; since it has full rank, it is nonsingular.

Conversely, assume that ๐ป is a square nonsingular ๐‘›ร—๐‘› matrix. To be nonsingular, it must have full row and column rank, which is true iff โ„Ž is an isomorphism, by Lemmaย 3.1.7, since the domain and codomain have the same dimension.

3.iii.i Computing range and null spaces

TODO - rewatch end of lecture

3.iv Matrix operations

Theorem 3.4.1: Let โ„Ž,๐‘”:๐‘‰โ†’๐‘Š be linear maps represented with respect to bases ๐ต,๐ท by the matrices ๐ป and ๐บ and let ๐‘Ÿ be a scalar. Then with respect to ๐ต,๐ท the linear map ๐‘Ÿโ‹…โ„Ž:๐‘‰โ†’๐‘Š is represented by ๐‘Ÿ๐ป and the map โ„Ž+๐‘”:๐‘‰โ†’๐‘Š is represented by ๐ป+๐บ.
Definition 3.4.2: A zero matrix has all entries zero. We write ๐‘๐‘›ร—๐‘š or ๐‘ or 0๐‘›ร—๐‘š or just 0.

Lemma 3.4.3: The composition of linear maps is linear.

Proof:

Let โ„Ž:๐‘‰โ†’๐‘Š and ๐‘”:๐‘Šโ†’๐‘ˆ be linear.

(๐‘”โˆ˜โ„Ž)(๐‘1โ‹…๐‘ฃโƒ—๐‘ค+๐‘2โ‹…๐‘ฃโƒ—2)=๐‘”(โ„Ž(๐‘1โ‹…๐‘ฃโƒ—1+๐‘2โ‹…๐‘ฃโƒ—2))=๐‘”(๐‘1โ‹…โ„Ž(๐‘ฃโƒ—1)+๐‘2โ‹…โ„Ž(๐‘ฃโƒ—2))=๐‘1โ‹…๐‘”(โ„Ž(๐‘ฃโƒ—1))+๐‘2โ‹…๐‘”(โ„Ž(๐‘ฃโƒ—2))=๐‘1โ‹…(๐‘”โˆ˜โ„Ž)(๐‘ฃโƒ—1)+๐‘2โ‹…(๐‘”โˆ˜โ„Ž)(๐‘ฃโƒ—2)

hence ๐‘”โˆ˜โ„Ž is linear.

Theorem 3.4.4: A composition of linear maps is represented by the matrix product of the representations.

Proof:

TODO (in Hefferon)

(TODO: arrow diagrams)

Remark: Matrix multiplication is not commutative in general.

Theorem 3.4.5: If ๐น,๐บ,๐ป are matrices, and the matrix products are defined, then the product is associate and distributes over matrix addition.

Proof:

Associativity holds because matrix multiplication represents function composition, which is associative.

Distributivity is similar, coming from the linearity of linear maps.

Lemma 3.4.6: In a product of two matrices ๐บ and ๐ป, the columns of ๐บ๐ป are formed by taking ๐บ times the columns of ๐ป and the rows of ๐บ๐ป are formed by taking the rows of ๐บ times ๐ป.

Definition 3.4.7: A matrix with all zeros except for a 1 in the ๐‘–,๐‘—th entry is an ๐‘–,๐‘—-unit matrix or matrix unit.

Left-multiplying the ๐‘–,๐‘—-unit matrix copies row ๐‘— of the multiplicand into row ๐‘– of the result; right-multiplying by the ๐‘–,๐‘—-unit copies column ๐‘– of the multiplicand into column ๐‘— of the result.

Scaling a unit matrix scales the result.

Definition 3.4.8: The main diagonal or leading diagonal or principle diagonal goes from the upper left to lower right.

Definition 3.4.9: An identity matrix is square and every entry is 0 except for 1s in the leading diagonal.

โˆ€๐ดโˆˆโ„๐‘›ร—๐‘›, ๐ผ๐‘›๐ด=๐ด๐ผ๐‘›๐ด.
Definition 3.4.10: A diagonal matrix is square and has 0s off of the main diagonal.

Definition 3.4.11: A permutation matrix is square and is all 0s except for a single 1 in each row and column.

Left-multiplying by a permutation matrix permutes rows, right-multiplying permutes columns.

Definition 3.4.12: The elementary reduction matrices result from applying a single Gaussian operation to an identity matrix.

  1. ๐ผโ†’๐‘˜๐œŒ๐‘–๐‘€๐‘–(๐‘˜) for ๐‘˜โ‰ 0 (think Multiply);

  2. ๐ผโ†’๐œŒ๐‘–โ†”๐œŒ๐‘—๐‘ƒ๐‘–,๐‘— for ๐‘–โ‰ ๐‘— (think Permute);

  3. ๐ผโ†’๐‘˜๐œŒ๐‘–+๐œŒ๐‘—๐ถ๐‘–,๐‘—(๐‘˜) for ๐‘–โ‰ ๐‘— (think Carry over?)

Lemma 3.4.13: Matrix multiplication can do Gaussian reduction.

Proof:

Clear - just left-multiply by the relevant elementary reduction matrix.

Corollary 3.4.14: For any matrix ๐ป there are elementary reduction matrices ๐‘…1,โ€ฆ,๐‘…๐‘Ÿ such that ๐‘…๐‘Ÿโ‹…๐‘…๐‘Ÿโˆ’1โ‹ฏ๐‘…1โ‹…๐ป is in reduced echelon form.
Definition 3.4.15: If we have ๐œ‹โˆ˜๐œ„=id, we say that ๐œ„ is the right-inverse of ๐œ‹, and likewise ๐œ‹ is the left-inverse of ๐œ„.

Definition 3.4.16: A function ๐‘“ has a two-sided inverse ๐‘” if ๐‘” is a right-inverse and left-inverse. In this case, the inverse in unique.

Note: this means that ๐‘“ is a bijection.

Note: recall that if a linear map has a two-sided inverse, the inverse is also a linear map.

Definition 3.4.17: A matrix ๐บ is a left-inverse matrix of the matrix ๐ป if ๐บ๐ป is the identity matrix. It is a right inverse if ๐ป๐บ is the identity matrix. A matrix ๐ป with a two-sided inverse is an invertible matrix. The two-sided inverse is denoted ๐ปโˆ’1.

Lemma 3.4.18: If a matrix has both a left inverse and right inverse then the two are equal.

Proof: See Theoremย 3.4.19.

Theorem 3.4.19: A matrix is invertible iff it is nonsingular.

Proof:

Given a matrix ๐ป, fix spaces of appropriate dimension for the domain and codomain and fix bases for these spaces. With respect to these bases, ๐ป represents a map โ„Ž. The statements are true about the map and therefore they are true about the matrix.

This also proves Lemmaย 3.4.18.

Lemma 3.4.20: A product of invertible matrices is invertible. That is, if ๐บ,๐ป are invertible and ๐บ๐ป is defined then ๐บ๐ป is invertible and (๐บ๐ป)โˆ’1=๐ปโˆ’1๐บโˆ’1.
Lemma 3.4.21: A matrix ๐ป is invertible iff it can be written as the product of elementary reduction matrices. We can compute the inverse by applying to the identity matrix the same row steps, in the same order, that Gauss-Jordan reduce ๐ป.

Corollary 3.4.22: The inverse of a 2ร—2 matrix exists and equals

(๐‘Ž๐‘๐‘๐‘‘)โˆ’1=1๐‘Ž๐‘‘โˆ’๐‘๐‘(๐‘‘โˆ’๐‘โˆ’๐‘๐‘Ž)

iff ๐‘Ž๐‘‘โˆ’๐‘๐‘.

Proof:

(1๐‘Ž๐‘‘โˆ’๐‘๐‘(๐‘‘โˆ’๐‘โˆ’๐‘๐‘Ž))(๐‘Ž๐‘๐‘๐‘‘)=1๐‘Ž๐‘‘โˆ’๐‘๐‘(๐‘Ž๐‘‘โˆ’๐‘๐‘๐‘‘๐‘โˆ’๐‘๐‘‘โˆ’๐‘Ž๐‘+๐‘Ž๐‘โˆ’๐‘๐‘+๐‘Ž๐‘‘)=(1001);(๐‘Ž๐‘๐‘๐‘‘)(1๐‘Ž๐‘‘โˆ’๐‘๐‘(๐‘‘โˆ’๐‘โˆ’๐‘๐‘Ž))=1๐‘Ž๐‘‘โˆ’๐‘๐‘(๐‘Ž๐‘‘โˆ’๐‘๐‘โˆ’๐‘Ž๐‘+๐‘๐‘Ž๐‘๐‘‘โˆ’๐‘‘๐‘โˆ’๐‘๐‘+๐‘‘๐‘Ž)=(1001).

3.v Change of basis

Definition 3.5.1: The change in basis matrix for bases ๐ต,๐ทโŠ‚๐‘‰ is the representation of the identity map id:๐‘‰โ†’๐‘‰ with respect to those bases.

Rep๐ต,๐ท(id)=(โ‹ฎโ‹ฎRep๐ท(๐›ฝโƒ—1)โ‹ฏRep๐ท(๐›ฝโƒ—๐‘›)โ‹ฎโ‹ฎ).

Lemma 3.5.2: Rep๐ท(๐‘ฃโƒ—)=Rep๐ต,๐ท(id)โ‹…Rep๐ต(๐‘ฃโƒ—).

Proof:

Trivial.

Lemma 3.5.3: A matrix changes base iff it is nonsingular.

Proof:

TODO: in Hefferon

Corollary 3.5.4: A matrix is nonsingular iff it represents the identity map with respect to some pair of bases.

Theorem 3.5.5: To convert from the matrix ๐ป representing a map โ„Ž with respect to ๐ต,๐ท to the matrix ๐ปฬ‚ representing โ„Ž w.r.t ๐ตฬ‚,๐ทฬ‚,

๐ปฬ‚=Rep๐ตฬ‚,๐ทฬ‚(โ„Ž)=Rep๐ท,๐ทฬ‚(id)โ‹…๐ปโ‹…Rep๐ตฬ‚,๐ต(id)=Rep๐ท,๐ทฬ‚(id)โ‹…Rep๐ต,๐ท(id)โ‹…Rep๐ตฬ‚,๐ต(id).

Proof:

TODO by arrow diagram

Definition 3.5.6: Same-sized matrices ๐ป and ๐ปฬ‚ are matrix equivalentif there are nonsingular matrices ๐‘ƒ,๐‘„ s.t. ๐ปฬ‚=๐‘ƒ๐ป๐‘„, that is, we can change bases to get ๐ปฬ‚ from ๐ป.
Corollary 3.5.7: Matrix-equivalent matrices represent the same map, with respect to appropriate pairs of bases.

Theorem 3.5.8: Matrix equivalence is an equivalence relation.

Proof:

Matrix equivalence is transitive, since ๐ป=๐ผ๐ป๐ผ.

Matrix equivalence is symmetric, since if ๐ปฬ‚=๐‘ƒ๐ป๐‘„ for nonsingular ๐‘ƒ,๐‘„, then ๐‘ƒโˆ’1๐ปฬ‚๐‘„โˆ’1=๐‘ƒโˆ’1๐‘ƒ๐ป๐‘„๐‘„โˆ’1=๐ป.

Matrix equivalence is transitive, since if ๐ต=๐‘ƒ๐ด๐‘„ and ๐ถ=๐‘…๐ต๐‘† for nonsingular ๐‘ƒ,๐‘„,๐‘…,๐‘†, then ๐ถ=(๐‘…๐‘ƒ)๐ด(๐‘„๐‘†), with (๐‘…๐‘ƒ) and (๐‘„๐‘†) nonsingular since the product of nonsingular matrices is nonsingular.

Theorem 3.5.9: Any ๐‘šร—๐‘› matrix of rank ๐‘˜ is matrix equivalent to the ๐‘šร—๐‘› matrix that is all zeros except that the first ๐‘˜ diagonal entries are 1.

Definition 3.5.10: This is a block partial-identity form, so called because you have an identity matrix in the top left of the matrix.
Remark: Block partial-identity matrices are projection maps between the same bases.
Remark: All matrices are projection maps with respect to some bases.

Corollary 3.5.11: Matrix equivalence classes are characterised by rank: two same-sized matrices are matrix equivalent iff they have the same rank.

Proof: Two same-sized matrices with the same rank are equivalent to the same block partial-identity matrix.

3.vi Projection

Definition 3.6.1: The orthogonal projection of a vector ๐‘ฃโƒ— into the line spanned by a nonzero vector ๐‘ โƒ— is

proj[๐‘ โƒ—](๐‘ฃโƒ—)=๐‘ฃโƒ—โ‹…๐‘ โƒ—๐‘ โƒ—โ‹…๐‘ โƒ—โ‹…๐‘ โƒ—.

Remark:

proj[๐‘ โƒ—](๐‘ฃโƒ—) is a scalar multiple of ๐‘ โƒ— whose tip lies directly โ€œunderneathโ€ the tip of ๐‘ฃโƒ—, where the โ€œupโ€ direction is the vector orthogonal to ๐‘ โƒ— that intersects ๐‘ฃโƒ—; it is orthogonal to (๐‘ฃโƒ—โˆ’proj[๐‘ โƒ—](๐‘ฃโƒ—)).

Remark:

Another way of thinking about projection is that proj[๐‘ โƒ—](๐‘ฃโƒ—) is the โ€œshadowโ€ of ๐‘ฃโƒ— on ๐‘ โƒ—, when a light source is shone orthogonally on to ๐‘ โƒ—.

Remark:

We can derive the projection formula from the above remarks.

proj[๐‘ โƒ—](๐‘ฃโƒ—)=๐‘๐‘ โƒ— where ๐‘โˆˆโ„. Then by Pythagoras, |๐‘ฃโƒ—|2=|๐‘๐‘ โƒ—|2+|๐‘ฃโƒ—โˆ’๐‘๐‘ โƒ—|2.

Hence

๐‘ฃโƒ—โ‹…๐‘ฃโƒ—=๐‘2(๐‘ โƒ—โ‹…๐‘ โƒ—)+๐‘ฃโƒ—โ‹…๐‘ฃโƒ—+๐‘2(๐‘ โƒ—โ‹…๐‘ โƒ—)โˆ’2๐‘(๐‘ฃโƒ—โ‹…๐‘ โƒ—)โŸน2๐‘(๐‘ฃโƒ—โ‹…๐‘ โƒ—)=2๐‘2(๐‘ โƒ—โ‹…๐‘ โƒ—)โŸน๐‘=๐‘ฃโƒ—โ‹…๐‘ โƒ—๐‘ โƒ—โ‹…๐‘ โƒ—.

Therefore proj[๐‘ โƒ—](๐‘ฃโƒ—)=๐‘ฃโƒ—โ‹…๐‘ โƒ—๐‘ โƒ—โ‹…๐‘ โƒ—โ‹…๐‘ โƒ—.

TODO: picture

Definition 3.6.2: Vectors ๐‘ฃโƒ—1,โ€ฆ๐‘ฃโƒ—๐‘˜โˆˆโ„๐‘› are mutually orthogonal when any two are orthogonal: โˆ€๐‘–,๐‘—โˆˆ{1,โ€ฆ,๐‘˜},๐‘–โ‰ ๐‘—,๐‘ฃโƒ—๐‘–โ‹…๐‘ฃโƒ—๐‘—=0.

Theorem 3.6.3: If the vectors in a set {๐‘ฃโƒ—1,โ€ฆ,๐‘ฃโƒ—๐‘˜}โŠ‚โ„๐‘› are mutually orthogonal and nonzero then that set is linearly independent.

Proof:

Consider a linear relation among the ๐‘ฃโƒ—๐‘–s: 0โƒ—=๐‘1๐‘ฃโƒ—1+โ€ฆ+๐‘๐‘˜๐‘ฃโƒ—๐‘˜. Taking the dot product of any ๐‘ฃโƒ—๐‘– with both sides of the equation gives ๐‘ฃโƒ—๐‘–โ‹…(๐‘1๐‘ฃโƒ—1+โ€ฆ+๐‘๐‘˜๐‘ฃโƒ—๐‘˜)=๐‘ฃโƒ—๐‘–โ‹…0โƒ—=0. Since, for ๐‘–โ‰ ๐‘—, ๐‘ฃโƒ—๐‘–โ‹…๐‘ฃโƒ—๐‘—=0 due to orthogonality, the left side reduces to ๐‘๐‘–(๐‘ฃโƒ—๐‘–โ‹…๐‘ฃโƒ—๐‘–), so ๐‘๐‘–(๐‘ฃโƒ—๐‘–โ‹…๐‘ฃโƒ—๐‘–)=0. Since ๐‘ฃโƒ—๐‘–โ‹…๐‘ฃโƒ—๐‘–โ‰ 0, it must be that ๐‘๐‘–=0. This holds for all the ๐‘๐‘–s, so the only linear relationship among the ๐‘ฃโƒ—๐‘–s is the trivial one, so the set is linearly independent.

Corollary 3.6.4: In a ๐‘˜-dimensional vector space, if the vectors in a size ๐‘˜ set are mutually orthogonal and nonzero then that set is a basis for the space.

Proof:

Any linearly independent subset of size ๐‘˜ in a ๐‘˜ dimensional space is a basis.

Definition 3.6.5: An orthogonal basis for a vector space is a basis of mutually orthogonal vectors.

Theorem 3.6.6 (Gram-Schmidt process): If โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘˜โŸฉ is a basis for a subspace of โ„๐‘› then the vectors

๐œ…โƒ—1=๐›ฝโƒ—1;๐œ…โƒ—2=๐›ฝโƒ—2โˆ’proj[๐œ…โƒ—1](๐›ฝโƒ—2);๐œ…โƒ—3=๐›ฝโƒ—3โˆ’proj[๐œ…โƒ—1](๐›ฝโƒ—3)โˆ’proj[๐œ…โƒ—2](๐›ฝโƒ—3);โ‹ฎ๐œ…โƒ—๐‘˜=๐›ฝโƒ—๐‘˜โˆ’โˆ‘๐‘–=1๐‘˜โˆ’1proj[๐œ…โƒ—๐‘–](๐›ฝโƒ—๐‘˜)

form an orthogonal basis for the same subspace.

Proof:

We show by induction by each ๐œ…๐‘– is nonzero, is in the span of โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘–โŸฉ, and is orthogonal to all the previous ๐œ…โƒ—s, and thus by Corollaryย 3.6.4, โŸจ๐œ…โƒ—1,โ€ฆ,๐œ…โƒ—๐‘˜โŸฉ is a basis for the same subspace for which โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘˜โŸฉ is.

For ๐‘–=1, ๐œ…โƒ—1=๐›ฝโƒ—1, so is clearly nonzero, is vacuously orthogonal to all previous ๐œ…โƒ—s, and is clearly in the span of โŸจ๐›ฝโƒ—1โŸฉ.

Now assume that ๐œ…๐‘— is nonzero, orthogonal to the previous ๐œ…โƒ—s and is in the span of โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘—โŸฉ for all ๐‘— less than some fixed ๐‘–>1.

Then ๐œ…๐‘–=๐›ฝโƒ—๐‘–โˆ’โˆ‘๐‘—=1๐‘–โˆ’1proj[๐œ…โƒ—๐‘—](๐›ฝโƒ—๐‘–). This sum can be iteratively reduced to be in terms of the ๐›ฝโƒ—s, so ๐œ…๐‘–โ‰ 0 or else there would be a nontrivial linear dependence among the ๐›ฝโƒ—s, which would be a contradiction as we know them to be linearly independent as they are a basis. (Note also that the coefficients of the ๐›ฝโƒ—s must be nonzero as, by the inductive hypothesis, all previous ๐œ…โƒ—s are nonzero.)

Because ๐œ…๐‘– is a linear combination of ๐›ฝโƒ—s, it is in the span of โŸจ๐›ฝโƒ—1,โ€ฆ,๐›ฝโƒ—๐‘–+1โŸฉ. Also, it is orthogonal to all the previous ๐œ…โƒ—s: for all 1<๐‘—<๐‘–,

๐œ…โƒ—๐‘—โ‹…๐œ…โƒ—๐‘–=๐œ…โƒ—๐‘—โ‹…(๐›ฝโƒ—๐‘–โˆ’โˆ‘๐‘™=1๐‘–โˆ’1proj[๐œ…โƒ—๐‘™](๐›ฝโƒ—๐‘–))=๐œ…โƒ—๐‘—โ‹…(๐›ฝโƒ—๐‘–โˆ’proj[๐œ…โƒ—๐‘—](๐›ฝโƒ—๐‘–))โˆ’โˆ‘๐‘™=1;๐‘™โ‰ ๐‘—๐‘–โˆ’1proj[๐œ…โƒ—๐‘™](๐›ฝโƒ—๐‘–)=0;

here the first term is zero since the projection is orthogonal, and the remaining terms are 0 by the inductive hypothesis (all previous ๐œ…โƒ—s are mutually orthogonal).

By induction, all the ๐œ…s are nonzero, in the span of the initial basis, and are mutually orthogonal, so also form a basis of the subspace.

Definition 3.6.7: An orthonormal basis is an orthogonal basis with members normalised to length 1.

4 Determinants

4.i Definition

Definition 4.1.1: An ๐‘›ร—๐‘› determinant is a function det:โ„ณ๏ธ€๐‘›ร—๐‘›โ†’โ„ s.t.

  1. det(๐œŒโƒ—1,โ€ฆ,๐‘˜โ‹…๐œŒโƒ—๐‘–+๐œŒโƒ—๐‘—,โ€ฆ.,๐œŒโƒ—๐‘›)=det(๐œŒโƒ—1,โ€ฆ,๐œŒโƒ—๐‘—,โ€ฆ,๐œŒโƒ—๐‘›) for ๐‘–โ‰ ๐‘—
  2. det(๐œŒโƒ—1,โ€ฆ,๐œŒโƒ—๐‘—,โ€ฆ,๐œŒโƒ—๐‘–,โ€ฆ,๐œŒโƒ—๐‘›)=โˆ’det(๐œŒโƒ—1,โ€ฆ,๐œŒโƒ—๐‘—,โ€ฆ,๐œŒโƒ—๐‘–,โ€ฆ,๐œŒโƒ—๐‘›) for ๐‘–โ‰ ๐‘—
  3. det(๐œŒโƒ—1,โ€ฆ,๐‘˜โ‹…๐œŒโƒ—๐‘–,โ€ฆ,๐œŒโƒ—๐‘›)=๐‘˜โ‹…det(๐œŒโƒ—1,โ€ฆ,๐œŒโƒ—๐‘›) for any ๐‘˜โˆˆโ„
  4. det(๐ผ)=1 where ๐ผ is an identity matrix.

Common notation is |๐‘‡|=det(๐‘‡).

Remark: Condition (ii) is redundant because row swaps can be done by a series of row additions and multiplications.

Lemma 4.1.2: A matrix with two identical rows has a determinant of 0.

Proof: Swapping the rows multiplies the determinant by โˆ’1, but gives an identical matrix and so the determinant must be the same; therefore the determinant must be zero.

Lemma 4.1.3: A matrix with a zero row has a determinant of 0.

Proof: Multiplying the zero row by a scalar ๐‘˜ multiplies the determinant by ๐‘˜, but does not change the matrix; therefore the determinant must be invariant under scalar multiplication and must be equal to 0.

Lemma 4.1.4: A matrix is nonsingular iff its determinant is nonzero.

Proof:

Take a matrix ๐‘‡ with determinant zero, and carry out Gauss-Jordan reduction to get to ๐‘‡ฬ‚. By Conditions (i) - (iii) of the determinant function, det(๐‘‡ฬ‚)=0 also; if ๐‘‡ were nonsingular then it would reduce to the identity matrix, which has determinant equal to 1; therefore, ๐‘‡ is singular. If ๐‘‡ were nonsingular, it must have a nonzero determinant to begin with.

Lemma 4.1.5: The determinant of an echelon form matrix is the product down the leading diagonal.

Proof: If the echelon matrix is singular then it has a zero row, so the determinant is zero which is the product down the leading diagonal.

If the echelon form matrix is nonsingular, then none of its diagonal entries are zero, so we can divide by those entries and use Condition (iii) to get 1s on the diagonal. Then we eliminate the nondiagonal entries, which by Condition (i) does not change the determinant, to get to the identity matrix, which has determinant 1. So, in this case we also get the determinant being equal to the product down the diagonal.

Lemma 4.1.6: For each ๐‘›, if there is an ๐‘›ร—๐‘› determinant function then it is unique.

Proof:

Suppose there are two functions det1,det2:โ„ณ๏ธ€๐‘›ร—๐‘›โ†’โ„ satisfying the properties of Definitionย 4.1.1 and its consequences Lemmasย 4.1.2 - ย 4.1.5. Given a square matrix M, fix some way of performing Gaussโ€™s method to bring the matrix to echelon form. By using this fixed reduction, we can compute the value that these two functions must return on ๐‘€, and they must return the same value (by Lemmaย 4.1.5). Since they give the same output on every input, they are the same function.

Definition 4.1.7: Let ๐‘‰ be a vector space. A map ๐‘“:๐‘‰๐‘›โ†’โ„ is multilinear if

  1. ๐‘“(๐œŒโƒ—1,โ€ฆ,๐‘ฃโƒ—+๐‘คโƒ—,โ€ฆ,๐œŒโƒ—๐‘›)=๐‘“(๐œŒโƒ—1,โ€ฆ,๐‘ฃโƒ—,โ€ฆ,๐œŒโƒ—๐‘›)+๐‘“(๐œŒโƒ—1,โ€ฆ,๐‘คโƒ—,โ€ฆ,๐œŒโƒ—๐‘›)
  2. ๐‘“(๐œŒโƒ—1,โ€ฆ,๐‘˜โ‹…๐‘ฃโƒ—,โ€ฆ,๐œŒโƒ—๐‘›)=๐‘˜โ‹…๐‘“(๐œŒโƒ—1,โ€ฆ,๐‘ฃโƒ—,โ€ฆ,๐œŒโƒ—๐‘›)

Lemma 4.1.8: Determinants are multilinear.

Proof:

Property (ii) here is just Condition (iii) in Definitionย 4.1.1, so we need only verify property (i).

TODO

Corollary 4.1.9: Determinants can be expressed as a sum of determinants of matrices with only one nonzero value in each row, or as a linear combination of permutation matrices.

Example:

det(1234)=det(1030)+det(1004)+det(0230)+det(0204)=det(1004)+det(0230)because an all-zero column gives a 0 determinant=4det(1001)+6det(0110).

Definition 4.1.10: An ๐‘›-permutation is a bijective function on the first ๐‘› positive integers ฮฆ:{1,โ€ฆ,๐‘›}โ†’{1,โ€ฆ,๐‘›}.

In a permutation, each number 1,โ€ฆ,๐‘› is an output associated with exactly one input. We sometimes denote a permutation as the sequence ฮฆ=โŸจฮฆ(1),โ€ฆ,ฮฆ(๐‘›)โŸฉ.

Definition 4.1.11: The permutation expansion for determinants is

|๐‘‡|=โˆ‘๐‘–=1๐‘›[|๐‘ƒฮฆ๐‘–|โ‹…โˆ๐‘—=1๐‘›๐‘ก๐‘—,ฮฆ๐‘–(๐‘—)]

where ฮฆ1,โ€ฆ,ฮฆ๐‘›! are all of the ๐‘›-permutations, and ๐‘ƒฮฆ๐‘– is the permutation matrix corresponding to the permutation ฮฆ๐‘–.

This is derived from using both conditions of multilinearity to break up the matrix into multiple matrices corresponding to each permutation, and then extracting the relevant coefficients.

Theorem 4.1.12: For each ๐‘› there is an ๐‘›ร—๐‘› determinant functions.

Theorem 4.1.13: The determinant of a matrix is equal to the determinant of its tranpose.

Proof:

TODO (in Hefferon)

Corollary 4.1.14: A matrix with two equal columns is singular. Column swaps change the sign of a determinant. Determinants are multilinear in their columns.

Proof:

By transposition.

Definition 4.1.15: In a permuation ฮฆ=โŸจโ€ฆ,๐‘˜,โ€ฆ,๐‘—,โ€ฆโŸฉ, elements such that ๐‘˜>๐‘— are in an inversion of their natural order.

Lemma 4.1.16: A row-swap in a permutation matrix changes the number of inversions from even to odd, or from odd to even; it changes the parity of the number of inversions.

Proof:

If we swap adjacent rows, all other row relations remain unchanged, and we either create or remove an inversion between the two rows we changed. Hence the parity changes.

To swap non-adjacent rows ๐‘– and ๐‘— (with ๐‘—>๐‘–), we can instead swap adjacent rows (๐‘—โˆ’๐‘–) times (๐‘–โ†”๐‘–+1,๐‘–+1โ†”๐‘–+2,โ€ฆ,๐‘—โˆ’1โ†”๐‘—), followed by (๐‘—โˆ’๐‘–โˆ’1) row swaps back up; this is the sum of two consecutive numbers which is odd, so the parity changes an odd number of times, so the parity changes.

Definition 4.1.17: The signum of a permutation sgn(ฮฆ) is โˆ’1 if the number of inversions in ฮฆ is odd, and +1 if the number of inversions is even.

Corollary 4.1.18: If a permutation matrix has an odd number of inversions then swapping it to the identity takes an odd number of swaps. If it has an even number of inversions that swapping to the identity takes an even number.

Proof:

The identity matrix has zero inversions. To change an odd number to zero requires an odd number of swaps, and to change an even number to zero requires an even number of swaps.

Lemma 4.1.19: The function ๐‘‘:โ„ณ๏ธ€๐‘›ร—๐‘›โ†’โ„ s.t.

๐‘‘(๐‘‡)=โˆ‘๐‘–=1๐‘›[sgn(ฮฆ)โ‹…โˆ๐‘—=1๐‘›๐‘ก๐‘—,ฮฆ๐‘–(๐‘—)]

is a determinant.

Proof:

We check the four conditions from Definitionย 4.1.1.

Condition (iv) holds because in the expansion of ๐‘‘(๐ผ), the only nonzero term is the one corresponding to the identity permutation, which has a signum of 1, hence the determinant is 1.

For Condition (iii), suppose ๐‘‡โ†’๐‘˜๐œŒ๐‘™๐‘‡ฬ‚. Then

๐‘‘(๐‘‡ฬ‚)=โˆ‘๐‘–=1๐‘›[sgn(ฮฆ๐‘–)โ‹…โˆ๐‘—=1๐‘›๐‘กฬ‚๐‘—,ฮฆ๐‘–(๐‘—)]=โˆ‘๐‘–=1๐‘›[sgn(ฮฆ๐‘–)โ‹…๐‘˜โ‹…๐‘ก๐‘™,ฮฆ๐‘–(๐‘™)โ‹…โˆ1โ‰ค๐‘—โ‰ค๐‘›;๐‘—โ‰ ๐‘™๐‘ก๐‘—,ฮฆ๐‘–(๐‘—)]=๐‘˜โ‹…โˆ‘๐‘–=1๐‘›[sgn(ฮฆ๐‘–)โ‹…โˆ๐‘—=1๐‘›๐‘ก๐‘—,ฮฆ๐‘–(๐‘—)=๐‘˜โ‹…๐‘‘(๐‘‡).

For Condition (i), suppose ๐‘‡โ†’๐‘˜๐œŒ๐‘™+๐œŒ๐‘š๐‘‡ฬ‚. Then

๐‘‘(๐‘‡ฬ‚)=โˆ‘๐‘–=1๐‘›[sgn(ฮฆ๐‘–)โ‹…โˆ๐‘—=1๐‘›๐‘กฬ‚๐‘—,ฮฆ๐‘–(๐‘—)]=โˆ‘๐‘–=1๐‘›[sgn(ฮฆ๐‘–)โ‹…(๐‘˜๐‘ก๐‘™,ฮฆ๐‘–(๐‘š)+๐‘ก๐‘š,ฮฆ๐‘–(๐‘š))โ‹…โˆ1โ‰ค๐‘—โ‰ค๐‘›;๐‘—โ‰ ๐‘š๐‘ก๐‘—,ฮฆ๐‘–(๐‘—)]=โˆ‘๐‘–=1๐‘›[sgn(ฮฆ๐‘–)โ‹…๐‘˜โ‹…๐‘ก๐‘™,ฮฆ๐‘–(๐‘š)โ‹…โˆ1โ‰ค๐‘—โ‰ค๐‘›;๐‘—โ‰ ๐‘š๐‘ก๐‘—,ฮฆ๐‘–(๐‘—)]+โˆ‘๐‘–=1๐‘›[sgn(ฮฆ๐‘–)โ‹…๐‘ก๐‘š,ฮฆ๐‘–(๐‘š)โ‹…โˆ1โ‰ค๐‘—โ‰ค๐‘›;๐‘—โ‰ ๐‘š๐‘ก๐‘—,ฮฆ๐‘–(๐‘—)]by distributivity of addition over multiplication=๐‘˜โ‹…โˆ‘๐‘–=1๐‘›[sgn(ฮฆ๐‘–)โ‹…๐‘ก๐‘™,ฮฆ๐‘–(๐‘š)โ‹…โˆ1โ‰ค๐‘—โ‰ค๐‘›;๐‘—โ‰ ๐‘š๐‘ก๐‘—,ฮฆ๐‘–(๐‘—)]+๐‘‘(๐‘‡)=๐‘‘(๐‘‡)

since the first sum is the determinant of the matrix with row ๐‘™ the same as row ๐‘š.

Condition (ii) follows from Condition (i).

Corollary 4.1.20: There exists a determinant function det:โ„ณ๏ธ€๐‘›ร—๐‘›โ†’โ„ for every ๐‘›.

4.ii Geometry of determinants

Definition 4.2.1: In โ„๐‘› the box or parallelepiped formed by โŸจ๐‘ฃโƒ—1,โ€ฆ,๐‘ฃโƒ—๐‘›โŸฉ is the set {๐‘ก1๐‘ฃโƒ—1+โ€ฆ+๐‘ก๐‘›๐‘ฃโƒ—๐‘›|๐‘ก1,โ€ฆ,๐‘ก๐‘›โˆˆ[0,1]}.

Then the signed area of the box, denoted โ–ณ, is |(๐‘ฃโƒ—1โ€ฆ๐‘ฃโƒ—๐‘›)|.

Definition 4.2.2: The sign of the determinant reflects the orientation or sense of the box.

Theorem 4.2.3: A transformation ๐‘ก:โ„๐‘›โ†’โ„๐‘› changes the size of all boxes by the same factor, namely the size of the image of a box |๐‘†| is |๐‘‡| times the size of the box |๐‘†| where ๐‘‡ is the matrix representing ๐‘ก with respect to the standard basis.

That is, the determinant of a product is the product of the determinants; |๐‘‡๐‘†|=|๐‘‡|โ‹…|๐‘†|.

Proof:

Suppose ๐‘‡ is singular and thus does not have an inverse. Note that if ๐‘‡๐‘† is invertible then there is an ๐‘€ s.t. (๐‘‡๐‘†)๐‘€=๐ผ, so ๐‘‡(๐‘†๐‘€)=๐ผ, so ๐‘‡ is invertible. The contrapositive of that observation is that if ๐‘‡ is not invertible then neither is ๐‘‡๐‘† - if det(๐‘‡)=0 then |๐‘‡๐‘†|=0.

Then suppose that ๐‘‡ is nonsingular. Any nonsingular matrix factorises into a product of elementary matrices ๐‘‡=๐ธ1๐ธ2โ‹ฏ๐ธ๐‘Ÿ. Then if |๐ธ๐‘†|=|๐ธ|โ‹…|๐‘†| for all matrices ๐‘† and elementary matrices ๐ธ, then |๐‘‡๐‘†|=|๐ธ1๐ธ2โ‹ฏ๐ธ๐‘Ÿ|=|๐ธ1|โ‹ฏ|๐ธ๐‘Ÿ|โ‹…|๐‘†|=|๐ธ1๐ธ2โ‹ฏ๐ธ๐‘Ÿ|โ‹…|๐‘†|=|๐‘‡||๐‘†|.

TODO: prove that determinants of elementary matrices are multiplicative.

Corollary 4.2.4: If a matrix is invertible then the determinant of its inverse is the reciprocal of its inverse, i.e. det(๐‘‡โˆ’1)=(det(๐‘‡))โˆ’1.
Definition 4.2.5: The volume of a box is the absolute value of the determinant of a matrix with those vectors as columns.

Cramerโ€™s rule

Think about a linear system as being a set of vectors forming a parallelogram, and a target point being the far point of a larger, stretched parallelogram. Then we want to find the factors by which we scale the parallelogram to get the larger one.

TODO: diagram

Theorem 4.2.6 (Cramer's rule): Let ๐ด be an ๐‘›ร—๐‘› matrix with a nonzero determinant, let ๐‘โƒ— be an ๐‘›-tall column vector, and consider the linear system ๐ด๐‘ฅโƒ—=๐‘โƒ—. For any ๐‘–โˆˆ{1,โ€ฆ,๐‘›} let ๐ต๐‘– be the matrix obtained by substituting ๐‘โƒ— for โ€ฆ TODO

note: this is not very efficient.

4.iii Laplaceโ€™s expansion

Definition 4.3.1: For any ๐‘›ร—๐‘› matrix ๐‘‡, the (๐‘›โˆ’1)ร—(๐‘›โˆ’1) matrix formed by deleting row ๐‘– and column ๐‘— of ๐‘‡ is the ๐‘–,๐‘—-minor of ๐‘‡.

The ๐‘–,๐‘—-cofactor ๐‘‡๐‘–,๐‘— of ๐‘‡ is (โˆ’1)๐‘–+๐‘— times the determinant of the ๐‘–,๐‘— minor of ๐‘‡.

Theorem 4.3.2 (Laplaceโ€™s formula): Where ๐‘‡ is an ๐‘›ร—๐‘› matrix, we can find the determinant by expanding by cofactors on any row ๐‘– or column ๐‘—.

|๐‘‡|=๐‘ก๐‘–,1โ‹…๐‘‡๐‘–,1+๐‘ก๐‘–,2โ‹…๐‘‡๐‘–,2+..+๐‘ก๐‘–,๐‘›โ‹…๐‘‡๐‘–,๐‘›for some row๐‘–=๐‘ก1,๐‘—โ‹…๐‘‡1,๐‘—+๐‘ก2,๐‘—โ‹…๐‘‡2,๐‘—+..+๐‘ก๐‘›,๐‘—โ‹…๐‘‡๐‘›,๐‘—for some column๐‘—

Proof:

TODO (exercise in Hefferon)

Definition 4.3.3: The matrix adjoint (or adjugate) to the square matrix ๐‘‡ is

adj(๐‘‡)=(๐‘‡1,1๐‘‡2,1โ€ฆ๐‘‡๐‘›,1๐‘‡1,2๐‘‡2,2โ€ฆ๐‘‡๐‘›,2โ‹ฎโ‹ฎโ‹ฎ๐‘‡1,๐‘›๐‘‡2,๐‘›โ€ฆ๐‘‡๐‘›,๐‘›).

Note the entries are transposed from what weโ€™d expect - adj(๐‘‡)๐‘–,๐‘—=๐‘‡๐‘—,๐‘–.

Theorem 4.3.4: Where ๐‘‡ is a square matrix, ๐‘‡โ‹…adj(๐‘‡)=adj(๐‘‡)โ‹…๐‘‡=|๐‘‡|โ‹…๐ผ. Thus if ๐‘‡ has an inverse, i.e. |๐‘‡|โ‰ 0, then ๐‘‡โˆ’1=(|๐‘‡|)โˆ’1โ‹…adj(๐‘‡).

Proof:

The diagonal elements of ๐‘‡โ‹…adj(๐‘‡) are all equal to |๐‘‡|, as they are Laplace expansions, ๐‘ก๐‘–,1๐‘‡๐‘–,1+โ€ฆ+๐‘ก๐‘–,๐‘›๐‘‡๐‘–,๐‘›.

Then an element in column ๐‘– and row ๐‘—, with ๐‘–โ‰ ๐‘—, is equal to ๐‘ก๐‘–,1๐‘‡๐‘—,1+โ€ฆ+๐‘ก๐‘–,๐‘›๐‘‡๐‘—,๐‘›, which is the Laplace expansion for a matrix with row ๐‘– equal to row ๐‘—, which must be equal to zero.

Hence ๐‘‡โ‹…adj(๐‘‡)=|๐‘‡|โ‹…๐ผ.

Remark: This is also not an efficient method of calculating matrix inverses, unless the matrix is sparse (i.e. mostly zeros).

5 Similarity

5.i Complex vector spaces

From now on, scalars will be complex.

Theorem 5.1.1:

Let ๐‘(๐‘ฅ) be a polynomial. If ๐‘‘(๐‘ฅ) is a non-zero polynomial then there are quotient and remainder polynomials ๐‘ž(๐‘ฅ),๐‘Ÿ(๐‘ฅ) s.t. ๐‘(๐‘ฅ)=๐‘‘(๐‘ฅ)๐‘ž(๐‘ฅ)+๐‘Ÿ(๐‘ฅ) where the degree of ๐‘Ÿ(๐‘ฅ) is strictly less than the degree of ๐‘‘(๐‘ฅ).

Corollary 5.1.2: The remainder when ๐‘(๐‘ฅ) is divided by (๐‘ฅโˆ’๐œ†) is the constant polynomial ๐‘Ÿ(๐‘ฅ)=๐‘(๐œ†).

Proof:

The remainder must be a constant polynomial as it has a degree less than one. Note that ๐‘(๐‘ฅ)=(๐‘ฅโˆ’๐œ†)๐‘ž(๐‘ฅ)+๐‘Ÿ(๐‘ฅ); substituting in ๐‘ฅ=๐œ† gives ๐‘(๐œ†)=(๐œ†โˆ’๐œ†)๐‘ž(๐œ†)+๐‘Ÿ(๐œ†)=๐‘Ÿ(๐œ†), so ๐‘Ÿ(๐œ†)=๐‘(๐œ†); but ๐‘Ÿ is a constant so ๐‘Ÿ(๐‘ฅ)=๐‘(๐œ†) for all ๐‘ฅ.

Corollary 5.1.3: If ๐œ† is a root of the polynomial ๐‘(๐‘ฅ), then (๐‘ฅโˆ’๐œ†) is a factor of ๐‘(๐‘ฅ).

Proof: By Corollaryย 5.1.2, ๐‘(๐‘ฅ)=(๐‘ฅโˆ’๐œ†)๐‘ž(๐‘ฅ)+๐‘(๐œ†), but since ๐œ† is a root of ๐‘(๐‘ฅ), ๐‘(๐œ†)=0; hence (๐‘ฅโˆ’๐œ†)โˆฃ๐‘(๐‘ฅ).
Theorem 5.1.4: Any constant or linear polynomial is irreducible over the reals. A quadratic polynomial is irreducible over the reals iff its discriminant is negative. No cubic or higher-degree polynomial is irreducible over the reals.
Corollary 5.1.5: Any polynomial with real coefficients factors into a product of linear and irreducible quadratic polynomials with real coefficients. That factorisation is unique; any two factorisations have the same factors raised to the same powers.
Theorem 5.1.6 (Fundamental Theorem of Algebra): Polynomials with complex coefficients factor into linear polynomials with complex coefficients. The factorisation is unique.
Remark: The standard basis for โ„‚๐‘› is the same as the standard basis for โ„๐‘›.

5.ii Similarity

Definition 5.2.1: The matrices ๐‘‡ and ๐‘‡ฬ‚ are similar if there is a nonsingular ๐‘ƒ s.t. ๐‘‡ฬ‚=๐‘ƒ๐‘‡๐‘ƒโˆ’1.
Remark: The zero matrix is similar only to itself (since ๐‘ƒ๐‘๐‘ƒโˆ’1=๐‘ƒ๐‘=๐‘); the identity matrix is also similar only to itself (๐‘ƒ๐ผ๐‘ƒโˆ’1=๐‘ƒ๐‘ƒโˆ’1=๐ผ).

Theorem 5.2.2: Similarity is an equivalence relation.

Proof:

Similarity is reflexive: ๐‘‡=๐ผ๐‘‡๐ผโˆ’1.

Similarity is symmetric: if ๐‘‡ฬ‚=๐‘ƒ๐‘‡๐‘ƒโˆ’1, then ๐‘‡=๐‘ƒโˆ’1๐‘‡ฬ‚๐‘ƒ.

Similarity is transitive: if ๐ต=๐‘ƒ๐ด๐‘ƒโˆ’1 and ๐ถ=๐‘„๐ต๐‘„โˆ’1, then ๐ถ=(๐‘„๐‘ƒ)๐ด๐‘ƒโˆ’1๐‘„โˆ’1=(๐‘„๐‘ƒ)๐ด(๐‘„๐‘ƒ)โˆ’1.

Remark: Matrix similarity is a special case of matrix equivalence: ๐‘†,๐‘‡ similar โŸน ๐‘†,๐‘‡ equivalent, but the converse is not true.
Remark: Some (but not all) similarity classes have a canonical representation of a diagonal form.
Definition 5.2.3: A transformation is diagonalisable if it has a diagonal representation with respect to the same basis for the codomain as for the domain. A diagonalisable matrix is one that is similar to a diagonal matrix: ๐‘‡ is diagonalisable if there exists nonsingular ๐‘ƒ such that ๐‘ƒ๐‘‡๐‘ƒโˆ’1 is diagonal.

Example:

Proposition: This matrix is not diagonalisable:

๐‘=(0010).

Proof:

Suppose that there exists a diagonal matrix ๐ท=๐‘ƒ๐‘๐‘ƒโˆ’1. Then consider

๐ท2=๐‘ƒ๐‘๐‘ƒโˆ’1๐‘ƒ๐‘๐‘ƒโˆ’1=๐‘ƒ๐‘2๐‘ƒโˆ’1=๐‘ƒ(0000)๐‘ƒโˆ’1=(0000).

But ๐ท2=(๐‘‘1200๐‘‘22), hence ๐‘‘1=๐‘‘2=0. Hence ๐ท is the zero matrix, but the only matrix that is similar to the zero matrix is the zero matrix. Contradiction.

Lemma 5.2.4: A transformation ๐‘ก is diagonalisable iff there is a basis ๐ต and scalar ๐œ†1,โ€ฆ,๐œ†๐‘› s.t. ๐‘ก(๐›ฝโƒ—๐‘–)=๐œ†๐‘–๐›ฝโƒ—๐‘– for each ๐‘–.

Proof:

Consider a diagonal representation matrix

Rep๐ต,๐ต(๐‘ก)=(๐œ†10โ‹ฎโ‹ฑโ‹ฎ0๐œ†๐‘›).

Then for a basis element ๐›ฝ๐‘–,

Rep๐ต(๐‘ก(๐›ฝโƒ—๐‘–))=Rep๐ต,๐ต(๐‘ก)Rep๐ต(๐›ฝโƒ—๐‘–)=(๐œ†10โ‹ฎโ‹ฑโ‹ฎ0๐œ†๐‘›)(0โ‹ฎ1โ‹ฎ0)=(0โ‹ฎ๐œ†๐‘–โ‹ฎ0).

Definition 5.2.5: A transformation ๐‘ก:๐‘‰โ†’๐‘‰ has a scalar eigenvalue ๐œ† if there is a nonzero eigenvector ๐œโƒ—โˆˆ๐‘‰ such that ๐‘ก(๐œโƒ—)=๐œ†โ‹…๐œโƒ—.
Definition 5.2.6: A square matrix ๐‘‡ has a scalar eigenvalue ๐œ† associated with the nonzero eigenvector ๐œโƒ— if ๐‘‡๐œโƒ—=๐œ†โ‹…๐œโƒ—.
Remark: To find the eigenvalues of a matrix ๐‘€, consider ๐‘€๐œโƒ—=๐‘ฅ๐œโƒ—โŸน(๐‘€โˆ’๐‘ฅ๐ผ)๐œโƒ—=0โƒ—. If ๐‘€โˆ’๐‘ฅ๐ผ is nonsingular, then there is exactly one solution which is the trivial one, ๐œโƒ—=0โƒ—. Therefore, we solve for |๐‘€โˆ’๐‘ฅ๐ผ|=0, then for each solution of ๐‘ฅ (the eigenvalues), we can substitute back in to (๐‘€โˆ’๐‘ฅ๐ผ)๐œโƒ—=0โƒ— to find an eigenvector ๐œโƒ—.
Remark: If the matrix is upper diagonal or lower diagonal, the polynomial is easy to factorise as it is just the product along the diagonal.
Remark: If there is a repeated root with multiplicity ๐‘, then that ๐œ†๐‘– is an eigenvalue with algebraic multiplicity ๐‘. In general ๐‘ is greater than or equal to the geometric multiplicity of the eigenvector, i.e. the dimension of the eigenvector space.
Remark: Matrices that are similar have the same eigenvalues, but not necessarily the same eigenvectors.
Definition 5.2.7: The characteristic polynomial of a square matrix ๐‘‡ is the determinant |๐‘‡โˆ’๐‘ฅ๐ผ| where ๐‘ฅ is a scalar variable. The characteristic equation is |๐‘‡โˆ’๐‘ฅ๐ผ|=0. The characteristic polynomial of a transformation ๐‘ก is the characteristic polynomial of any matrix representation Rep๐ต,๐ต(๐‘ก).
Remark: The characteristic polynomial of an ๐‘›ร—๐‘› matrix, or of a transformation ๐‘ก:โ„‚๐‘›โ†’โ„‚๐‘›, is of degree ๐‘›. See problem sheet for proof that the characteristic polynomial is well-defined, i.e. is the same regardless of of the bases used to represent the transformation.

Lemma 5.2.8: A linear transformation on a nontrivial vector space has at least one eigenvalue.

Proof: Any root of the characteristic polynomial is an eigenvalue; every polynomial of degree โ‰ฅ1 has at least one root in โ„‚.
Definition 5.2.9: The eigenspace of a transformation ๐‘ก associated with the eigenvalue ๐œ† is ๐‘‰๐œ† = {๐œโƒ—|๐‘ก(๐œโƒ—)=๐œ†๐œโƒ—}. The eigenspace of a matrix is analogous.

Lemma 5.2.10: An eigenspace is a nontrivial subspace of โ„๐‘›.

Proof:

Note that ๐‘‰๐œ† is nonempty; it contains the zero vector since ๐‘ก(0โƒ—)=0โƒ—=๐œ†โ‹…0โƒ—.

Also note that ๐‘‰๐œ† contains a nonzero vector because by definition ๐œ† is an eigenvalue iff ๐‘ก(๐œโƒ—)=๐œ†๐œโƒ— has a nontrivial solution for ๐œโƒ—.

Finally, ๐‘‰๐œ† is closed under linear combinations:

๐‘ก(๐‘1๐œโƒ—1+โ€ฆ+๐‘๐‘›๐œโƒ—๐‘›)=๐‘1๐‘ก(๐œโƒ—1)+โ€ฆ+๐‘๐‘›๐‘ก(๐œโƒ—๐‘›)since transformations are structure-preserving=๐‘1๐œ†๐œโƒ—1+โ€ฆ+๐‘๐‘›๐œ†๐œโƒ—๐‘›=๐œ†(๐‘1๐œโƒ—1+โ€ฆ+๐‘๐‘›๐œโƒ—๐‘›)since the๐œs are eigenvectors with eigenvalue๐œ†,

hence ๐‘ก maps elements of ๐‘‰๐œ† to elements of ๐‘‰๐œ†.

Theorem 5.2.11: For any set of distinct eigenvalues of a map or matrix, a set of associated eigenvectors, one per eigenvalue, is linearly independent.

Proof:

By induction on the number of eigenvalues.

For zero eigenvalues, this is trivially true as the set of associated eigenvectors is empty.

Assume true for ๐‘˜ distinct eigenvalues.

If there are ๐‘˜+1 distinct eigenvalues, ๐œ†1,โ€ฆ,๐œ†๐‘˜+1, and let ๐‘ฃโƒ—1,โ€ฆ,๐‘ฃโƒ—๐‘˜+1 be associated eigenvectors. Suppose that 0โƒ—=๐‘1๐‘ฃโƒ—1+โ€ฆ+๐‘๐‘˜+1๐‘ฃโƒ—๐‘˜+1. From this we derive two equations: by applying ๐‘ก to both sides, 0โƒ—=๐‘1๐œ†1๐‘ฃโƒ—1+โ€ฆ+๐‘๐‘˜+1๐œ†๐‘˜+1๐‘ฃโƒ—๐‘˜+1; and by multiplying by ๐œ†๐‘˜+1, giving 0โƒ—=๐œ†๐‘˜+1๐‘1๐‘ฃโƒ—1+โ€ฆ+๐œ†๐‘˜+1๐‘๐‘˜+1๐‘ฃโƒ—๐‘˜+1. Subtract these equations to get 0โƒ—=๐‘1(๐œ†๐‘˜+1โˆ’๐œ†1)๐‘ฃโƒ—1+โ€ฆ+๐‘๐‘˜(๐œ†๐‘˜+1โˆ’๐œ†๐‘˜)๐‘ฃโƒ—๐‘˜. Then the inductive hypothesis tells us that these ๐‘˜ vectors are all linearly independent, so there is only a trivial solution to this equation, i.e. ๐‘1(๐œ†๐‘˜+1โˆ’๐œ†1)=โ€ฆ=๐‘๐‘˜(๐œ†๐‘˜+1โˆ’๐œ†๐‘˜)=0, hence ๐‘๐‘˜+1 must be zero, so the ๐‘˜+1 vectors are linearly independent.

Since true for ๐‘˜+1 if true for ๐‘˜, and true for ๐‘˜=0, true for any number of eigenvalues by principle of induction.

Corollary 5.2.12: An ๐‘›ร—๐‘› matrix with ๐‘› distinct eigenvalues is diagonalisable.

Proof:

Form a basis of eigenvalues and apply Lemmaย 5.2.4.

6 Matrix factorisation

6.i LU factorisation

Definition 6.1.1: For an ๐‘›ร—๐‘› matrix, we take a series of (๐‘›โˆ’1) โ€œmacroโ€ transformations (made up of the product of some elementary matrices) ๐ฟ1,๐ฟ2,โ€ฆ,๐ฟ๐‘›โˆ’1 that reduce ๐ด to echelon form, for now assuming that no row swaps are necessary. Let ๐‘ˆ=๐ฟ๐‘›โˆ’1โ‹ฏ๐ฟ1๐ด, ๐ฟ=๐ฟ1โˆ’1โ‹ฏ๐ฟ๐‘›โˆ’1โˆ’1, then the LU factorisation of ๐ด is ๐ด=๐ฟ๐‘ˆ.

We end up with ๐ฟ being lower triangular with 1 along the diagonal and ๐‘ˆ being upper triangular.


What follows is the general procedure for LU factorisation.

Let ๐‘ฅโƒ—๐‘˜ denote the ๐‘˜th column of the matrix before (macro-)step ๐‘˜. Then ๐ฟ๐‘˜ should be chosen so that

๐‘ฅโƒ—๐‘˜=(๐‘ฅ1,๐‘˜โ‹ฎ๐‘ฅ๐‘˜,๐‘˜๐‘ฅ๐‘˜+1,๐‘˜โ‹ฎ๐‘ฅ๐‘›,๐‘˜)โ†’๐ฟ๐‘˜๐ฟ๐‘˜๐‘ฅโƒ—๐‘˜=(๐‘ฅ1,๐‘˜โ‹ฎ๐‘ฅ๐‘˜,๐‘˜0โ‹ฎ0).

To do this, we subtract ๐“๏ธ€๐‘—,๐‘˜ times row ๐‘˜ from row ๐‘—>๐‘˜, where ๐“๏ธ€๐‘—,๐‘˜=๐‘ฅ๐‘—,๐‘˜๐‘ฅ๐‘˜,๐‘˜.

Then define ๐“๏ธ€โƒ—๐‘˜โ‰”(0โ‹ฎ0๐“๏ธ€๐‘˜+1,๐‘˜โ‹ฎ๐“๏ธ€๐‘›,๐‘˜). Then ๐ฟ๐‘˜ can be written

๐ฟ๐‘˜=๐ผโˆ’๐“๏ธ€โƒ—๐‘˜๐‘’โƒ—๐‘˜โŠค.

Remark:

This looks like the dot product of ๐“๏ธ€โƒ— and ๐‘’โƒ—๐‘˜, but is the other way round! This just defines ๐ฟ๐‘˜ to be the identity matrix, with the ๐‘˜th column being โˆ’๐“๏ธ€โƒ—๐‘˜.

By the sparsity pattern of ๐“๏ธ€โƒ—๐‘˜, we have ๐‘’โƒ—๐‘˜โŠค๐“๏ธ€โƒ—๐‘˜=0. Therefore

(๐ผโˆ’๐“๏ธ€โƒ—๐‘˜๐‘’โƒ—๐‘˜โŠค)(๐ผ+๐“๏ธ€โƒ—๐‘˜๐‘’โƒ—๐‘˜โŠค)=๐ผโˆ’๐“๏ธ€โƒ—๐‘˜๐‘’โƒ—๐‘˜โŠค๐“๏ธ€โƒ—๐‘˜๐‘’โƒ—๐‘˜โŠค=๐ผโˆ’๐“๏ธ€โƒ—๐‘˜โ‹…0โ‹…๐‘’โƒ—๐‘˜โŠค=๐ผ

so ๐ฟ๐‘˜โˆ’1=๐ผ+๐“๏ธ€โƒ—๐‘˜๐‘’โƒ—๐‘˜โŠค - that is, inverting ๐ฟ๐‘˜ is done by negating the subdiagonal entries.

Remark:

Negating the subdiagonal entries does not in general compute the inverse of a lower-triangular matrix - but if the only non-zero subdiagonal entries are all in the same column, it will work.

Now considering ๐ฟโ‰”๐ฟ1โˆ’1โ‹ฏ๐ฟ๐‘›โˆ’1โˆ’1=(๐ผ+๐“๏ธ€โƒ—1๐‘’โƒ—1โŠค)โ‹ฏ(๐ผ+๐“๏ธ€โƒ—๐‘›โˆ’1๐‘’โƒ—๐‘˜โŠค) and taking into consideration the sparsity patterns of the ๐“๏ธ€โƒ—๐‘ , ๐‘’โƒ—๐‘˜โŠค๐“๏ธ€โƒ—๐‘˜=0 and so ๐ฟโ‰”๐ผ+๐“๏ธ€โƒ—1๐‘’โƒ—1โŠค+โ€ฆ+๐“๏ธ€โƒ—๐‘›โˆ’1๐‘’โƒ—๐‘›โˆ’1โŠค, i.e. the entries in ๐ฟ are just the nonzero subdiagonal entries in the ๐ฟ๐‘˜s.

Definition 6.1.2:(the LU algorithm)

๐‘ˆโ‰”๐ด,๐ฟโ‰”๐ผfor๐‘˜โ‰”1to๐‘›โˆ’1:for๐‘—โ‰”๐‘˜+1to๐‘›:๐‘™๐‘—,๐‘˜โ‰”๐‘ข๐‘—,๐‘˜๐‘ข๐‘˜,๐‘˜๐‘ข๐‘—,๐‘˜:๐‘›โ‰”๐‘ข๐‘—,๐‘˜:๐‘›โˆ’๐‘™๐‘—,๐‘˜๐‘ข๐‘˜,๐‘˜:๐‘›

where ๐‘ข๐‘—,๐‘˜:๐‘› denotes the subrow ๐‘ข๐‘—,๐‘˜,โ€ฆ,๐‘ข๐‘—,๐‘›.

Remark: To minimise memory use, use only one array that contains both ๐ฟ and ๐‘ˆ, making the 1s on the diagonal of ๐ฟ implicit.
Remark: There are two floating point operations (flops) per modified entry (one multiplication, one subtraction). So approximately 23๐‘›3 in the limit (๐‘›3 from O(n^2) flops per each of ๐‘› macro steps).
Remark: But also note that this lends well to parallelism.

Corollary 6.1.3 (Solving linear systems via LU factorisation):

Suppose we have a linear system ๐ด๐‘ฅโƒ—=๐‘โƒ— and an LU factorisation ๐ด=๐ฟ๐‘ˆ. Then

๐ฟ๐‘ˆ๐‘ฅโƒ—โŸ๐‘ฆโƒ—=๐‘,

so we can solve the system by first solving ๐ฟ๐‘ฆโƒ—=๐‘โƒ— and then ๐‘ˆ๐‘ฅโƒ—=๐‘ฆโƒ—.

Thanks to the sparsity pattern of ๐ฟ, the system ๐ฟ๐‘ฆโƒ—=๐‘โƒ— can be efficiently solved by forward substitution (in the natural way, top down) (?). Similarly, ๐‘ˆ๐‘ฅโƒ—=๐‘ฆโƒ— can be solved by backwards substitution (bottom-up).

Remark: Each of these requires about ๐‘›2 flops, much less than needed for computing the LU factorisation, hence the overall cost is that of the factorisation, 23๐‘›3 in the limit.
Remark: This works well for multiple linear systems with the same matrix ๐ด and different right-hand sides ๐‘โƒ— - donโ€™t invert ๐ด, just LU-factorise it.

Definition 6.1.4: The LU algorithm can give large errors when using floating point arithmetic when we restrict to no row swaps, even when not dividing by 0 (consider if we replaced a zero in the top left with 10โˆ’20, then we get something that is pretty close in the pure case, but the floating-point errors are unacceptable). So row swaps are necessary for stability. With row swaps (pivoting), we get PLU factorisation.

Definition 6.1.5: In each macro-step of an LU factorisation, ๐‘ฅ๐‘˜,๐‘˜ is called the pivot.

But we might want a different pivot, if ๐‘ฅ๐‘˜,๐‘˜ is zero or small; so carry out a row swap such that the largest value in ๐‘ฅ๐‘˜:๐‘›,๐‘˜ is the pivot. Recall that a row swap is represented by a permutation matrix.

Now the multipliers in each macro step are at most 1 by absolute value.

Then we have ๐ฟ๐‘›โˆ’1๐‘ƒ๐‘›โˆ’1โ‹ฏ๐ฟ1๐‘ƒ1๐ด=๐‘ˆ, but in fact we can separate the ๐‘ƒs and ๐ฟs and get that ๐‘ƒ๐ด=๐ฟ๐‘ˆ where ๐‘ƒ=๐‘ƒ๐‘›โˆ’1โ‹ฏ๐‘ƒ1, and ๐ฟ is a lower triangular matrix related to the ๐ฟ๐‘–s, as described below.

Lemma 6.1.6:

Given ๐‘ˆ=๐ฟ๐‘›โˆ’1๐‘ƒ๐‘›โˆ’1โ‹ฏ๐ฟ1๐‘ƒ1๐ด, we can rearrange the row operations to give ๐‘ˆ=(๐ฟ๐‘›โˆ’1โ€ฒโ‹ฏ๐ฟ1โ€ฒ)(๐‘ƒ๐‘›โˆ’1โ‹ฏ๐‘ƒ1)๐ด where ๐ฟ๐‘–โ€ฒ=(โˆ๐‘—=2๐‘–๐‘ƒ๐‘›โˆ’๐‘—)๐ฟ๐‘–(โˆ๐‘—=2๐‘–๐‘ƒ๐‘—). That is, the row operations can be reordered, with the row additions having their subdiagonal entries permuted.

Proof:

๐ฟ๐‘›โ€ฒโ‹ฏ๐ฟ1โ€ฒ๐‘ƒ๐‘›โ‹ฏ๐‘ƒ1=๐ฟ๐‘›(๐‘ƒ๐‘›๐ฟ๐‘›โˆ’1๐‘ƒ๐‘›โˆ’1)(๐‘ƒ๐‘›๐‘ƒ๐‘›โˆ’1๐ฟ๐‘›โˆ’2๐‘ƒ๐‘›โˆ’1โˆ’1๐‘ƒ๐‘›โˆ’1)โ‹ฏ(๐‘ƒ๐‘›โ‹ฏ๐‘ƒ2๐ฟ1๐‘ƒ2โˆ’1โ‹ฏ๐‘ƒ๐‘›โˆ’1)๐‘ƒ๐‘›โ‹ฏ๐‘ƒ1=๐ฟ๐‘›๐‘ƒ๐‘›โ‹ฏ๐ฟ1๐‘ƒ1.

Remark: The product of the ๐ฟ๐‘˜โ€ฒs is again lower-triangular and can inverted by negating the subdiagonal entries.
Corollary 6.1.7: With ๐ฟโ‰”(๐ฟ๐‘›โˆ’1โ€ฒโ‹ฏ๐ฟ1โ€ฒ),๐‘ƒโ‰”๐‘ƒ๐‘›โˆ’1โ‹ฏ๐‘ƒ1, we have that ๐‘ƒ๐ด=๐ฟ๐‘ˆ, which is a PLU factorisation of ๐ด.
Remark: Row swaps are known as partial pivots. Complete pivoting would also involve column swaps.

Definition 6.1.8:(Algorithm for PLU factorisation with partial pivoting)

๐‘ˆโ‰”๐ด,๐ฟโ‰”๐ผ,๐‘ƒโ‰”๐ผfor๐‘˜โ‰”1to๐‘›โˆ’1:select๐‘–โ‰ฅ๐‘˜to maximise|๐‘ข๐‘–,๐‘˜|๐‘ข๐‘˜,๐‘˜:๐‘›โŸท๐‘ข๐‘–,๐‘˜:๐‘›๐‘™๐‘˜,1:๐‘˜โˆ’1โŸท๐‘™๐‘–,1:๐‘˜โˆ’1๐‘๐‘˜,1:๐‘›โŸท๐‘๐‘–,1:๐‘›for๐‘—โ‰”๐‘˜+1to๐‘›:๐‘™๐‘—,๐‘˜โ‰”๐‘ข๐‘—,๐‘˜๐‘ข๐‘˜,๐‘˜๐‘ข๐‘—,๐‘˜:๐‘›โ‰”๐‘ข๐‘—,๐‘˜:๐‘›โˆ’๐‘™๐‘—,๐‘˜๐‘ข๐‘˜,๐‘˜:๐‘›
Remark: The asymptotic number of flops is still 23๐‘›3, but we now get better numerical stability.

Corollary 6.1.9 (Solving linear systems using PLU factorisation):

๐ด๐‘ฅโƒ—=๐‘โƒ—๐‘ƒ๐ด๐‘ฅโƒ—=๐‘ƒ๐‘โƒ—๐ฟ๐‘ˆ๐‘ฅโƒ—โŸ๐‘ฆโƒ—=๐‘ƒ๐‘โƒ—๐ฟ๐‘ฆโƒ—=๐‘ƒ๐‘โƒ—Solve for๐‘ฆโƒ—Then solve๐‘ˆ๐‘ฅโƒ—=๐‘ฆโƒ—..

6.ii QR factorisation

Recall that if vectors in a set are nonzero and pairwise orthogonal, then that set is linearly independent.

Recall also that (๐ด๐ต)โŠค=๐ตโŠค๐ดโŠค and (๐ด๐ต)โˆ’1=๐ตโˆ’1๐ดโˆ’1.

We extend orthogonality to matrices.

Definition 6.2.1: A square matrix is orthogonal or orthonormal if its columns have length 1 and are pairwise orthogonal. Equivalently, ๐‘„โˆˆ๐‘…๐‘›ร—๐‘› is orthogonal iff ๐‘„โŠค=๐‘„โˆ’1, i.e. ๐‘„โŠค๐‘„=๐ผ.

Lemma 6.2.2: Multiplication by an orthogonal matrix preserves the length of vectors.

Proof:

|๐‘„๐‘ฅโƒ—|2=(๐‘„๐‘ฅโƒ—)๐‘‡๐‘„๐‘ฅโƒ—=๐‘ฅโƒ—โŠค๐‘„โŠค๐‘„๐‘ฅโƒ—=๐‘ฅโƒ—โŠค๐‘ฅโƒ—=|๐‘ฅโƒ—|2.

Lemma 6.2.3: Similarly, angles are preserved under multiplication by an orthonormal matrix.

Proof:

(๐‘„๐‘ฅโƒ—)โ‹…(๐‘„๐‘ฆโƒ—)=(๐‘„๐‘ฅโƒ—)โŠค(๐‘„๐‘ฆโƒ—)=๐‘ฅโƒ—โŠค๐‘„โŠค๐‘„๐‘ฆโƒ—=๐‘ฅโƒ—โŠค๐‘„โˆ’1๐‘„๐‘ฆโƒ—=๐‘ฅโƒ—โŠค๐‘ฆโƒ—=๐‘ฅโƒ—โ‹…๐‘ฆโƒ—.
Remark:Geometrically, multiplication by an orthogonal matrix is a rotation/reflection.
Definition 6.2.4: A similar definition of orthogonality can be defined for non-square matrices if the columns are non-zero, pairwise orthogonal, and each sum to 1. This definition still satisfies ๐‘„โŠค๐‘„=๐ผ (but! ๐‘„๐‘„โŠคโ‰ ๐ผ in general).

Theorem 6.2.5: Every matrix has a QR factorisation.

Proof: Recall the Gram-Schmidt process. We can define a slightly different process to produce an orthonormal basis for vectors ๐‘Žโƒ—1,โ€ฆ,๐‘Žโƒ—๐‘›:

๐‘žโƒ—1=๐‘Žโƒ—1|๐‘Žโƒ—1|๐‘žโƒ—2=๐‘Žโƒ—2โˆ’(๐‘žโƒ—1โ‹…๐‘Žโƒ—2)๐‘žโƒ—1|๐‘Žโƒ—2โˆ’(๐‘žโƒ—1โ‹…๐‘Žโƒ—2)๐‘žโƒ—1|โ‹ฎ๐‘žโƒ—๐‘›=๐‘Žโƒ—๐‘›โˆ’(๐‘žโƒ—1โ‹…๐‘Žโƒ—๐‘›)๐‘žโƒ—1โˆ’โ€ฆโˆ’(๐‘žโƒ—๐‘›โˆ’1โ‹…๐‘Žโƒ—๐‘›)๐‘žโƒ—๐‘›โˆ’1|๐‘Žโƒ—๐‘›โˆ’(๐‘žโƒ—1โ‹…๐‘Žโƒ—๐‘›)๐‘žโƒ—1โˆ’โ€ฆโˆ’(๐‘žโƒ—๐‘›โˆ’1โ‹…๐‘Žโƒ—๐‘›)๐‘žโƒ—๐‘›โˆ’1|.

Defining ๐‘Ÿ๐‘–,๐‘—=๐‘žโƒ—๐‘–โ‹…๐‘Žโƒ—๐‘— for ๐‘–<๐‘—, and ๐‘Ÿ๐‘–,๐‘–=|๐‘Žโƒ—๐‘–โˆ’(๐‘žโƒ—1โ‹…๐‘Žโƒ—๐‘–)๐‘žโƒ—1โˆ’โ€ฆโˆ’(๐‘žโƒ—๐‘–โˆ’1โ‹…๐‘Žโƒ—๐‘–)๐‘žโƒ—๐‘–โˆ’1|, then we have

๐‘Ÿ1,1๐‘žโƒ—1=๐‘Žโƒ—1๐‘Ÿ2,2๐‘žโƒ—2=๐‘Ž2โˆ’๐‘Ÿ1,2๐‘žโƒ—1โ‹ฎ๐‘Ÿ๐‘›,๐‘›๐‘žโƒ—๐‘›=๐‘Ž๐‘›โˆ’๐‘Ÿ(1,๐‘›)๐‘žโƒ—1โˆ’โ€ฆโˆ’๐‘Ÿ๐‘›โˆ’1,๐‘›๐‘žโƒ—๐‘›โˆ’1.

Rearranging gives

๐‘Žโƒ—1=๐‘Ÿ1,1๐‘žโƒ—1๐‘Žโƒ—2=๐‘Ÿ1,2๐‘žโƒ—1+๐‘Ÿ2,2๐‘žโƒ—2โ‹ฎ๐‘Žโƒ—๐‘›=๐‘Ÿ1,๐‘›๐‘žโƒ—1+โ€ฆ+๐‘Ÿ๐‘›,๐‘›๐‘žโƒ—๐‘›,

so we have now obtained a QR factorisation of ๐ด, ๐ด=๐‘„๐‘…:

(โ‹ฎโ‹ฎ๐‘Žโƒ—1โ‹ฏ๐‘Žโƒ—๐‘›โ‹ฎโ‹ฎ)=(โ‹ฎโ‹ฎ๐‘žโƒ—1โ‹ฏ๐‘žโƒ—๐‘›โ‹ฎโ‹ฎ)(๐‘Ÿ1,1๐‘Ÿ1,2โ‹ฏ๐‘Ÿ1,๐‘›๐‘Ÿ2,2โ‹ฏ๐‘Ÿ2,๐‘›โ‹ฑโ‹ฎ๐‘Ÿ๐‘›,๐‘›).

Definition 6.2.6: This is a reduced/thin QR factorisation. A full QR factorisation has additional columns in ๐‘„ to make it square, and corresponding zeros in ๐‘….

Remark: The algorithm can be written as:

for j := 1 to n
  qj = aj
  for i := 1 to (j - 1)
    r_ij := qi^T aj
    qj := qj - r_ij qi
  r_jj := abs(qj)
  qj := qj / r_jj
Remark: Each iteration of the innermost loop involved roughly 2๐‘š (scalar) multiplications and 2๐‘š additions/subtractions. Overall about 4(12๐‘š๐‘›2)=2๐‘š๐‘›2 flops, where ๐‘›ร—๐‘š in the shape of ๐ด.

Remark: The classical Gram-Schmidt process is numerically unstable! So we can use the modified Gram-Schmidt process instead.

for i := 1 to n
  vi := ai
for i := 1 to n
  r_ii := abs(vi)
  qi = vi / r_ii
  for j := (i + 1) to n
    r_ij := qi^T vj
    vj := vj - r_ij qi

This is mathematically equivalent, and has the same flop count, but is more numerically stable: each ๐‘ฃโƒ—๐‘– starts as ๐‘Žโƒ—๐‘–, and then has the ๐‘žโƒ—๐‘— (for ๐‘—<๐‘–) components removed as soon as they become available, so the ๐‘Ÿ๐‘–,๐‘—s arenโ€™t โ€œdisturbedโ€ by the presence of already removed components.

Remark: Gram-Schmidt (for thin QR factorisation) can be viewed as triangular orthogonalisation: ๐ด๐‘…1โ‹ฏ๐‘…๐‘›=๐‘„, i.e. creating an orthogonal matrix via multiplication by triangular matrices.

Other methods (for full QR factorisation) proceed by orthogonal triangularisation: ๐‘„๐‘›โ‹ฏ๐‘„1๐ด=๐‘…, i.e. creating a triangular matrix via multiplication by orthogonal matrices.

Such methods use Householder reflections or Givens rotations. They are numerically stable (because multiplying by orthogonal matrices tends to be numerically stable). Flop count (Householder and ๐‘š=๐‘›) is about 42๐‘›3.

Solving linear systems via QR factorisation

Consider a square system ๐ด๐‘ฅโƒ—=๐‘โƒ— with ๐ด nonsingular, and a QR factorisation ๐ด=๐‘„๐‘…. Then

๐‘„๐‘…๐‘ฅโƒ—=๐‘โƒ—โŸบ๐‘…๐‘ฅโƒ—=๐‘„โŠค๐‘โƒ—,

which can be solved easily by substitution as ๐‘… is upper triangular.

The overall cost is dominated by the factorisation; this is more expensive than LU, but has better numerical stability.

Least squares

Consider ๐ด๐‘ฅโƒ—=๐‘โƒ— with ๐ดโˆˆ๐‘…๐‘šร—๐‘›: more equations than unknowns (overdetermined).

We assume that ๐ด has full column rank ๐‘›. In general the system cannot be solved exactly.

The least squares problem is to find ๐‘ฅโƒ— such that |๐‘โƒ—โˆ’๐ด๐‘ฅโƒ—| is minimised. I.e. we want to find ๐‘ฅโƒ— such that ๐‘โƒ—โˆ’๐ด๐‘ฅโƒ— is orthogonal to the (hyper-)plane spanned by the columns of ๐ด; if it is not orthogonal, then the residual will be longer than necessary. Alternatively, ๐ด๐‘ฅโƒ— should run parallel to the plane spanned by the columns of A, directly โ€œunderneathโ€ ๐‘โƒ—. Equivalently:

๐ดโŠค(๐‘โƒ—โˆ’๐ด๐‘ฅโƒ—)=0โƒ—โŸบ๐ดโŠค๐ด๐‘ฅโƒ—=๐ดโŠค๐‘โƒ—;

we call this the normal equation.

Lemma 6.2.7: If ๐ดโˆˆ๐‘…๐‘šร—๐‘› has full column rank ๐‘›, then ๐ด๐‘‡๐ด is nonsingular.

Proof:

We show that the nullspace of ๐ดโŠค๐ด is trivial.

Let ๐‘ฅโƒ—โˆˆโ„๐‘› with ๐ดโŠค๐ด๐‘ฅโƒ—=0โƒ—. Then |๐ด๐‘ฅโƒ—|2=(๐ด๐‘ฅโƒ—)โ‹…(๐ด๐‘ฅโƒ—)=๐‘ฅโƒ—โŠค๐ดโŠค๐ด๐‘ฅโƒ—=0, so ๐ด๐‘ฅโƒ—=0. Since the columns of ๐ด are linear independent, it follows that ๐‘ฅโƒ—=0.

Hence the normal equation can be solved uniquely, so there is a unique solution to the least squares problem.

We can do this by QR factorisation.

If ๐ด=๐‘„๐‘…, then

๐ดโŠค๐ด๐‘ฅโƒ—=๐ดโŠค๐‘โƒ—โŸบ๐‘…โŠค๐‘„โŠค๐‘„๐‘…๐‘ฅโƒ—=๐‘…โŠค๐‘„โŠค๐‘โƒ—โŸบ๐‘…โŠค๐‘…๐‘ฅโƒ—=๐‘…โŠค๐‘„โŠค๐‘โƒ—

Since ๐ด has full column rank, the matrix ๐‘… is nonsingular. Thus, multiplying with the inverse of ๐‘…๐‘‡ gives the system

๐‘…๐‘ฅโƒ—=๐‘„โŠค๐‘โƒ—

which can be solved easily by back-substitution.

Remark: The least-squares method can be used to find a linear regression - we want to minimise the sum of the squares of the errors, where

๐ด=(1๐‘ฅ1โ‹ฎโ‹ฎ1๐‘ฅ๐‘›),๐‘ฅโƒ—=(๐‘๐‘š),๐‘โƒ—=(๐‘ฆ1โ‹ฎ๐‘ฆ๐‘›)
to find the best regression line ๐‘ฆ=๐‘š๐‘ฅ+๐‘.

Although in two dimensions, QR factorisation probably isnโ€™t the easiest way to solve it, for higher-dimension regressions, it might be useful. Useful for machine learning!

6.iii Norms and Singular Value Decomposition

Definition 6.3.1: The 2-norm โ€–๐‘ฅโƒ—โ€–2 of a vector ๐‘ฅโƒ—โˆˆโ„๐‘› is equal to the length, or Euclidean distance, of the vector:

|๐‘ฅโƒ—|=โ€–๐‘ฅโƒ—โ€–2=โˆ‘๐‘–=1๐‘›๐‘ฅ๐‘–2=๐‘ฅโŠค๐‘ฅโƒ—=๐‘ฅโƒ—โ‹…๐‘ฅโƒ—.

Definition 6.3.2: More generally, a vector norm is a function โ€–โ‹…โ€–:โ„๐‘›โ†’โ„ that satisfies โˆ€๐‘ฅโƒ—,๐‘ฆโƒ—โˆˆโ„๐‘›,๐‘Ÿโˆˆโ„:

  1. โ€–๐‘ฅโƒ—โ€–โ‰ฅ0 with equality iff ๐‘ฅโƒ—=0โƒ—;
  2. โ€–๐‘ฅโƒ—+๐‘ฆโƒ—โ€–โ‰คโ€–๐‘ฅโƒ—โ€–+โ€–๐‘ฆโƒ—โ€–;
  3. โ€–๐‘Ÿ๐‘ฅโƒ—โ€–=|๐‘Ÿ|โ€–๐‘ฅโƒ—โ€–.
Remark: Unlike determinants, norms are not unique.

Definition 6.3.3: A commonly used norm is the ๐‘-norm:

โ€–๐‘ฅโƒ—โ€–๐‘=(โˆ‘๐‘–=1๐‘›|๐‘ฅ๐‘–|๐‘)1๐‘, for๐‘โ‰ฅ1.
Definition 6.3.4: In โ„๐‘›, a unit ball is the region for which โ€–๐‘ฅโƒ—โ€–=1 for some norm โ€–โ‹…โ€–. In โ„2, for ๐‘-norms: TODO images of unit balls for ๐‘=1,2,4,โˆž.

Definition 6.3.5: A vector norm โ€–โ‹…โ€–:โ„๐‘›โ†’โ„ induces an induced matrix norm โ€–โ‹…โ€–:โ„๐‘šร—๐‘›โ†’โ„:

โ€–๐ดโ€–=sup๐‘ฅโƒ—โˆˆโ„๐‘›\{0โƒ—}โ€–๐ด๐‘ฅโƒ—โ€–โ€–๐‘ฅโƒ—โ€–=sup๐‘ฅโƒ—โˆˆโ„๐‘›;โ€–๐‘ฅโƒ—โ€–=1โ€–๐ด๐‘ฅโƒ—โ€–

where sup denotes the supremum of a set; that is, a maximal element which is not necessarily contained within the set. For finite sets, this is the same as max.

Intuitively, this is the largest amount by which the norm of a vector ๐‘ฅโƒ— can be scaled by multiplying ๐ด with ๐‘ฅโƒ—.

Lemma 6.3.6: For any ๐ด๐‘šร—๐‘›,๐‘ฅโƒ—โˆˆโ„๐‘›, โ€–๐ด๐‘ฅโƒ—โ€–โ‰คโ€–๐ดโ€–โ€–๐‘ฅโƒ—โ€– for a vector norm โ€–โ‹…โ€–:โ„๐‘›โ†’โ„๐‘› and its induced matrix norm โ€–โ‹…โ€–:โ„๐‘šร—๐‘›โ†’โ„.

Proof:

By the definition of an induced matrix norm, โ€–๐ดโ€–โ‡’โ€–๐ด๐‘ฅโƒ—โ€–โ€–๐‘ฅโƒ—โ€–โˆ€๐‘ฅโƒ—โˆˆโ„๐‘›, hence โ€–๐ด๐‘ฅโƒ—โ€–โ‰คโ€–๐ดโ€–โ€–๐‘ฅโƒ—โ€–.

Remark: Matrix norms need not be induced; since matrices can be thought of as vectors in the vector space of matrices, norms that satisfy the prior definition can be defined on matrices, including the element-wise Frobenius norm.

Lemma 6.3.7: Let โ€–โ‹…โ€– denote an induced matrix norm. Then โ€–๐ด๐ตโ€–โ‰คโ€–๐ดโ€–โ€–๐ตโ€–.

Proof:

โ€–๐ด๐ต๐‘ฅโƒ—โ€–โ‰คโ€–๐ดโ€–โ€–๐ต๐‘ฅโƒ—โ€–byLemmaย 6.3.6โ‰คโ€–๐ดโ€–โ€–๐ตโ€–โ€–๐‘ฅโƒ—โ€–byLemmaย 6.3.6.

Lemma 6.3.8: Let ๐‘„โˆˆ๐‘…๐‘šร—๐‘š be an orthogonal matrix, and ๐ดโˆˆโ„๐‘šร—๐‘›. Then

โ€–๐‘„โ€–2=1;โ€–๐‘„๐ดโ€–2=โ€–๐ดโ€–2.

Proof:

This is a rephrasing of Lemmaย 6.2.2.

Definition 6.3.9: The singular value decomposition (SVD) of a matrix ๐ดโˆˆ๐‘…๐‘šร—๐‘› (where ๐‘šโ‰ฅ๐‘›) is a factorisation ๐ด=๐‘ˆฮฃ๐‘‰โŠค, where ๐‘ˆโˆˆโ„๐‘šร—๐‘š and ๐‘‰โˆˆโ„๐‘›ร—๐‘› are orthogonal, and ฮฃโˆˆโ„๐‘šร—๐‘› is diagonal. The diagonal entries ๐œŽ1โ‰ฅ๐œŽ2โ‰ฅโ€ฆโ‰ฅ๐œŽ๐‘›โ‰ฅ0 are called singular values of ๐ด.

The (pairwise orthogonal) columns of ๐‘ˆ are the left-singular vectors of the SVD, and the (pairwise orthogonal) columns of ๐‘‰ are the right-singular vectors of the factorisation.

The SVD describes the action of A as a series of 3 transformations:

  • rotation/reflection by ๐‘‰โŠค;
  • scaling along the axes by ฮฃ;
  • another rotation/reflection, by ๐‘ˆ.
Corollary 6.3.10: The image of a unit sphere under any matrix is a hyperelipse.
Remark: It can be shown that every matrix has an SVD (Theoremย 6.3.13).

Lemma 6.3.11: The action of ๐ด on the right-singular vectors ๐‘ฃโƒ—๐‘– can be described by ๐ด๐‘ฃโƒ—๐‘–=๐œŽ๐‘–๐‘ขโƒ—๐‘– for 1โ‰ค๐‘–โ‰ค๐‘›.

Proof:

๐ด=๐‘ˆฮฃ๐‘‰โŠค=๐‘ˆฮฃ๐‘‰โˆ’1since๐‘‰is orthogonalโ‡’๐ด๐‘‰=๐‘ˆฮฃโŸน๐ด๐‘ฃโƒ—๐‘–=๐œŽ๐‘–๐‘ขโƒ—๐‘–.

Theorem 6.3.12: The map defined by a matrix ๐ด is the map represented by the diagonal matrix ฮฃ, with respect to the domain and codomain bases consisting of the left-singular and right-singular vectors, respectively.

Proof:

Let ๐‘โƒ—=๐ด๐‘ฅโƒ— for some ๐‘ฅโƒ—โˆˆโ„๐‘›.

Let ๐‘ฅโƒ—โ€ฒ be the representation of ๐‘ฅโƒ— in the basis of the right singular vectors, โŸจ๐‘ฃโƒ—1,โ€ฆ,๐‘ฃโƒ—๐‘›โŸฉ, s.t. ๐‘ฅโƒ—โ€ฒ=๐‘‰โŠค๐‘ฅโƒ—.

Similarly, let ๐‘โƒ—โ€ฒ be the representation of ๐‘โƒ— in the basis of the left-singular vectors, โŸจ๐‘ขโƒ—1,โ€ฆ,๐‘ขโƒ—๐‘šโŸฉ, s.t. ๐‘โƒ—โ€ฒ=๐‘ˆโŠค๐‘โƒ—.

Then

๐‘โƒ—=๐‘ˆโŠค๐‘โƒ—=๐‘ˆโŠค๐ด๐‘ฅโƒ—=๐‘ˆโŠค๐‘ˆฮฃ๐‘‰โŠค๐‘ฅโƒ—=ฮฃ๐‘‰โŠค๐‘ฅโƒ—=ฮฃ๐‘ฅโƒ—โ€ฒ.

Theorem 6.3.13: Every matrix ๐ดโˆˆโ„๐‘šร—๐‘› has an SVD, with uniquely determined singular values ๐œŽ๐‘–s. Further, if ๐ด is square and the ๐œŽ๐‘–s are distinct, the left- and right-singular vectors are uniquely determined up to signs.

Proof:

TODO (in Trefethon & Bau)

Remark: An approximate SVD for an ๐‘šร—๐‘› matrix can be computed in ๐‘‚(๐‘š๐‘›2) flops. This typically involves an iterative phase, as the singular values are in general irrational, but this is typically not a bottleneck.
Remark: SVD looks similar to eigenvalue decomposition, but is not the same; if a diagonalisable matrix ๐ด has an eigenvalue decomposition ๐ด=๐‘ˆฮฃ๐‘ˆโˆ’1, then this is an SVD of ๐ด iff ๐‘ˆ is orthogonal, which is not generally the case - eigenvectors need not be orthogonal.

Theoremsย 6.3.14 - ย 6.3.20 link properties of a matrix ๐ดโˆˆโ„๐‘šร—๐‘› to properties of its SVD, given that we let ๐‘Ÿโ‰คmin{๐‘š,๐‘›} be the number of nonzero singular values of ๐ด, and that we have ๐œŽ1โ‰ฅโ€ฆโ‰ฅ๐œŽ๐‘Ÿโ‰ฅ0.

Theorem 6.3.14: The rank of ๐ด is ๐‘Ÿ.

Proof: The rank of a diagonal matrix is the number of nonzero diagonal entries. Since ฮฃ has full rank - since by definition all ๐œŽ๐‘–s are greater than 0 - the rank is ๐‘Ÿ.

Theorem 6.3.15: โŸจ๐‘ขโƒ—1,โ€ฆ,๐‘ขโƒ—๐‘ŸโŸฉ is an orthonormal basis of ๐ดโ€™s column space. Similarly, โŸจ๐‘ฃโƒ—๐‘Ÿ+1,โ€ฆ,๐‘ฃโƒ—๐‘›โŸฉ is an orthonormal basis of ๐ดโ€™s nullspace.

Proof:

This follows from the fact that โ„›๏ธ€(ฮฃ)=โŸจ๐‘’โƒ—1,โ€ฆ,๐‘’โƒ—๐‘ŸโŸฉ and ๐’ฉ๏ธ€(ฮฃ)=โŸจ๐‘’โƒ—๐‘Ÿ+1,โ€ฆ,๐‘’โƒ—๐‘›โŸฉ; the left- and right-multiplications of ๐‘ˆ and ๐‘‰โŠค respectively give the desired bases, which are orthonormal because ๐‘ˆ,๐‘‰ are orthogonal.

Remark: Column space and null space can be computed by QR factorisation, but SVD is more accurate.

Theorem 6.3.16: โ€–๐ดโ€–2=๐œŽ1 where ๐œŽ1 is the largest singular value of ๐ด.

Proof:

โ€–๐ดโ€–2=โ€–๐‘ˆฮฃ๐‘‰๐‘‡โ€–2=โ€–ฮฃโ€–2=๐œŽ1.

Theorem 6.3.17: The nonzero singular values of ๐ด are the square roots of the nonzero eigenvalues of ๐ด๐ดโŠค.

Proof:

๐ด๐ดโŠค=๐‘ˆฮฃ๐‘‰โŠค๐‘‰ฮฃโŠค๐‘ˆโŠค=๐‘ˆฮฃ๐‘‰โˆ’1๐‘‰ฮฃ๐‘ˆโˆ’1sinceฮฃdiagonal and๐‘ˆ,๐‘‰orthogonal=๐‘ˆฮฃ2๐‘ˆโˆ’1,

hence ๐ด๐ดโŠค is similar to ฮฃ2 so has the same eigenvalues as ฮฃ2, which are ๐œŽ12,โ€ฆ,๐œŽ๐‘›2.

Lemma 6.3.18: The determinant of any orthogonal matrix ๐‘„ is 1.

Proof:

det(๐‘„)2=det(๐‘„)det(๐‘„)=det(๐‘„)det(๐‘„โŠค)=det(๐‘„๐‘„โŠค)=det(๐ผ)=1โŸนdet(๐‘„)=1.

Theorem 6.3.19: Let ๐ดโˆˆ๐‘…๐‘›ร—๐‘› be a square matrix. Then

|det(๐ด)|=โˆ๐‘–=1๐‘›๐œŽ๐‘–.

Proof:

|det(๐ด)|=|det(๐‘ˆฮฃ๐‘‰โŠค)|=|det(๐‘ˆ)det(ฮฃ)det(๐‘‰โŠค)|=|det(ฮฃ)|byLemmaย 6.3.18=|โˆ๐‘–=1๐‘›๐œŽ๐‘–|sinceฮฃdiagonal=โˆ๐‘–=1๐‘›๐œŽ๐‘–since๐œŽ๐‘–>0for1โ‰ค๐‘–โ‰ค๐‘›.

Theorem 6.3.20 (Low-rank approximation): For any ๐‘˜โ‰ค๐‘Ÿ, define

๐ด๐‘˜โ‰”โˆ‘๐‘–=1๐‘˜๐œŽ๐‘–๐‘ขโƒ—๐‘–๐‘ฃโƒ—๐‘–โŠค.

Then

โ€–๐ดโˆ’๐ด๐‘˜โ€–2=inf๐ตโˆˆโ„๐‘šร—๐‘š;rank(๐ต)โ‰ค๐‘˜โ€–๐ดโˆ’๐ตโ€–2=๐œŽ๐‘˜+1,

where inf denotes the infimum (equivalent to minimum for finite sets); that is, ๐ด๐‘˜ is a low-rank approximation of ๐ด, where the Euclidean distance between ๐ด and ๐ด๐‘˜ is ๐œŽ๐‘˜+1.

Proof:

TODO

Remark: โ€–๐ดโˆ’๐ด๐‘˜โ€–โ‰”0 if ๐‘˜=min{๐‘š,๐‘›}.

Theorem 6.3.21 (Spectral theorem): Given a symmetric ๐‘›ร—๐‘› matrix ๐€, there exists an orthonormal basis for โ„๐‘› consisting of eigenvectors of ๐€.

Proof: The SVD of ๐ด is ๐ด=๐‘ˆฮฃ๐‘‰โŠค. Since ๐ดโŠค=๐ด, (๐‘ˆฮฃ๐‘‰โŠค)โŠค=๐‘‰ฮฃ๐‘ˆโŠค=๐‘ˆฮฃ๐‘‰โŠค. Choosing ๐‘ˆ=๐‘‰ gives ๐ด=๐‘‰ฮฃ๐‘‰โŠค=๐‘‰ฮฃ๐‘‰โˆ’1, since ๐• is orthogonal, giving an eigenvalue decomposition with eigenvectors the rows or columns of ๐‘‰. Clearly these form a basis for โ„๐‘›, from Corollaryย 3.6.4.