gauss-jordan elimination math 21b 2016, o....

2
GAUSS-JORDAN ELIMINATION Math 21b 2016, O. Knill MATRIX FORMULATION. Consider the system of linear equations: 3x - y - z =0 -x +2y - z =0 -x - y +3z =9 It can be written as A~x = ~ b, where A is a matrix and ~x, ~ b are column vectors. The coefficient matrix of the above system is A = 3 -1 -1 -1 2 -1 -1 -1 3 ,x = x y z ,b = 0 0 9 . The i’th entry b i of Ax is the dot product of the i’th row with x. We also look at the augmented matrix where the last column containing b is sepa- rated for clarity reasons. B = 3 -1 -1 | 0 -1 2 -1 | 0 -1 -1 3 | 9 . MATRIX TERMINOLOGY. A rectangular array of numbers is called a matrix. If the matrix has n rows and m columns, it is called a n × m matrix. A matrix with one column only is called a column vector, a matrix with one row a row vector. The entries of a matrix are denoted by a ij , where i is the row and j is the column. In the case of the linear equation above, the matrix A was a 3 × 3 square matrix and the augmented matrix B above is a 3 × 4 matrix. m n GAUSS-JORDAN ELIMINATION. Gauss-Jordan Elimination is a process, where successive subtraction of multiples of other rows or scaling brings the matrix into reduced row echelon form. The elementary row operations are Swap two rows. Scale a row Subtract a multiple of a row from an other. The process transfers a given matrix A into a new matrix rref(A) LEADING ONE. The first nonzero element in a row is called a leading one after it got scaled. Gauss Jordan elimination has the goal to reach a leading one in each nonzero row. REDUCED ECHELON FORM. A matrix is called in reduced row echelon form 1) in a nonzero row the first nonzero entry is 1. 2) if a column has a leading 1, all other column entries are 0. 3) in a row with leading 1, every row above has a leading 1 to the left. To memorize: Leaders like to be first, alone of their kind and have other leaders above to their left. RANK. The number of leading 1 in rref(A) is called the rank of A. HISTORY Gauss Jordan elimination appeared already in the Chinese manuscript ”Jiuzhang Suanshu” (’Nine Chapters on the Mathematical art’) a textbook from around 200 BC during the Han dynasty. The German geode- sist Wilhelm Jordan (1842-1899) applied the Gauss-Jordan method to find squared errors in surveying. An other ”Jordan”, the French Mathematician Camille Jordan (1838-1922) worked on linear algebra topics also (Jordan form) and is often mistakenly credited with the Gauss-Jordan process. Gauss de- veloped Gaussian elimination around 1800 and used it to solve least squares problems in celestial mechanics and later in geodesic computations. In 1809, Gauss published the book ”Theory of Motion of the Heavenly Bodies” in which he used the method to solve astronomical problems.

Upload: others

Post on 10-Feb-2020

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GAUSS-JORDAN ELIMINATION Math 21b 2016, O. Knillpeople.math.harvard.edu/~knill/teaching/math21b2016/02-gaussjordan.pdf · Gauss-Jordan Elimination is a process, where successive subtraction

GAUSS-JORDAN ELIMINATION Math 21b 2016, O. Knill

MATRIX FORMULATION.

Consider the system of linear equations:∣∣∣∣∣∣3x− y − z = 0−x + 2y − z = 0−x− y + 3z = 9

∣∣∣∣∣∣

It can be written as A~x = ~b, where A is a matrix and ~x,~bare column vectors. The coefficient matrix of the abovesystem is

A =

3 −1 −1−1 2 −1−1 −1 3

, x =

xyz

, b =

009

.

The i’th entry bi of Ax is the dot product of the i’th rowwith x.

We also look at the augmented matrixwhere the last column containing b is sepa-rated for clarity reasons.

B =

3 −1 −1 | 0−1 2 −1 | 0−1 −1 3 | 9

.

MATRIX TERMINOLOGY.A rectangular array of numbers is called a matrix. If the matrixhas n rows and m columns, it is called a n×m matrix. A matrixwith one column only is called a column vector, a matrix withone row a row vector. The entries of a matrix are denoted by aij ,where i is the row and j is the column. In the case of the linearequation above, the matrix A was a 3 × 3 square matrix and theaugmented matrix B above is a 3× 4 matrix.

m

n

GAUSS-JORDAN ELIMINATION. Gauss-Jordan Elimination is a process, where successive subtraction ofmultiples of other rows or scaling brings the matrix into reduced row echelon form. The elementary rowoperations are

Swap two rows. Scale a row Subtract a multiple of a row from an other.

The process transfers a given matrix A into a new matrix rref(A)

LEADING ONE. The first nonzero element in a row is called a leading one after it got scaled. Gauss Jordanelimination has the goal to reach a leading one in each nonzero row.

REDUCED ECHELON FORM. A matrix is called in reduced row echelon form

1) in a nonzero row the first nonzero entry is 1.2) if a column has a leading 1, all other column entries are 0.3) in a row with leading 1, every row above has a leading 1 to the left.

To memorize: Leaders like to be first, alone of their kind and have other leaders above to their left.

RANK. The number of leading 1 in rref(A) is called the rank of A.

HISTORY Gauss Jordan elimination appeared already in the Chinesemanuscript ”Jiuzhang Suanshu” (’Nine Chapters on the Mathematical art’)a textbook from around 200 BC during the Han dynasty. The German geode-sist Wilhelm Jordan (1842-1899) applied the Gauss-Jordan method to findsquared errors in surveying. An other ”Jordan”, the French MathematicianCamille Jordan (1838-1922) worked on linear algebra topics also (Jordan form)and is often mistakenly credited with the Gauss-Jordan process. Gauss de-veloped Gaussian elimination around 1800 and used it to solve least squaresproblems in celestial mechanics and later in geodesic computations. In 1809,Gauss published the book ”Theory of Motion of the Heavenly Bodies” in whichhe used the method to solve astronomical problems.

Page 2: GAUSS-JORDAN ELIMINATION Math 21b 2016, O. Knillpeople.math.harvard.edu/~knill/teaching/math21b2016/02-gaussjordan.pdf · Gauss-Jordan Elimination is a process, where successive subtraction

EXAMPLES. The reduced echelon form of the augmented matrix B will also be important to determine onhow many solutions the linear system Ax = b has.[

0 1 2 | 21 −1 1 | 52 1 −1 | −2

][

1 −1 1 | 50 1 2 | 22 1 −1 | −2

][

1 −1 1 | 50 1 2 | 20 3 −3 | −12

][

1 −1 1 | 50 1 2 | 20 1 −1 | −4

][

1 0 3 | 70 1 2 | 20 0 −3 | −6

][

1 0 3 | 70 1 2 | 20 0 1 | 2

] 1 0 0 | 1

0 1 0 | −20 0 1 | 2

rank(A) = 3, rank(B) = 3.

0 1 2 | 21 −1 1 | 51 0 3 | −2

1 −1 1 | 5

0 1 2 | 21 0 3 | −2

1 −1 1 | 5

0 1 2 | 20 1 2 | −7

1 −1 1 | 5

0 1 2 | 20 0 0 | −9

1 0 3 | 7

0 1 2 | 20 0 0 | −9

1 0 3 | 7

0 1 2 | 20 0 0 | 1

rank(A) = 2, rank(B) = 3.

0 1 2 | 21 −1 1 | 51 0 3 | 7

1 −1 1 | 5

0 1 2 | 21 0 3 | 7

1 −1 1 | 5

0 1 2 | 20 1 2 | 2

1 −1 1 | 5

0 1 2 | 20 0 0 | 0

1 0 3 | 7

0 1 2 | 20 0 0 | 0

rank(A) = 2, rank(B) = 2.

PROBLEMS.

1) Find the rank of the following matrix

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 12 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 23 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 34 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 45 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 56 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 67 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 78 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 89 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9

.

2) How many row reduced echelon forms does a 1× 5 matrix have?[0 1 0 1 0

].

3) More challenging: what is the rank of the following matrix?

1 2 3 4 5 6 7 82 3 4 5 6 7 8 13 4 5 6 7 8 1 24 5 6 7 8 1 2 35 6 7 8 1 2 3 46 7 8 1 2 3 4 57 8 1 2 3 4 5 68 1 2 3 4 5 6 7

.

4) What are the possible ranks for a 7× 11 matrix?