2250 8:05am Lectures Week 5 S2015

Last Modified: February 08, 2015, 12:32 MST.    Today: December 14, 2018, 04:20 MST.
```Topics
Sections 3.4, 3.5, 3.6
The textbook topics, definitions, examples and theoremsEdwards-Penney 3.1, 3.2, 3.3 (3.0 K, txt, 18 Dec 2013)Edwards-Penney 3.4, 3.5, 3.6 (4.0 K, txt, 18 Dec 2013)```

Monday: Special matrices. Elementary matrices. Sections 3.3, 3.4, 3.5.

```Review of Matrices from Week 4Slides: Matrix add, scalar multiply and matrix multiply (156.7 K, pdf, 03 Mar 2012)Slides: Digital photos, Maxwell's RGB separations, visualization of matrix add (170.2 K, pdf, 03 Mar 2012)Slides: More on digital photos, checkerboard analogy (141.9 K, pdf, 03 Mar 2012)
Vector and vector operations.
Matrix multiply
The college algebra definition
Examples.
Matrix rules
Vector space rules.
Matrix multiply rules.
Examples: how to multiply matrices on paper.
Matrix formulation Ax=b of a linear system
Properties of matrices: addition, scalar multiply.
Matrix multiply rules. Matrix multiply Ax for x a vector.
Linear systems as the matrix equation Ax=b.
Theorem 1. Matrix algebra
A+B=B+A
A+(B+C)=(A+B)+C
A(BC)=(AB)C
A(B+C)=AB+AC, (D+E)F=DF+EF
Special matrices
diagonal matrix
upper and lower triangular matrices
square matrix
Def: Zero matrix 0
Theorems: 0+A=A+0, A0=0, 0A=0
Def: Identity matrix I
Theorems: AB=AC ==> B=C is false
AI=A, IB=B
Def: Augmented matrix of vectors A=[v1, v2, v3, ... ,vn] or  A=aug(v1, v2, v3, ... ,vn)
Same matrix created as in Maple A:=< v1|v2|v3 > for n=3
Theorems: Ax in terms of columns of A
AB in terms of columns of B
```
```Matrix Inverse and Inverse Identity
Def: Matrix A has inverse matrix B means AB=BA=I
Inverse matrix
Definition: A has an inverse B if and only if AB=BA=I.
Theorem 1. An inverse is unique.
THEOREM 1a. If A has an inverse, then A is square.
Non-square matrices don't have an inverse.
THEOREM 1b. The zero matrix does not have an inverse.
Theorem 1. The inverse of a matrix is unique.
When it exists, then write B = A^(-1)
Theorem 2. Inverse of a 2x2 matrix A:=Matrix([[a,b],[c,d]])
equals B=(1/det(A))Matrix([[d,-b],[-c,a]])
Theorem 3. (a) (A^(-1))^(-1)=A
(b) (A^n)^(-1)=(A^(-1))^n for integer n>=0
(c) (AB)^(-1)=B^(-1) A^(-1)
Theorem 4. The nxn system Ax=b with A invertible has unique solution
x=A^(-1)b
Slides: Inverse matrix, frame sequence method (97.0 K, pdf, 11 Feb 2015)
THEOREM. Homogeneous system with a unique solution.
THEOREM. Homogeneous system with more variables than equations.
Equation ideas can be used on a matrix A.
View matrix A as the set of coefficients of a homogeneous
linear system Ax=0. The augmented matrix B for this homogeneous
system would be the given matrix with a column of zeros appended:
B=aug(A,0).
Pitfalls in Matlab and numerical workbenches.
General structure of linear systems.
Superposition.
General solution
X=X0+t1 X1 + t2 X2 + ... + tn Xn.
QUESTION to be answered: What did I just do, by finding rref(A)?
You solved the system Ax=0 by finding the Last Frame in a combo,
swap, mult sequence starting with matrix A or augmented matrix
aug(A,0). The RREF is the Last Frame. From it, use the Last
Frame Algorithm to find the general solution in scalar form,
then in vector form.
Problems 3.4-17 to 3.4-22 are homogeneous systems Ax=0 with matrix A
in reduced echelon form. Apply the last frame algorithm then write
the general solution in vector form.

EXAMPLE. A 3x3 matrix. Special Solutions of Gilbert Strang.
How to find the vector general solution.
How to find x_p: Set all free variable symbols to zero
How to find x_h: Take all linear combinations of the
Special Solutions.
Superposition: x = x_p + x_h = General Solution

Project: Write a sequence of Toolkit frames as matrix multiply equations
Def: Elementary Matrix. Construct an elementary matrix from the identity matrix I
by applying exactly one operation combo, swap or mult. Conventions
E = combo(I,s,t,c) [E is an elementary combo matrix]
E = swap(I,s,t)    [E is an elementary swap matrix]
E = mult(I,t,m)    [E is an elementary multiply matrix]
EXAMPLE: For the 2x2 identity I=Matrix([[1,0],[0,1]]),
E=mult(I,2,m)=Matrix([[1,0],[0,m]])

Definitions and details:Slides: Elementary matrix, the theory (154.2 K, pdf, 11 Feb 2015)
The purpose of introducing elementary matrices is to replace combo,
swap, mult frame sequences by matrix multiply equations of the form

B=En En-1 ... E1 A.

Symbols A and B stand for any two frames in a sequence. Symbols
En, En-1, ... E1
are elementary square matrices that represent the operations combo,
swap, mult that created the sequence.
```

Mon-Wed: Inverses. Elementary matrices. Sections 3.4, 3.5.

```How to compute the inverse matrix
Def: AB=BA=I means B is the inverse of A.
THEOREM. A square matrix A has a inverse if and only if
one of the following holds:
1. rref(A) = I
2. Ax=0 has unique solution x=0.
3. det(A) is not zero.
4. rank(A) = n =row dimension of A.
5. There are no free variables in the last frame.
6. All variables in the last frame are lead variables.
7. nullity(A)=0.
THEOREM. The inverse matrix is unique and written A^(-1).
THEOREM. If A, B are square and AB = I, then BA = I.
THEOREM. The inverse of inverse(A) is A itself.
THEOREM. If C and D have inverses, then so does CD and
inverse(CD) = inverse(D) inverse(C).
THEOREM.  The inverse of a 2x2 matrix is given by the formula
1      [ d  -b]
-------    [      ]
THEOREM.  The inverse B of any square matrix A can be
found from the sequence of frames
augment(A,I)
then toolkit operations
combo, swap, mult
to arrive at the Last Frame
augment(I,B)
The inverse of A equals matrix B in the right panel (last frame).
Slides: Inverse matrix, frame sequence method (97.0 K, pdf, 11 Feb 2015)Slides: Matrix add, scalar multiply and matrix multiply (156.7 K, pdf, 03 Mar 2012)Slides: Elementary matrix theorems (154.2 K, pdf, 11 Feb 2015)
Elementary matrices.
How to write a combo-swap-mult sequence as a matrix product
Fundamental theorems on combo-swap-mult sequences
THEOREM.
If B immediately follows A in a combo-swap-mult sequence,
then B = E A, where E is an elementary matrix having
EXACTLY ONE of the following forms:
E=combo(I,s,t,c), or
E= swap(I,s,t), or
E= mult(I,t,m)
Proof: See problem 3.5-39.
THEOREM.
If a combo-swap-mult sequence starts with matrix A and ends with
matrix B, then
B = (product of elementary matrices) A.

THE MEANING
If A is the first frame and B a later frame in a sequence, then
there are elementary swap, combo and mult matrices E1 to
En such that the frame sequence A ==> B can be written as
the matrix multiply equation
B=En En-1 ... E1 A.

THEOREM. Every elementary matrix E has an inverse. It is found
as follows:
Elementary Matrix   Inverse Matrix
E=combo(I,s,t,c)    E^(-1)=combo(I,s,t,-c)
E=swap(I,s,t)       E^(-1)=swap(I,s,t)
E=mult(I,t,m)       E^(-1)=mult(I,t,1/m)

Web References: Elementary matricesSlides: Elementary matrix theorems (154.2 K, pdf, 11 Feb 2015)
Inverses of elementary matrices.
PROBLEM. Solve B=E3 E2 E1 A for matrix A.
ANSWER. A = (E3 E2 E1)^(-1) B.
This problem uses the fundamental theorem on elementary matrices
(see above). While 3.5-44 is a difficult technical proof, the
extra credit problems on this subject replace the proofs by a
calculation. See Xc3.5-44a and Xc3.5-44b.
```

Wednesday: Determinants. Survey of Results. Section 3.6.

```  The textbook topics, definitions and theoremsEdwards-Penney 3.1, 3.2, 3.3 (3.0 K, txt, 18 Dec 2013)Edwards-Penney 3.4, 3.5, 3.6 (4.0 K, txt, 18 Dec 2013)
College Algebra Background:
College algebra determinant definition
Sarrus' rule for 2x2 and 3x3 matrices.
References for 3.6 determinant theory and Cramer's RuleSlides: Determinants 2008 (227.1 K, pdf, 03 Mar 2012)Manuscript: Determinants, Cramer's rule, Cayley-Hamilton (326.0 K, pdf, 07 Feb 2012)
How to do 3.5-16 in maple.
A:=Matrix([[1,-3,-3],[-1,1,2],[2,-3,-3]]);
id:=<1,0,0|0,1,0|0,0,1>;
A1:= < A | id >;
linalg[rref](A1);    # inverse in right panel
A2:=combo(A1,1,2,1); # Doing the steps one at a time
A3:=combo(A2,1,3,-2);
WARNING. Some linalg functions return a matrix X with wrong format.
Be willing to use XX:=convert(X,Matrix), as needed. Or,
retire linalg and use only the LinearAlgebra package.
See problem notes chapter 3html: Problem notes S2015 (2.8 K, html, 01 Jan 2015)
Methods for computing a determinant
Sarrus' rule, 2x2 and 3x3 cases.
Four rules for determinants
Triangular Rule (one-arrow Sarrus' Rule): The determinant of
a triangular matrix is the product of the diagonal elements.
Multiply rule: B=mult(A,t,m), then |A| = (1/m) |B|
Swap rule: B=swap(A,s,t), then |A| = (-1) |B|
Combo rule: B=combo(A,s,t,c), then |A| = |B|
```

Thursday: Ziwen Zhu

```Lab4 due. Lab session on Lab5.
Sample Exam: Exam 1 and 2 keys from S2014. See also F2013, exams 1, 2.Sample Midterm 1, S2015, with solutions (1456.8 K, pdf, 19 Feb 2015)Exams and exam keys for the last 5 years (22.2 K, html, 23 Feb 2015)```

Friday: Cramers Rule, Adjugate formula. Section 3.6

```Survey of Main theorems:
Computation by the 4 rules, cofactor expansion, hybrid methods.
Determinant product theorem det(AB)=det(A)det(B).
Cramer's Rule for solving Ax=b:
x1 = delta1/delta, ... , xn = deltan/delta
Results on Determinants
Examples: Computing det(A) easily. When does det(A)=0?
THEOREM. Determinant values for elementary matrices:
det(E)=1 for combo(s,t,c),
det(E)=m for mult(t,m),
det(E)=-1 for swap(s,t).

Transpose matrix
(A^T)^T = A
(A + B)^T = A^T + B^T
(AB)^T = B^T A^T
det(A)=det(A^T)

Determinant product theorem
det(AB)=det(A)det(B) for any two square matrices A,B
Delayed until Monday
Discussion of 3.5 problems.
Lecture
Ideas of rank, nullity, dimension in examples.Slides: Rank, nullity and elimination (156.3 K, pdf, 20 Dec 2012)
More on Rank, Nullity
dimension
3 possibilities
elimination algorithm

Monday Lecture
Cofactor expansion of det(A).
minor(A,i,j)
checkerboard sign (-1)^{i+j}
cofactor(A,i,j)=(sign)minor(A,i,j)
Details for 3x3 and 4x4.
Hybrid methods to evaluate det(A).
How to use the 4 rules to compute det(A) for any size matrix.
Computing determinants of sizes 3x3, 4x4, 5x5 and higher.
Frame sequences and determinants.
Formula for det(A) in terms of swap and mult operations.
Special theorems for det(A)=0
a zero row or col
duplicates rows
proportional rows.
Elementary matrices
Determinant product rule for an elementary matrix
Cramer's rule.
How to form the matrix of cofactors and its transpose.
THEOREM. The 4 rules for computing any determinant can be
compressed into two rules,
det(triangular matrix)=the product of the diagonal elements,
det(EA)=det(E)det(A), where E is an elementary matrix, combo,
swap or mult.
Determinant product theorem
det(AB)=det(A)det(B) for any two square matrices A,B
Proof details.
Example.