Echelon Form of a Matrix
This lesson introduces the concept of an
echelon matrix. Echelon matrices come in two forms: the
row echelon form (ref) and the
reduced row echelon form (rref).
Row Echelon Form
A matrix is in
row echelon form (ref) when it satisfies the following conditions.
- The first non-zero element in each row, called the leading entry, is 1.
- Each leading entry is in a column to the right of the leading entry in the previous row.
- Rows with all zero elements, if any, are below rows having a non-zero element.
Each of the matrices shown below are examples of matrices in row echelon form.
|
|
| 1 | 2 | 3 | 4 |
|
| 0 | 0 | 1 | 3 |
| 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 |
| | |
| Aref | | Bref | | Cref |
Reduced Row Echelon Form
A matrix is in
reduced row echelon form (rref) when it satisfies the following conditions.
- The matrix satisfies conditions for a row echelon form.
- The leading entry in each row is the only non-zero entry in its column.
Each of the matrices shown below are examples of matrices in
reduced row echelon form.
| |
| 1 | 2 | 0 | 0 |
|
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 |
| | |
| Arref | | Brref | | Crref |
Test Your Understanding of This Lesson
Problem 1
Which of the following matrices is in row echelon form?
(A) Matrix A
(B) Matrix B
(C) Matrix C
(D) Matrix D
(E) None of the above
Solution
The correct answer is (B), since it satisfies all of the requirements for a row echelon matrix. The other matrices fall short.
- The leading entry in Row 1 of matrix A is to the right of the leading entry in Row 2, which is inconsistent with definition of a row echelon matrix.
- In matrix C, the leading entries in Rows 2 and 3 are in the same column, which is not allowed.
- In matrix D, the row with all zeros (Row 2) comes before a row with a non-zero entry. This is a no-no.
Problem 2
Which of the following matrices are in reduced row echelon form?
| 1 | 0 | 0 | 0 |
|
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 |
|
| 1 | 0 | 0 | 0 |
|
| 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |
|
| 0 | 1 | 0 | 0 |
|
| 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 0 |
|
| A | B | C |
(A) Only matrix A
(B) Only matrix B
(C) Only matrix C
(D) All of the above
(E) None of the above
Solution
The correct answer is (D), since each matrix satisfies all of the requirements for a reduced row echelon matrix.
- The first non-zero element in each row, called the leading entry, is 1.
- Each leading entry is in a column to the right of the leading entry in the previous row.
- Rows with all zero elements, if any, are below rows having a non-zero element.
- The leading entry in each row is the only non-zero entry in its column.
Changing a Matrix Into Echelon Form
This lesson shows how to convert a
matrix to its
row echelon form and to its
reduced row echelon form.
Echelon Forms
A matrix is in
row echelon form (ref) when it satisfies the following conditions.
- The first non-zero element in each row, called the leading entry, is 1.
- Each leading entry is in a column to the right of the leading entry in the previous row.
- Rows with all zero elements, if any, are below rows having a non-zero element.
A matrix is in
reduced row echelon form (rref) when it satisfies the following conditions.
- The matrix is in row echelon form (i.e., it satisfies the three conditions listed above).
- The leading entry in each row is the only non-zero entry in its column.
A matrix in echelon form is called an
echelon matrix. Matrix
A and matrix
B are examples of echelon matrices.
| 1 | 2 | 3 | 4 |
|
| 0 | 0 | 1 | 3 |
| 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 |
| |
| 1 | 2 | 0 | 0 |
|
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 0 |
|
| A | | B |
Matrix
A is in row echelon form, and matrix
B is in reduced row echelon form.
How to Transform a Matrix Into Its Echelon Forms
Any matrix can be transformed into its echelon forms, using a series of
elementary row operations. Here's how.
- Pivot the matrix
- Find the pivot, the first non-zero entry in the first column of the matrix.
- Interchange rows, moving the pivot row to the first row.
- Multiply each element in the pivot row by the inverse of the pivot, so the pivot equals 1.
- Add multiples of the pivot row to each of the lower rows, so every element in the pivot column of the lower rows equals 0.
- To get the matrix in row echelon form, repeat the pivot
- Repeat the procedure from Step 1 above, ignoring previous pivot rows.
- Continue until there are no more pivots to be processed.
- To get the matrix in reduced row echelon form, process non-zero entries above each pivot.
- Identify the last row having a pivot equal to 1, and let this be the pivot row.
- Add multiples of the pivot row to each of the upper rows, until every element above the pivot equals 0.
- Moving up the matrix, repeat this process for each row.
Transforming a Matrix Into Its Echelon Forms: An Example
To illustrate the transformation process, let's transform Matrix
A to a row echelon form and to a reduced row echelon form.
| ⇒ | | ⇒ | | ⇒ | | ⇒ | |
| A |
| A1 |
| A2 |
| Aref |
| Arref |
To transform matrix
A into its echelon forms, we implemented the following series of elementary row operations.
- We found the first non-zero entry in the first column of the matrix in row 2; so we interchanged Rows 1 and 2, resulting in matrix A1.
- Working with matrix A1, we multiplied each element of Row 1 by -2 and added the result to Row 3. This produced A2.
- Working with matrix A2, we multiplied each element of Row 2 by -3 and added the result to Row 3. This produced Aref. Notice that Aref is in row echelon form, because it meets the following requirements: (a) the first non-zero entry of each row is 1, (b) the first non-zero entry is to the right of the first non-zero entry in the previous row, and (c) rows made up entirely of zeros are at the bottom of the matrix.
- And finally, working with matrix Aref, we multiplied the second row by -2 and added it to the first row. This produced Arref. Notice that Arref is in reduced row echelon form, because it satisfies the requirements for row echelon form plus each leading non-zero entry is the only non-zero entry in its column.
Note: The row echelon matrix that results from a series of elementary row operations is not necessarily unique. A different set of row operations could result in a different row echelon matrix. However, the
reduced row echelon matrix is unique; each matrix has only one reduced row echelon matrix.
Test Your Understanding of This Lesson
Problem 1
Consider the matrix
X, shown below.
Which of the following matrices is the reduced row echelon form of matrix
X ?
(A) Matrix A
(B) Matrix B
(C) Matrix C
(D) Matrix D
(E) None of the above
Solution
The correct answer is (B). The elementary row operations used to change Matrix
X into its reduced row echelon form are shown below.
To change
X to its reduced row echelon form, we take the following steps:
- Interchange Rows 1 and 2, producing X1.
- In X1, multiply Row 2 by -5 and add it to Row 3, producing X2.
- In X2, multiply Row 2 by -2 and add it to Row 1, producing Xrref.
Note: Matrix
A is not in reduced row echelon form, because the leading entry in Row 2 is to the left of the leading entry in Row 3; it should be to the right. Matrix
C is not in reduced row echelon form, because column 2 has more than one non-zero entry. And finally, matrix
D is not in reduced row echelon form, because Row 2 with all zeros is followed by a row with a non-zero element; all-zero rows must follow non-zero rows.
Vector Dependence
This lesson introduces the topic of
vector dependence. One
vector is dependent on other vectors, if it is a
linear combination of the other vectors.
Linear Combination of Vectors
If one
vector is equal to the sum of
scalar multiples of other vectors, it is said to be a
linear combination of the other vectors.
For example, suppose
a = 2
b + 3
c, as shown below.
Note that 2
b is a scalar multiple and 3
c is a scalar multiple. Thus,
a is a linear combination of
b and
c.
Linear Dependence of Vectors
A set of vectors is
linearly independent if no vector in the set is (a) a scalar multiple of another vector in the set or (b) a linear combination of other vectors in the set; conversely, a set of vectors is
linearly dependent if any vector in the set is (a) a scalar multiple of another vector in the set or (b) a linear combination of other vectors in the set.
Consider the row vectors below.
Note the following:
- Vectors a and b are linearly independent, because neither vector is a scalar multiple of the other.
- Vectors a and d are linearly dependent, because d is a scalar multiple of a; i.e., d = 2a.
- Vector c is a linear combination of vectors a and b, because c = a + b. Therefore, the set of vectors a, b, and c is linearly dependent.
- Vectors d, e, and f are linearly independent, since no vector in the set can be derived as a scalar multiple or a linear combination of any other vectors in the set.
Test Your Understanding of This Lesson
Problem 1
Consider the row vectors shown below.
Which of the following statements are true?
(A) Vectors a, b, and c are linearly dependent.
(B) Vectors a, b, and d are linearly dependent.
(C) Vectors b, c, and d are linearly dependent.
(D) All of the above.
(E) None of the above.
Solution
The correct answer is (D), as shown below.
- Vectors a, b, and c are linearly dependent, since a + b = c.
- Vectors a, b, and d are linearly dependent, since 2a + b = d.
- Vectors b, c, and d are linearly dependent, since 2c - b = d.
Matrix Rank
This lesson introduces the concept of matrix rank and explains how the rank of a matrix is revealed by its echelon form.
The Rank of a Matrix
You can think of an r x c matrix as a set of r row vectors, each having c elements; or you can think of it as a set of c column vectors, each having r elements.
The rank of a matrix is defined as (a) the maximum number of linearly independent column vectors in the matrix or (b) the maximum number of linearly independent row vectors in the matrix. Both definitions are equivalent.
For an r x c matrix,
- If r is less than c, then the maximum rank of the matrix is r.
- If r is greater than c, then the maximum rank of the matrix is c.
The rank of a matrix would be zero only if the matrix had no elements. If a matrix had even one element, its minimum rank would be one.
How to Find Matrix Rank
In this section, we describe a method for finding the rank of any matrix. This method assumes familiarity with
echelon matrices and
echelon transformations.
The maximum number of linearly independent vectors in a matrix is equal to the number of non-zero rows in its
row echelon matrix. Therefore, to find the rank of a matrix, we simply transform the matrix to its row echelon form and count the number of non-zero rows.
Consider matrix
A and its row echelon matrix,
Aref. Previously, we showed
how to find the row echelon form for matrix A.
Because the row echelon form
Aref has two non-zero rows, we know that matrix
A has two independent row vectors; and we know that the rank of matrix
A is 2.
You can verify that this is correct. Row 1 and Row 2 of matrix
A are linearly independent. However, Row 3 is a
linear combination of Rows 1 and 2. Specifically, Row 3 = 3*( Row 1 ) + 2*( Row 2). Therefore, matrix
A has only two independent row vectors.
Full Rank Matrices
When all of the
vectors in a matrix are
linearly independent, the matrix is said to be
full rank. Consider the matrices
A and
B below.
Notice that row 2 of matrix
A is a scalar multiple of row 1; that is, row 2 is equal to twice row 1. Therefore, rows 1 and 2 are linearly dependent. Matrix
A has only one linearly independent row, so its rank is 1. Hence, matrix
A is not full rank.
Now, look at matrix
B. All of its rows are linearly independent, so the rank of matrix
B is 3. Matrix
B is full rank.
Test Your Understanding of This Lesson
Problem 1
Consider the matrix
X, shown below.
What is its rank?
(A) 0
(B) 1
(C) 2
(D) 3
(E) 4
Solution
The correct answer is (C). Since the matrix has more than zero elements, its rank must be greater than zero. And since it has fewer rows than columns, its maximum rank is equal to the maximum number of linearly independent rows. And because neither row is linearly dependent on the other row, the matrix has 2 linearly independent rows; so its rank is 2.
Problem 2
Consider the matrix
Y, shown below.
What is its rank?
(A) 0
(B) 1
(C) 2
(D) 3
(E) 4
Solution
The correct answer is (C). Since the matrix has more than zero elements, its rank must be greater than zero. And since it has fewer columns than rows, its maximum rank is equal to the maximum number of linearly independent columns.
Columns 1 and 2 are independent, because neither can be derived as a scalar multiple of the other. However, column 3 is linearly dependent on columns 1 and 2, because column 3 is equal to column 1 plus column 2. That leaves the matrix with a maximum of two linearly independent columns; e.g., column 1 and column 2. So the matrix rank is 2.
Matrix Determinants
The
determinant is a unique number associated with a square
matrix. In this lesson, we introduce notation for a determinant and we show how to compute the determinant for any square matrix.
Notation for a Determinant
There are at least three ways to denote the determinant of a square matrix.
- Denote the determinant by vertical lines around the matrix name; thus, the determinant of matrix A would be indicated by |A|.
- Another approach is to enclose matrix elements within vertical straight lines, as shown below.
| |A| = |
| A11 | A12 | A13 |
|
| A21 | A22 | A23 |
| A31 | A32 | A33 |
|
- And finally, some references refer to the deteriminant of A as Det A. Thus, |A| = Det A.
On this web site, we will use the first option; that is, we will refer to the determinant of
A as |
A|.
How to Compute the Determinant of a 2 x 2 Matrix
Suppose
A is a 2 x 2 matrix with elements
Aij, as shown below.
We compute the determinant of
A according to the following formula.
|A| = ( A11 * A22 ) - ( A12 * A21 )
How to Compute the Determinant of an n x n Matrix
The formula for computing the determinant of a 2 x 2 matrix (shown above) is actually a special case of the general algorithm for computing the determinant of any square matrix.
|A| = Σ ( + ) A1qA2rA3s . . . Anz
This algorithm requires some explanation. Here are the key points.
- The determinant is the sum of product terms made up of elements from the matrix.
- Each product term consists of n elements from the matrix.
- Each product term includes one element from each row and one element from each column.
- The number of product terms is equal to n! (where n! refers to n factorial).
- By convention, the elements of each product term are arranged in ascending order of the left-hand (or row-designating) subscript.
- To find the sign of each product term, we count the number of inversions needed to put the right-hand (or column-designating) subscripts in numerical order. If the number of inversions is even, the sign is positive; if odd, the sign is negative.
Unless you are a computer, this explanation is probably still confusing, so let's work through an example. Suppose
A is a 3 x 3 matrix with elements
Aij, as shown below.
| A = |
| A11 | A12 | A13 |
|
| A21 | A22 | A23 |
| A31 | A32 | A33 |
|
To begin, let's list each product term. In constructing this list, we will arrange elements of each product term in ascending order of their row-designating subscript. Our list of product terms appears below.
|A| = Σ ( + ) A1qA2rA3s . . . Anz
|A| = + A11A22A33 + A12A23A31 + A13A21A32 + A13A22A31 + A12A21A33 + A11A23A32
Note that we have 3! or 6 product terms, each consisting of one element from each row and one element from each column. The task remaining is to find the sign for each product term. To do this, we count the number of inversions needed to put elements in ascending order of their column-designating subscript.
To demonstrate how to count inversions, let's look at two of the product terms.
- Consider the second product term in the list: A12A23A31. To put all of the column-designating subscripts in ascending order, we need to move A31 from the end of the term to the front of the term, which results in: A31A12A23. This movement counts as two inversions, since we moved A31 two positions to the left. Since two is an even number, the sign of that product term should be positive.
- Consider the last product term in the list: A11A23A32. To put all of the column-designating subscripts in ascending order, we need to interchange the second and third elements, which results in: A11A32A23. This counts as one inversion, since we moved A32 one position to the left. Since one is an odd number, the sign of that product term should be negative.
If we repeat this process for each of the other product terms, we get the following formula for the determinant of a 3 x 3 matrix.
|A| = Σ ( + ) A1qA2rA3s . . . Anz
|A| = + A11A22A33 + A12A23A31 + A13A21A32 - A13A22A31 - A12A21A33 - A11A23A32
We can employ the same process to compute the determinant for any size matrix. However, as the matrix gets larger, the number of product terms increases very quickly. For example, a 4 x 4 matrix would have 4! or 24 terms; a 5 x 5 matrix, 120 terms; a 6 x 6 matrix, 720 terms, and so on. A 10 x 10 matrix would have 3,628,800 terms. You would not want to calculate the determinant of a large matrix by hand.
Test Your Understanding of This Lesson
Problem 1
What is the determinant of matrix
A?
(A) -7
(B) -28
(C) 7
(D) 28
(E) None of the above
Solution
The correct answer is (D), based on the matrix determinant algorithm shown below.
|A| = Σ ( + ) A1qA2rA3s . . . Anz
Because
A is a 2 x 2 matrix, we know that the determinant algorithm has
2! or 2 product terms. And each product term includes one element from each row and one element from each column. We list the product terms below, with the elements of each product term arranged in ascending order of the left-hand (or row-designating) subscript.
|A| = + A11A22 + A12A21
To determine whether each product term is preceded by a plus or minus sign, we count the inversions needed to put all of the column-designating subscripts in ascending order.
- The column-designating subscripts for the first term, A11A22, are already in ascending order; so the first term needs zero inversions. Since zero is an even number, the sign of the first term is positive.
- For the second term, A12a21, we must move the second element A21 one position to the left; that is, we need one inversion to put the column-designating subscripts in ascending order. Since one is an odd number, the sign of the second term is negative.
The formula for the determinant of a 2 x 2 matrix is thus:
|A| = + A11A22 - A12A21
So the determinant of matrix
A is:
|A| = ( 5 * 6 ) - ( 1 * 2 ) = 30 - 2 = 28
No comments:
Post a Comment