Lab 7 (+ chat about matrices). Lab7Solutions
Gaussian elimination
LU factorisation
Solving Ax= b. Matlab x = A\b
Lab 8
Gauss-Jordan. rref
Inverses. inv
Lab 9
Determinants. det
Lab 10
Planes, lines, points
Lab 11 least squares solution of over-determined systems
minimising over x (square of ) norm(Ax-b).
Matlab x = A\b
---------------------------------------------------------------------------
Lab 8. Square matrices, inverses
If A and B are invertible then so is A*B and
inv(A*B) = inv(B)*inv(A)
Transposes
(A*B)’ = B’*A’
Different sorts of matrices
D diagonal diag
U upper triangular
L lower triangular
Products of
diagonal matrices are diagonal
Products of
upper triangular matrices are upper triangular
Products of
lower triangular matrices are lower triangular
If the matrices are invertible
inv(D) is diagonal
inv(U) is upper triangular
inv(L) is lower triangular
Next lab, det
det(A*B)=det(A)*det(B)
The next little bit is cut and paste from the wikipedia page.
https://en.wikipedia.org/wiki/Row_echelon_form
The following is an example of a 3×5 matrix in row echelon form, which is not in reduced row echelon form (see below):
[ 1,a0,a1,a2,a3;
0, 0, 2,a4, a5;
0, 0, 0, 1, a6]
A matrix is in reduced row echelon form if it satisfies the following conditions:[3]
It is in row echelon form.
The leading entry in each nonzero row is a 1 (called a leading 1).
Each column containing a leading 1 has zeros in all its other entries.
The reduced row echelon form of a matrix may be computed by Gauss–Jordan elimination. Unlike the row echelon form, the reduced row echelon form of a matrix is unique and does not depend on the algorithm used to compute it.[
Assuming a0 and a6 in above are nonzero, rref of above is
[ 1, 1, 0, 0, a3;
0, 0, 1, 0, a5;
0, 0, 0, 1, a6]
Use of rref for inverses of square matrices