Matrices and Linear Systems in Attaway
The following lecture overheads and accompanying reading are independent
of MatLab.
Attaway Chapter 11.1 links
matrices as described here with their representation and use
in Matlab.
Attaway 11.1 should be read and understood as a
complement to the on-line lecture and reading.
Attaway 11.2, leading up to 11.2.2.1, gives the background and
algorithm for Gaussian Elimination as a method of solving Linear
Equations. It is useful "how-to" reading for the assignment.
Details A: Reduction Step
Implementation Note:
Though it mixes element semantics and is not mathematically a pure
object,
the augmented matrix of the N-variable system AX = B
is the
N x N+1 matrix
[A | B] (that is the column of
constants
B concatenated onto the right of A ). This
augmented matrix
is useful because all the EROs involve both A and
B , which are now together in the augmented matrix
and can be manipulated together twice as easily as apart.
- Equations are written in Ax = c matrix form.
The x vector is sometimes not written out at every step
as it serves only to specify the order of the unknowns.
- Appropriate multiples of the first row are added to
the other rows so that the first coefficient is 0 in
each subsequent row. This produces a column of 0s below
the (1,1) element of the matrix.
The constant elements are treated as part of the row.
- The appropriate multiples are determined by dividing the
first coefficient of each lower row by the first coefficient of
the first row (the (1,1) element). This divisor is known
as the pivot
- In similar fashion, appropriate multiples of the second row are
added to the rows below it to produce 0s in the second column below
the (2,2) element (which now serves as the pivot)
- The process is repeated for subsequent rows until an
upper triangular matrix
that contains 0s below the main diagonal is produced.
This matrix, along with the (modified) constant vector, represents
a system that has exactly the same solutions as the
initial system. This completes the reduction stage.