Uploaded by phamquocan24

Chap1 MatrixAlgebra

advertisement
CONTENTS
I. The concept of a matrix
---------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Example
I.
The concept of a matrix
II.
Elementary Row Operations
III.
Matrix Operations
IV.
A rank of matrix
V.
An Inverse of matrix
Solve the system:
= 0
x + y

2 x − y + 3z = 3
 x − 2y − z = 7

⇔
= 0
x + y

−
3
y
+
3
z
= 3

 − 3y − z = 7

⇔
= 0
x + y

 − 3 y + 3z = 3

− 4z = 4

Solution: x = 2; y = -2; z = -1
I. The concept of a matrix
----------------------------------------------------------------------------------
1 1 0 0 
 2 −1 3 3 


1 −2 −1 7 
⇔
1 1 0 0 
 0 −3 3 3 


0 −3 −1 7 
⇔
1 1 0 0 
 0 −3 3 3 


0 0 −4 4 
I. The concept of a matrix
---------------------------------------------------------------------------------------------------------------
Definition of a matrix
A mxn matrix is a rectangular table of numbers (real numbers or
complex numbers) containing a certain number m of rows and a
certain number n of columns.
Column j
A mxn matrix is denoted by
 a11 ... a1 j
 ⋮
⋮

A =  ai1 ... aij
 ⋮
⋮

am1 ... amj
a1n 
⋮ 

... ain 
⋮ 

... amn 
...
Row i
I. The concept of a matrix
I. The concept of a matrix
---------------------------------------------------------------------------------------------------------------
Example
 3 4 1
A=

 2 0 5 2×3
This is a 2x3 matrix. This is a real matrix.
This is a matrix of the orders 2 and 3
Elements of A: a11 = 3; a12 = 4; a13 = 1; a21 = 2; a22 = 0; a23 = 5
Example
--------------------------------------------------------If a matrix A has m rows and n columns, the size of the matrix
is denoted by m×n.
The matrix A has m rows and n columns may also be denoted
by A = (aij )
.
m× n
Definition of Zero matrix
A matrix whose all entries are zero is called a zero matrix,
(aij = 0 for all i and j).
 0 0 0
A=

 0 0 0
1 + i 2
A=

 3 − i i 2×2
I. The concept of a matrix.
---------------------------------------------------------------------------------------------------------------------------
The first nonzero element of a row from the left is called a
leading entry of this row.
Definition of Echelon form of a matrix:
1. All nonzero rows are above any rows of all zeros
2. Each leading entry of row is in a column to the right of
the leading entry of the row above it
I. The concept of a matrix.
---------------------------------------------------------------------------------------------------------------------------
Example
2

0
A=
0

0
− 2

0 7 2
6 
4 1 −2 5 

0 0 0
0  4×5
1 0
3
 2 1 1 − 2


B = 0 0 0 3 
0 0 0 5 


This is not an
echelon matrix
This is not an
echelon matrix
I. The concept of a matrix.
I. The concept of a matrix.
---------------------------------------------------------------------------------------------------------------------------
Example
1

0
A=
0

0
− 2

is an echelon
0 7 1
4  This
matrix
0 0 −2 5 

0 0 0
0  4×5
3 0
2
 1 2 0 − 2


B = 0 0 1 3 
0 0 0 7 


---------------------------------------------------------Definition of Transpose
A transpose of A = (aij )
is defined to be the nXm matrix
m×n
obtained by interchanging rows and columns in A.
AT = (aij )
n×m
Example
 2 −1 3
A=

 4 0 9  2×3
This is an echelon
matrix
I. The concept of a matrix
---------------------------------------------------------Definition of Square matrix
If the number of rows m of a matrix is equal to the number of
columns n of the matrix, then A is called a square matrix.
 2 − 1
A=

 3 2  2×2
The set of all square matrices of order n over the ring K is
denoted by Mn[K].
 2 4


A =  −1 0 
 3 9

3×2
T
I. The concept of a matrix
---------------------------------------------------------The entries a11, a22,…,ann are called the diagonal elements of a
square matrix.
Sometimes the diagonal of the matrix is also called the
principal or main diagonal of the matrix.
2 3
 3 4

 −2 1
 2 −1

1 −1 
0 5

3 7
6 8 
I. The concept of a matrix
---------------------------------------------------------Definition of Upper triangular matrix
A n×n matrix for which aij = 0, i > j is called an upper triangular
matrix. That is, all the elements below the diagonal entries are
zero.
 2 −1 3 


A = 0 3
6 
0 0 − 2


Definition of Lower triangular matrix
A n×n matrix for which aij = 0, j > i is called an lower triangular
matrix. That is, all the elements above the diagonal entries are
zero.
2 0 0 


A = 7 3 0 
1 5 − 2


I. The concept of a matrix
--------------------------------------------------------------Definition of Diagonal matrix
A square matrix with all non-diagonal elements equal to zero is
called a diagonal matrix, that is, only the diagonal entries of the
square matrix can be non-zero, (aij = 0, i ≠ j).
2 0 0 


D = 0 3 0 
 0 0 − 2


Definition of Identity matrix
A diagonal matrix with all diagonal elements equal to one is
called an identity matrix, (aij = 0, i ≠ j; and aii = 1 for all i).
 1 0 0


I =  0 1 0
0 0 1


I. The concept of a matrix
I. The concept of a matrix
---------------------------------------------------------------
---------------------------------------------------------------
Definition of Tridiagonal matrix
A tridiagonal matrix is a square matrix in which all elements not
on the major diagonal, the diagonal above the major diagonal and
the diagonal below the major diagonal are zero.
1 2 0 0 


3 −1 7 0 

A=
0 4 8 − 1


0 0 5 9 
Definition of Symmetric matrix
A square matrix A with real elements where aij = aji for i = 1,….n
and j =1,…,n is called a symmetric matrix. This is same as, if A
= AT, then A is a symmetric matrix.
 2 −1 3 


A =  −1 4 7 
 3 7 0


Definition of Skew-Symmetric matrix
A nxn matrix is skew symmetric for which aij = - aji for all i and j.
This is same as, if A = -AT, then A is a skew symmetric matrix.
 0 −1 3 
A =  1 0 7


 −3 −7 0 


II. Elementary row operations.
II. Elementary row operations.
----------------------------------------------------------------
------------------------------------------------------------------
Elementary row operations
1. (Scaling) Multiply all entries in a row by a nonzero constant
ri → α ri ;α ≠ 0
2. (Replacement) Replace one row by the sum of itself and
a multiple of another row ri → ri + β r j ; ∀β
3. (Interchange) Interchange two rows ri ↔ r j
Theorem
Every matrix is row equivalent to an echelon matrix
Remark
A matrix may be row reduced into more than one
matrix in echelon form.
Similarly, we have three elementary column operations.
II. Elementary row operations.
-------------------------------------------------------------
Example
Apply elementary row operations to
matrix into echelon form.
 1 1 −1 2
 2 3 −1 4

 3 2 −3 7
 −1 1 2 −3

transform the following
1
5

4
1 
Step1. Begin with the leftmost nonzero column. Select
a nonzero entry in the pivot column as a pivot.
1
2

3
 −1

1
5

2 −3 7 4 
1 2 −3 1 
1 −1
3 −1
2
4
II. Elementary row operations
------------------------------------------------------------------
Step2. Use row replacement operations to create zeros in all
positions below the pivot
1
2
A=
3
 −1

1
1 1
r2 →r2 − 2 r1
5  →
→

→ 0 1
r3 →r3 −3r1


r4 →r4 + r1
2 −3 7 4 
 0 −1
0 2
1 2 −3 1 

1 −1
3 −1
2
4
−1
1
0
1
1
3

1 1
−1 2 
2
0
Step3. Cover the row containing the pivot position and all rows, if
any, above it. Apply steps 1-2 to the sub matrix that remains
1
0
r3 →r3 + r2


→
r4 →r4 − 2 r2
0
0

 1 1 −1 2 1 
1 1 0 3

0 1 1 4
0 0 0 0 
1
0
r4 →r4 + r3
3  
→

0
0 1 1 4
0
0 −1 −1 −4 

1 −1
1 1
2
0
III. Matrix Operations
------------------------------------------------------------------Definition of Equality
Two matrices A and B are equal if the size of A and B is the
same (number of rows and columns are same for A and B) and
aij = bij for all i and j.
Definition of Addition
Same size
Sum A + B:
Sum of the corresponding entries
Example
 −1 2 4 
3 − 2 6
A=
; B = 

 3 0 5
1 4 7 
 2 0 10 
A+ B = 

 4 4 12 
III. Matrix Operations
---------------------------------------------------------------------------------------------------------------------------
Definition of Matrix Multiplication
A = (aij )m × p ; B = (bij ) p ×n
AB = C = (cij ) m×n
where cij = ai1b1 j + ai 2b2 j + ... + aip b pj
 b1j 



*
⋮
 

 * b2 j * 

AB = ai 1 ai 2 ... aip 
= ... cij ...


⋮

 

 
*
⋮
b

pj

III. Matrix Operations
-------------------------------------------------------------Definition of Multiplication of a Matrix by a number
If A is a m × n matrix and k is a real number, then the scalar
product of k and A is another matrix B, where bij = kaij.
Example
 −1 2 4
A=

 3 0 5
Properties:
a) A + B = B + A;
−2 4 8 
2× A = 

 6 0 10 
b) (A + B) + C = A + ( B + C);
c) A + 0 = A;
d) k(A + B) = kA + kB;
e) k (mA) = (km) A;
f) (k + m)A = kA + mA;
III. Matrix Operations
Example-------------------------------------------------- 1 − 2 2


 2 −1 4 
A=
; B =  3 0 1 
4
1
0


 2 4 3


Calculate AB
 1 −2 2 
 c7 cc12 cc13 
 2 −1 4  
A ×B =
× 3 0 1  =  11 12 13 


c 22 cc23
 4 1 0  
21 c22
23 
 cc21
2 4 3
1
c11 = ( 2 −1 4 )  3  = 2 × 1 + (−1) × 3 + 4 × 2 = 7
 
2
 
III. Matrix Operations
III. Matrix Operations
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
Example
Properties of Matrix Multiplication
 2 −1 
1
A=
;B =  

4 1 
 3
Find all X, such that AX = B.
The size of X is 2x1.
a. A(BC) = (AB)C;
b. A(B + C) = AB + AC;
c. (B + C)A = BA + CA;
d. ImA = A = AIm
e. k (AB) = (kA)B = A(kB).
a
Let X =  
b 
 2a − b   1 
 2 −1  a   1 
AX=B ⇔ 
=  ⇔
= 


 4a + b   3 
 4 1  b   3 
Warnings:
1. In general AB ≠ BA
2. AB = AC
 2a − b = 1
2
1
2 / 3
⇔
⇔ a = ,b = Thus X = 

4
a
+
b
=
3
3
3

 1/ 3 
III. Matrix Operations
----------------------------------------------------------
A3 = A ⋅A ⋅A
AB = 0
A = 0∨ B = 0
III. Matrix Operations
---------------------------------------------------------------------------------------------------------------
Example
Definition of Power of matrix.
A0 =I
3.
B=C
A 2 = A ⋅A
A n = A ⋅ A ⋯A ⋅ A
n
f ( x) = an x n + an −1 x n −1 + ... + a1 x + a0 ; A = (aij ) n×n
f (A ) = an A n + an −1A n −1 + ... + a1A + a0 I .
 2 −1
2
Let A = 
 and f ( x) = 2 x − 4 x + 3. Find f(A).
3 4 
f (A ) = 2 A 2 − 4A + 3I
 2 −1 2 −1  2 −1  1 0 
f (A ) = 2 

 − 4
 + 3

 3 4  3 4   3 4   0 1 
 1 −6   8 −4   3 0 
f (A ) = 2 
−
+

 18 13   12 16   0 3 
 −3 −8 
f (A ) = 

 24 13 
III. Matrix Operations
III. Matrix Operations
---------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------
Example
Example
 1 3
A=
.
 0 1
2 3
A=
.
0 2
Calculate A2; A3, A200
 2 3
 1 3/ 2 
1 a
A =
= 2⋅
= 2



 0 2
0 1 
 0 1
 1 3  1 3   1 6 
A 2 = A ⋅A = 

 =

 0 1  0 1   0 1 
 1 6  1 3   1 9 
A3 = A 2 ⋅A = 


 =
 0 1  0 1   0 1 
A
200
n
 1 a   1 na 
We have : 
 =

 0 1  0 1 
 2200
A 200 = 
 0

 1 200 × 3 
=
1 
0
III. Matrix Operations
---------------------------------------------------------------------------------------------------------------
3 2
A=
.
2 3
Example
Example
1 1
A=
.
1 1
Calculate A200
Compute A200
 1 1  1 0 
A = 2
+
 = 2B + I
 1 1  0 1 
Find A200
 1 1  1 1   2 2 
 1 1
A2 =
=
= 2



 = 2A
 1 1  1 1   2 2 
 1 1
300 ⋅ 2200 

2200 
B n = 2n−1 B
The two matrices B and I are communicative, so we have
0
200 200
I
( 2B + I )200 = C200
( 2B )200 + C1200 ( 2B )199 + ... + C200
It follows that: A n = 2 n −1 A
0
1
200 200
= C200
2200.2200−1 B + C200
2199.2199−1 B + ... + C200
I
 2199
A 200 = 
 2199

2199 

2199 
=
B 0 200
200
C200 4 + C1200 4199 + ... + C199
200 .4 + C200 I
2
B
200
= ( 4 + 1) − 1 . + I
2
(
)
(
)
III. Matrix Operations
IV. A Rank of a matrix
----------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Properties of the Transpose
If A and B are two matrices of the same shape, and if α is a
scalar, then each of the following statements are true.
T
T
T
( A + B) = A + B
(αA)T = αAT
( AB)T = BT AT
IV. A Rank of a matrix
----------------------------------------------------------------Example
Determine the rank of the matrix
1 2 1 1
A =  2 4 2 2


 3 6 3 4


Solution.
1 2 1 1
1 2 1 1
r2 →r2 − 2r1


0 0 0 0
A = 2 4 2 2 →

 r3 →r3 −3r1 

 3 6 3 4
0 0 0 1




1 2 1 1
h2 ↔ h3
0 0 0 1
→

  r (A ) = 2
 0 0 0 0


Definition of a Rank of a matrix
Suppose Amxn is reduced by row operations to an echelon
form E. The rank of A is defined to be the number
rank (A) = number of nonzero rows in E
IV. A Rank of a matrix
-----------------------------------------------------------------------------------------------------
Example
Determine all value(s) m such that r(A) =3, where
2 
1 1 1

A= 2 3 4
1 


 3 2 m m + 1


2  1 1
1
2 
1 1 1
A = 2 3 4
1  → 0 1
2
−3 

 

 3 2 m m + 1  0 −1 m − 3 m − 5 

 

1
2 
1 1
→ 0 1
2
−3 


 0 0 m −1 m − 8 


Thus r(A) = 3 for all m.
IV. A Rank of a matrix
V. An Inverse of a matrix
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Definition of an Inverse of a matrix
Properties of a Rank of a matrix
The inverse of a square matrix A, if existing, denoted by A-1,
such that
AA-1 = I =A-1A
Example
1. rank (A) = 0
A=0
Find an inverse A-1, where
2. A = (aij)m n
x
3. If A
Row operations
rank (A) ≤ min{m, n}
B, then rank (B) = rank (A)
 2 1
A=

 5 3 2×2
 3 −1
Let B = 

 −5 2 2×2
 2 1  3 −1  1 0 
AB = 

=
=I
 5 3  −5 2   0 1 
 3 −1 2 1   1 0 
BA = 

=
=I
 −5 2  5 3   0 1 
}
 3 −1
A−1 = B = 

 −5 2 
V. An Inverse of a matrix
V. An Inverse of a matrix
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Remark
Not all square matrices are invertible. There are many nonzero
matrices that are not invertible.
Existence of an Inverse
For an nxn matrix A, the following statements are equivalent
1. A-1 exists (A is nonsingular)
Definition
An invertible matrix is said to be nonsingular, and a square
matrix with no inverse is called a singular matrix.
2. Rank (A) = n
3. AX = 0 implies that X = 0.
4. A
Row operations
I
V. An Inverse of a matrix
-----------------------------------------------------------------------------------------------------
Definition of an elementary matrix
A matrix formed from I using only one row (or column)
operation is called an elementary matrix.
Example
1 0 0
1 0 0
r →3r


I = 0 1 0 → E1 =  0 1 0 




0 0 1
0 0 3




3
3
1 0 0
1 0 0
r →r + 2 r


I = 0 1 0 → E2 =  2 1 0 




0 0 1




0 0 1
2
2
1
V. An Inverse of a matrix
-----------------------------------------------------------------------------------------------------
1 0 0
0 0 1
r ↔r



I = 0 1 0 
→ E3 = 0 1 0 




0 0 1
1 0 0




3
1
Applying one elementary row operation to the matrix A is
equivalent to multiply the matrix A by an elementary matrix to
the left.
Applying one elementary column operation to the matrix A
is equivalent to multiply the matrix A by an elementary
matrix to the right.
V. An Inverse of a matrix
V. An Inverse of a matrix
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
 2 1 −1
3 2 1 
r ↔r


A = 1 1 0 
→B = 1 1 0 




3 2 1 
 2 1 −1




3
1
B = E3 A
 3 2 1   0 0 1  2 1 −1
 1 1 0  =  0 1 0  1 1 0 

 


 2 1 −1  1 0 0  3 2 1 

 


row operations
A →
I ⇔ I = En En −1...E1 A
 A−1 = En En−1...E1I
above row operations
⇔ I 
→ A−1
V. An Inverse of a matrix
V. An Inverse of a matrix
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Computing an Inverse
[ A|I ]
[ I|A-1 ]
Row operations
Example
If possible, find the inverse of
1 1 1 


A = 1 2 2 
1 2 3 


1 1 1 1 0 0 
1 1 1 1 0 0 
r →r − r


→  0 1 1 −1 1 0 
[ A | I ] = 1 2 2 0 1 0 
r
→
r
−
r




1 2 3 0 0 1 
0 1 2 −1 0 1 
2
2
1
3
3
1
1 1 1 1 0 0 
1 1 0 1 1 −1


r →r − r


→ 0 1 1 −1 1 0 

 r →r −r → 0 1 0 −1 2 −1
0 0 1 0 −1 1 
0 0 1 0 −1 1 
1
1
3
2
2
3
 1 0 0 2 −1 0 

→ 0 1 0 −1 2 −1 = [ I | A−1 ]


0 0 1 0 −1 1 
r1 →r1 − r2
 2 −1 0 
Thus A =  −1 2 −1


 0 −1 1 


−1
V. An Inverse of a matrix
V. An Inverse of a matrix
----------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Example
Operation Counts for Inversion
−1
Computing An×n by reducing [ A|I ] with row operations
requires
Determine all value(s)
invertible
1
A = 2

3

m such that the following matrix is
2
1 m

2 1 
1
n3 multiplications/divisions
n3 – 2n2 + n additions/subtractions
Properties of Matrix Inversion
For nonsingular matrices A and B, the following properties hold.
Solution
A is invertible if and only if r(A) = the size of A = 3.
⇔ m ≠ −1.
(A-1)-1 = A
The product AB is also nonsingular
(AB)-1 = B-1A-1
(AT)-1 = (A-1)T
VI. A Conclusion
------------------------------------------------------------------------------
What is a matrix? Square matrix ? Diagonal matrix
Zero matrix? Triangular matrix? Transpose of a matrix?
An Identity matrix? An echelon form of a matrix?
Matrix Operations:Equality Addition Multiplication by a number
Multiplication of two matrices Elementary row (column) operation
What is a rank of a matrix?
How do we calculate a rank of given matrix?
What is an Inverse of a matrix?
How do we calculate an inverse of given matrix?
Download