0% found this document useful (0 votes)
79 views93 pages

Chapter 2. Linear Algebra

Chapter 2 covers the fundamentals of linear algebra, focusing on matrices, their properties, and operations. It explains the definitions of matrices, including square and zero matrices, and introduces matrix operations such as addition, subtraction, and multiplication. The chapter also discusses types of matrices, including identity, upper triangular, and lower triangular matrices.

Uploaded by

yodahekahsay19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views93 pages

Chapter 2. Linear Algebra

Chapter 2 covers the fundamentals of linear algebra, focusing on matrices, their properties, and operations. It explains the definitions of matrices, including square and zero matrices, and introduces matrix operations such as addition, subtraction, and multiplication. The chapter also discusses types of matrices, including identity, upper triangular, and lower triangular matrices.

Uploaded by

yodahekahsay19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 93

Chapter 2.

Linear Algebra

1
2.1.1. Matrices
 1 3 1
 2 3 7
A=   B =  2 1 4 
 1 − 1 5  4 7 6 

Both A and B are examples of matrix. A matrix is a


rectangular array of numbers enclosed by a pair of
bracket.

Why matrix?

2
2.1.1. Matrices
Consider the following set of equations:
 x + y = 7, It is easy to show that x = 3 and y = 4.

 3x − y = 5.
 x + y − 2 z = 7,
 2 x − y − 4 z = 2,

How about solving 
−5 x + 4 y + 10 z = 1,
 3x − y − 6 z = 5.

Matrices can help…


3
2.1.1. Matrices
 a11 a12 K a1n 
In the matrix a a22 a2 n 
A =  21
 M O 
 
 am1 am 2 amn 

numbers aij are called elements. First subscript


indicates the row; second subscript indicates the
column. The matrix consists of mn elements
It is called “the m × n matrix A = [aij]” or simply “the
matrix A ” if number of rows and columns are
understood.
4
2.1.1. Matrices
Square matrices

 a11 a12 K a1n 


When m = n, i.e., a a22 a2 n 
A =  21
 M O 
 
 an1 an 2 ann 
A is called a “square matrix of order n” or “n-
square matrix”
elements a11, a22, a33,…, ann called diagonal
elements.
n

 ∑
i =1
aii = a11 + a22 + ... + ann
is called the trace of A.
5
2.1.1. Matrices
Equal matrices

Two matrices A = [aij] and B = [bij] are said to be


equal (A = B) iff each element of A is equal to the
corresponding element of B, i.e., aij = bij for 1 ≤ i ≤
m, 1 ≤ j ≤ n.
iff pronouns “if and only if”
if A = B, it implies aij = bij for 1 ≤ i ≤ m, 1 ≤ j ≤ n;
if aij = bij for 1 ≤ i ≤ m, 1 ≤ j ≤ n, it implies A = B.
6
2.1.1. Matrices
Equal matrices

 1 0 a b 
Example: A= and
 B= 
 −4 2   c d 
Given that A = B, find a, b, c and d.

if A = B, then a = 1, b = 0, c = -4 and d = 2.

7
2.1.1. Matrices
Zero matrices

Every element of a matrix is zero, it is called a zero


matrix, i.e.,
0 0 K 0 
0 0 0 
A= 
M O 
 
 0 0 0 

8
2.1.2. Operations of matrices
Sums of matrices

If A = [aij] and B = [bij] are m × n matrices, then A +


B is defined as a matrix C = A + B, where C= [cij], cij
= aij + bij for 1 ≤ i ≤ m, 1 ≤ j ≤ n.
1 2 3   2 3 0
Example: if A= and
 B= 
 0 1 4   − 1 2 5 
Evaluate A + B and A – B.
 1+ 2 2 + 3 3 + 0   3 5 3
A+ B =   = 
 0 + ( −1) 1 + 2 4 + 5   −1 3 9 
 1− 2 2 − 3 3 − 0   −1 −1 3 
A− B =   = 
 0 − ( − 1) 1 − 2 4 − 5   1 −1 −1 9
2.1.2. Operations of matrices
Sums of matrices

Two matrices of the same order are said to be


conformable for addition or subtraction.
Two matrices of different orders cannot be added or
subtracted, e.g.,
1 3 1 
2 3 7 2 1 4
1 −1 5   
 
 4 7 6 

are NOT conformable for addition or subtraction.


10
2.1.2. Operations of matrices
Scalar multiplication

Let λ be any scalar and A = [aij] is an m × n matrix.


Then λA = [λaij] for 1 ≤ i ≤ m, 1 ≤ j ≤ n, i.e., each
element in A is multiplied by λ.
1 2 3 
Example: A = 0 1 4 . Evaluate 3A.
 
 3 × 1 3 × 2 3 × 3 3 6 9 
3A =   = 
 3 × 0 3 × 1 3 × 4   0 3 12 

In particular, λ = −1, i.e., −A = [−aij]. It’s called the


negative of A. Note: Α − A = 0 is a zero matrix
11
2.1.2. Operations of matrices
Properties

Matrices A, B and C are conformable,


A + B = B + A (commutative law)
A + (B +C) = (A + B) +C (associative law)
λ(A + B) = λA + λB, where λ is a scalar
(distributive law)

Can you prove them?

12
2.1.2. Operations of matrices
Properties

Example: Prove λ(A + B) = λA + λB.

Let C = A + B, so cij = aij + bij.

Consider λcij = λ (aij + bij ) = λaij + λbij, we have, λC


= λA + λB.
Since λC = λ(A + B), so λ(A + B) = λA + λB

13
2.1.2. Operations of matrices
Matrix multiplication

If A = [aij] is a m × p matrix and B = [bij] is a p ×


n matrix, then AB is defined as a m × n matrix C =
AB, where
p C= [cij] with
cij = ∑ aik bkj = ai1b1 j + ai 2b2 j + ... + aip bpj for 1 ≤ i ≤ m, 1 ≤ j ≤
k =1
 −1n. 2 
1 2 3   2 3
Example: A = 0 1 4  , B = and C = AB.
   
Evaluate c21.  5 0 
 −1 2 
1 2 3   
0 1 4   2 3  c21 = 0 × (−1) + 1× 2 + 4 × 5 = 22
 
 5 0  14
2.1.2. Operations of matrices
Matrix multiplication
 −1 2 
1 2 3 
A= B =  2 3 
Example: 0 1 4 , , Evaluate C = AB.
   5 0 

 c11 = 1 × ( −1) + 2 × 2 + 3 × 5 = 18
 −1 2   c = 1× 2 + 2 × 3 + 3 × 0 = 8
1 2 3    ⇒  12
0 1 4  2 3  
   c21 = 0 × ( −1) + 1 × 2 + 4 × 5 = 22
 5 0   c22 = 0 × 2 + 1 × 3 + 4 × 0 = 3

 −1 2 
1 2 3    18 8
C = AB =    2 3 =  
 0 1 4   22 3 
 5 0 
 15
2.1.2. Operations of matrices
Matrix multiplication

In particular, A is a 1 × m matrix and B is


a m × 1 matrix, i.e.,  b11 
b 
A = [ a11 a12 ... a1m ] B =  21 
 M
 
bm1 
m
then C = AB is a scalar. C = ∑ a1k bk1 = a11b11 + a12b21 + ... + a1mbm1
k =1

16
2.1.2. Operations of matrices
Matrix multiplication

BUT BA is a m × m matrix!
 b11   b11a11 b11a12 K b11a1m 
b  b a b a b a 
BA =  21  [ a11 a12 ... a1m ] =  21 11 21 12 21 1m 

 M  M O 
   
b
 m1  b a b
 m1 11 m1 12a b a
m1 1m 

So AB ≠ BA in general !

17
2.1.2. Operations of matrices
Properties

Matrices A, B and C are conformable,


A(B + C) = AB + AC
(A + B)C = AC + BC
A(BC) = (AB) C
AB ≠ BA in general
AB = 0 NOT necessarily imply A = 0 or B = 0
AB = AC NOT necessarily imply B = C
H

18
2.1.2. Operations of matrices
Properties

Example: Prove A(B + C) = AB + AC where A, B and


C are n-square matrices
Let X = B + C, so xij = bij + cij. Let Y = AX, then
n n
yij = ∑ aik xkj = ∑ aik (bkj + ckj )
k =1 k =1
n n n
= ∑ ( aik bkj + aik ckj ) = ∑ aik bkj + ∑ aik ckj
k =1 k =1 k =1

So Y = AB + AC; therefore, A(B + C) = AB + AC


19
2.1.3. Types of matrices
Identity matrix
The inverse of a matrix
The transpose of a matrix
Symmetric matrix
Orthogonal matrix

20
2.1.3. Types of matrices
Identity matrix

A square matrix whose elements aij = 0, for i > j is


called upper triangular, i.e.,  a11 a12 K a1n 
0 a22 a2 n 

 M O 
 
0 0 ann 

A square matrix whose elements aij = 0, for i < j is


called lower triangular, i.e.,  a11 0 K 0 
a a22 0 
 21
 M O 
 
 an1 an 2 ann 

21
2.1.3. Types of matrices
Identity matrix

Both upper and lower triangular, i.e., aij = 0, for i ≠ j ,


i.e.,  a11 0 K 0 
0 a22 0 
D=
 M O 
 
0 0 ann 

is called a diagonal matrix, simply


D = diag[a11 , a22 ,..., ann ]

22
2.1.3. Types of matrices
Identity matrix

In particular, a11 = a22 = … = ann = 1, the matrix is


called identity matrix.
Properties: AI = IA = A
1 0 0 
1 0  0 1 0
Examples of identity matrices: 0 1  and  
  0 0 1 

23
2.1.3. Types of matrices
Special square matrix

AB  BA in general. However, if two square


matrices A and B such that AB = BA, then A and B
are said to be commute.

Can you suggest two matrices that must commute with


a square matrix A?
Ans: A itself, the identity matrix, ..

If A and B such that AB = -BA, then A and B are


said to be anti-commute.
24
2.1.3. Types of matrices
The inverse of a matrix

If matrices A and B such that AB = BA = I, then B is


called the inverse of A (symbol: A-1); and A is called
the inverse of B (symbol: B-1).
1 2 3   6 −2 −3
Example: A = 1 3 3  B =  −1 1 0 
1 2 4   −1 0 1 

Show B is the the inverse of matrix A.


1 0 0 
Ans: Note that AB = BA = 0 1 0 
Can you show the 0 0 1 
details? 25
2.1.3. Types of matrices
The transpose of a matrix

The matrix obtained by interchanging the rows and


columns of a matrix A is called the transpose of A
(write AT).
1 2 3
Example: A= 
 4 5 6  1 4
The transpose of A is AT =  2 5 
 3 6 

For a matrix A = [aij], its transpose AT = [bij], where


bij = aji.

26
2.1.3. Types of matrices
Symmetric matrix

A matrix A such that AT = A is called symmetric, i.e.,


aji = aij for all i and j.
A + AT must be symmetric. Why?
1 2 3 
Example: A =  2 4 −is5 symmetric.
 3 −5 6 

A matrix A such that AT = -A is called skew-


symmetric, i.e., aji = -aij for all i and j.
A - AT must be skew-symmetric. Why?
27
2.1.3. Types of matrices
Orthogonal matrix

A matrix A is called orthogonal if AAT = ATA = I, i.e.,


AT = A-1
1/ 3 1/ 6 −1/ 2 
 
Example: prove that A = 1/ 3 −2 / 6 0 is
 
orthogonal. 1/ 3 1/ 6 1/ 2 

 1/ 3 1/ 3 1/ 3 
 
Since, A =  1/ 6
T
. 6
−2 / 6 1/ Hence, AAT = ATA = I.
 
 −1/ 2 0 1/ 2 
Can you show the
details?
We’ll see that orthogonal matrix represents a rotation in
fact! 28
2.1.4. Properties of matrix

(AB)-1 = B-1A-1
(AT)T = A and (λA)T = λ AT
(A + B)T = AT + BT
(AB)T = BT AT

29
2.1.4. Properties of matrix
Example: Prove (AB)-1 = B-1A-1.

Since (AB) (B-1A-1) = A(B B-1)A-1 = I and


(B-1A-1) (AB) = B-1(A-1 A)B = I.
Therefore, B-1A-1 is the inverse of matrix AB.

30
2.1.5. Determinants
When we look at a particular square matrix, the
question of whether it is nonsingular is one of the
first things that we ask. This section develops a
formula to determine this.

3 - 31
The Determinant of a Matrix
The determinant of a 2 × 2 matrix:
 a11 a12 
A=  
a a
 21 22 
⇒ det( A) = | A | = a11a22 − a21a12

Note:  a11 a12  a11 a12
a  ≡
 21 a22  a21 a22

2 −3
= 2( 2) − 1( −3) = 4 + 3 = 7
1 2

3 - 32

Minor of the entry aij :
a11 a12 L a1( j −1) a1( j +1) L a1n
M M M
a( i −1)1 L a( i −1)( j −1) a( i −1)( j +1) L a( i −1) n
M ij = aij
a( i +1)1 L a( i +1)( j −1) a( i +1)( j +1) L a( i +1) n
M M M M
a n1 L an( j −1) an( j +1) L ann

• Cofactor ofaij :
C ij = ( −1)i + j M ij

3 - 33
Example:
 a11 a12 a13   a11 a12 a13 
A = a21 a22 a23  A = a21 a22 a23 
   
a31 a32 a33  a31 a32 a33 
a12 a13 a11 a13
⇒ M 21 = M 22 =
a32 a33 a31 a33

⇒ C21 = ( −1) 2+1 M 21 = − M 21 C22 = ( −1) 2+2 M 22 = M 22

+ − + − + L 
− + − + − L 

Notes: Sign pattern for cofactors  
+ − + − + L 
 
− + − + − L 
+ − + − + L 
 
M M M M M 
3 - 34
Expansion by cofactors
Let A is a square matrix of order n, then the determinant of A is
given by
n
( a ) det( A) =| A |= ∑ aij C ij = ai 1C i 1 + ai 2C i 2 + L + ainC in
j =1

(Cofactor expansion along the i-th row,


row i=1, 2,…, n )
or
n
(b ) det( A) =| A |= ∑ aij C ij = a1 j C1 j + a2 j C 2 j + L + a nj C nj
i =1

(Cofactor expansion along the j-th column,


column j=1, 2,…,
n)
3 - 35
• Example: The determinant of a matrix of order 3
 a11 a12 a13 
A = a21 a22 a23 
 
a31 a32 a33 

⇒ det( A) = a11C11 + a12C12 + a13C13


= a21C21 + a22C22 + a23C23
= a31C31 + a32C32 + a33C33
= a11C11 + a21C21 + a31C31
= a12C12 + a22C22 + a32C32
= a13C13 + a23C23 + a33C33

3 - 36
Example: (The determinant of a matrix of order
3)
0 2 1 
A = 3 − 1 2 ⇒ det( A) = ?
4 − 4 1 
Sol:
1+ 1 −1 2 3 2
C11 = ( −1) =7 1+ 2
C12 = ( −1) = −(3 − 8) = 5
−4 1 4 1

1+ 3 3 −1
C13 = ( −1) = −12 + 4 = −8
4 −4

⇒ det( A) = a11C11 + a12C12 + a13C13


= (0)(7) + (2)(5) + (1)( −8) = 2
3 - 37
• The determinant of a matrix of order 3:
 a11 a12 a13 
A =  a21 a22 a23 
 a31 a32 a33 
⇒ det( A) =| A |= a11a22 a33 + a12 a23a31 + a13a21a32 − a31a22 a13
− a32 a 23 a11 − a33a21a12

–4 0 6

Ex : 0 2 1  0 2
A =  3 − 1 2 3 − 1
 
4 − 4 1 4 − 4
0 16 –12
⇒ det( A) =| A |= 0 + 16 − 12 − (−4) − 0 − 6 = 2
3 - 38
Upper triangular matrix:
All the entries below the main diagonal are zeros.

Lower triangular matrix:
All the entries above the main diagonal are zeros.

Diagonal matrix:
All the entries above and below the main diagonal are zeros.

a11 a12 a13   a11 0 0  a11 0 0 


 0 a22 a23  a21 a22 0   0 a22 0 
0 0 a  a a a  0 0 a 
 33   31 32 33   33 

upper triangular lower triangular diagonal

3 - 39
Determinant of a Triangular Matrix
If A is an nxn triangular matrix (upper triangular, lower
triangular, or diagonal), then its determinant is the
product of the entries on the main diagonal. That is
det( A) =| A |= a11a22a33 L ann

At this moment, our primary way to decide whether a matrix is


singular is to do Gaussian reduction and then check whether
the diagonal of resulting echelon form matrix has any zeroes.

We will look for a family of functions with the property of


being unaffected by row operations and with the property that
a determinant of an echelon form matrix is the product of its
diagonal entries. 3 - 40

Ex: Find the determinants of the following triangular matrices
− 1 0 0 0 0
2 0 0 0  0 3 0 0 0
 4 −2 0 0 
(a) A =   (b) B =  0 0 2 0 0
− 5 6 1 0  
1  0 0 0 4 0
 5 3 3  0 0 0 0 − 2
Sol:

(a) |A| = (2)(–2)(1)(3) = –12

(b) |B| = (–1)(3)(2)(4)(–2) = 48

3 - 41
Evaluation of a determinant using elementary operations

• Elementary row operations and determinants


Let A and B be square matrices,
(a ) B = Pij ( A) ⇒ det( B ) = − det( A)
(b ) B = M i ( k )( A) ⇒ det( B ) = k det( A)
(c ) B = C ij ( k )( A) ⇒ det( B ) = det( A)

3 - 42

Ex:
1 2 3
A = 0 1 4 det( A) = −2
 
1 2 1
4 8 12 0 1 4  1 2 3
A1 = 0 1 4  A2 = 1 2 3 A3 = − 2 − 3 − 2
1 2 1  1 2 1   1 2 1 

A1 = M 1 (4)( A) ⇒ det( A1) = 4det( A) = (4)( −2) = −8

A2 = P12 ( A) ⇒ det( A2 ) = − det( A) = −( −2) = 2

A3 = C12 ( −2)( A) ⇒ det( A3) = det( A) = −2


3 - 43
Note:
A row-echelon form of a square matrix is always upper triangular.


Ex: Evaluation of a determinant using elementary row operations

2 − 3 10 
A = 1 2 − 2 ⇒ det( A) = ?
0 1 − 3

Sol:
2 −3 10 1 2 −2
ρ12
det( A) = 1 2 −2  → − 2 −3 10
0 1 −3 0 1 −3
3 - 44
1 2 −2 1
1 2 −2
−2 ρ1 + ρ 2 − ρ2 1
 → − 0 −7 14 
7
→ ( − 1)( −1 ) 0 1 −2
0 1 −3 7
0 1 −3
1 2 −2
− ρ2 + ρ3
→ 7 0 1 −2 = (7)(1)(1)( −1) = −7
0 0 −1

3 - 45
• Conditions that yield a zero determinant
If A is a square matrix and any of the following conditions is true,
then det (A) = 0.
(a) An entire row (or an entire column) consists of zeros.
(b) Two rows (or two columns) are equal.
(c) One row (or column) is a multiple of another row (or
column).
The theorem states that : a matrix with two identical rows or two linear dependent
rows has a determinant of zero. A matrix with a zero row has a determinant of zero.
Note that a matrix is nonsingular if and only if its determinant is nonzero and the
determinant of an echelon form matrix is the product down its diagonal.

This theorem provides a way to compute the value of a determinant function on a


matrix: Do Gaussian reduction, keeping track of any changes of sign caused by row
swaps and any scalars that are factored out, and then finish by multiplying down the
diagonal of the echelon form result.
result
3 - 46

Note:

Cofactor Expansion Row Reduction

Order n Additions Multiplications Additions Multiplications

3 5 9 5 10

5 119 205 30 45

10 3,628,799 6,235,300 285 339

3 - 47
• Ex: (Evaluating a determinant)
 2 0 1 3 −2 
 −2 1 3 2 −1

A =  1 0 −1 2 3
 
 3 −1 2 4 −3 
 1 1 3 2 0 
Sol:
2 0 1 3 −2 2 0 1 3 −2
−2 1 3 2 −1 −2 1 3 2 −1
det( A) = 1 0 −1 2 3 = 1 0 −1 2 3
ρ 2 + ρ4
3 − 1 2 4 − 3 − ρ 2 + ρ 5 1 0 5 6 −4
1 1 3 2 0 3 0 0 0 1
2 1 3 −2
1 −1 2 3
= (1)( − 1)2+ 2
1 5 6 −4
3 0 0 1
3 - 48
8 1 3 −2
8 1 3 0 0 5
−3 ρ 4 + ρ 1 −8 − 1 2 3
= = (1)( − 1)4+ 4 − 8 −1 2 = −8 − 1 2
13 5 6 −4 ρ 2 + ρ1
13 5 6 13 5 6
0 0 0 1
−8 −1
= 5( − 1)1+ 3
13 5
= (5)( −40 + 13) = (5)( −27)
= −135

3 - 49
Properties of Determinants
Determinant of a matrix product

det (AB) = det (A) det (B)

• Notes:

(1) det (EA) = det (E) det (A)

(2) det( A + B ) ≠ det( A) + det( B ), but


a11 a12 a13 a11 a12 a13
(3) a11 a12 a13
= a21 a22 a23 + b21 b22 b23
a21 + b21 a22 + b22 a23 + b23
a31 a32 a33 a31 a32 a33
a31 a32 a33

3 - 50

Ex: (The determinant of a matrix product)

1 − 2 2  2 0 1 
A = 0 3 2 B = 0 − 1 − 2
1 0 1  3 1 − 2

Find |A|, |B|, and |AB|


Sol:

1 −2 2 2 0 1
| A |= 0 3 2 = −7 | B |= 0 − 1 − 2 = 11
1 0 1 3 1 −2

3 - 51
1 − 2 2   2 0 1  8 4 1 
AB = 0 3 2 0 − 1 − 2 = 6 − 1 − 10
1 0 1 3 1 − 2 5 1 − 1 

8 4 1
⇒| AB |= 6 − 1 − 10 = −77 =| A || B |
5 1 −1

3 - 52
Determinant of a scalar multiple of a matrix

If A is an n × n matrix and c is a scalar, then


det (cA) = cn det (A)
• Ex:
 10 − 20 40 1 −2 4
A =  30 0 50 , 3 0 5 =5
 
− 20 − 30 10  −2 −3 1
Find |
Sol: A|.
 1 − 2 4 1 −2 4

A = 10 3 0 5  ⇒ A = 10 3
3 0 5 = (1000)(5) = 5000
 
 − 2 − 3 1 −2 −3 1
3 - 53
 Determinant of an invertible matrix
A square matrix A is invertible (nonsingular) if and only if
det (A) ≠ 0
• Ex: (Classifying square matrices as singular or nonsingular)
0 2 − 1 0 2 − 1
A = 3 − 2 1  B = 3 − 2 1 
3 2 − 1 3 2 1 
Sol:
A =0 ⇒ A has no inverse (it is singular).

B = −12 ≠ 0 ⇒ B has inverse (it is nonsingular).

3 - 54
Determinant of an inverse matrix

1
If A is invertible,then det(A −1 ) = .
det(A )
 Determinant of a transpose
If A is a square matrix, then det( AT ) = det( A).

• Ex:
1 0 3 −1
(a) A = ? (b) AT = ?
A = 0 − 1 2
2 1 0
Sol:
1 0 3 1 1
∴ A−1 = =
Q | A |= 0 −1 2 = 4 A 4
2 1 0 AT = A = 4
3 - 55
 Equivalent conditions for a nonsingular matrix:
matrix

If A is an n × n matrix, then the following statements are equivalent.

(1) A is invertible.

(2) Ax = b has a unique solution for every n × 1 matrix b.

(3) Ax = 0 has only the trivial solution of zero column vector.

(4) A is row-equivalent to In

(5) A can be written as the product of elementary matrices.

(6) det (A) ≠ 0

3 - 56
• Ex: Which of the following system has a unique
solution?
(a) 2 x2 − x3 = −1
3x1 − 2 x2 + x3 = 4
3x1 + 2 x2 − x3 = −4

Sol: 0 2 −1
Ax = b Q A = 3 −2 1 = 0
3 2 −1

∴ This system does not have a unique solution.

3 - 57
(b) 2 x2 − x3 = −1
3 x1 − 2 x2 + x3 = 4
3 x1 + 2 x2 + x3 = −4

Sol:
Bx = b

Q B = −12 ≠ 0

∴ This system has a unique solution.

3 - 58
Applications of Determinants

Matrix of cofactors of A:
 C11 C12 L C1n 
C C L C 
[ ]  M M
C ij =  21 22 2n 

M
Note Cij = (−1)i + j Mij
 
C n1 C n 2 L C nn 


Adjoint matrix of A:
 C11 C 21 L C n1 
C C 22 L C n 2 
adj ( A) = [ Cij ] 
T
= 12

 M M M
 
 C1 n C 2 n L C nn 

3 - 59
The inverse of a matrix given by its adjoint
If A is an n × n invertible matrix, then
−1 1
A = adj ( A)
det( A)

Ex:
a b   d − c  d − b
A=  CA =   adj ( A) =  
 c d   − b a   − c a 
⇒ det( A) = ad − bc
1
−1 1  d − b
⇒A = adj ( A) =
det ( A) ad − bc  − c a 

3 - 60
• Ex:
− 1 3 2 (a) Find the adjoint of A.
A =  0 − 2 1 
 1 0 − 2 (b) Use the adjoint of A to find A−1
i+ j
Sol: Q C ij = ( −1) M ij
−2 1 0 1 0 −2
⇒ C11 = + = 4, C12 = − = 1, C13 = + =2
0 −2 1 −2 1 0
3 2 −1 2 −1 3
C21 = − = 6, C22 = + = 0, C23 = − =3
0 2 1 2 1 0

3 2 −1 2 −1 3
C31 = + = 7, C 32 = − = 1, C33 = + =2
−2 1 0 1 0 −2
3 - 61
⇒ cofactor matrix of A ⇒ adjoint matrix of A

4 1 2 4 6 7
C ij  =  6 0 3  adj ( A) = C ij  =  1 0 1 
T

 
 7 1 2   2 3 2 

⇒ inverse matrix of A
Q det ( A ) = 3
−1 1
A = adj ( A)
det ( A )
 43 2 7
3  4 6 7
=  13 0 1
= 13 1 0 1
 3
  
 23 1 3
2
 2 3 2


Check: AA−1 = I
3 - 62
• Cramer’s Rule
a11 x1 + a12 x2 + L + a1n xn = b1

a21 x1 + a22 x2 + L + a2 n xn = b2
M
an1 x1 + an 2 x2 + L + ann xn = bn  x1   b1 
x  b 
Ax = b A =  aij  =  A(1) , A(2) , L , A( n )  x =  2 b =  2
n× n  M  M
   
a11 a12 L a1n  xn   bn 

a21 a22 L a2 n
det( A) = ≠0
M M M (this system has a unique
a n1 a n 2 L ann solution)

3 - 63
Cramer’s rule
A j =  A(1) , A(2) ,L , A( j −1) , b, A( j +1) , L , A( n ) 

 a11 L a1( j −1) b1 a1( j +1) L a1n 


 
 a21 L a2( j −1) b2 a2( j +1) L a2 n 
=
M O M
 
 an1 L an( j −1) bn an( j +1) L ann 

( i.e., det( Aj ) = b1C1 j + b2C 2 j + L + bnC nj )


1
x = A −1 b = adj ( A) ×b
det ( A )

det( A j )
⇒ xj = , j = 1, 2 , L , n
det( A)

3 - 64
• Proof:
A x = b, det( A) ≠ 0
1
−1
⇒x= A b = adj ( A)b
det( A)
 C11 C 21 L C n1   b1 
 C n 2   b2 
1  C12 C 22 L
=
det( A)  M M M  M
  
 C1 n C 2 n L C nn   bn 

 b1C11 + b2C 21 + L + bnC n1 


 + b2C 22 + L + bnC n 2 
1  b1C12
=
det( A)  M M 
 
 b1C1n + b2C 2 n + L + bnC nn 

3 - 65
1
⇒ xj = (b1C1 j + b2C 2 j + L + bnC nj )
det( A)
det( A j )
= j = 1, 2 , L , n
det( A)

3 - 66
• Ex: Use Cramer’s rule to solve the system of linear equations.
− x + 2 y − 3z = 1
2x + z = 0
3x − 4 y + 4 z = 2
Sol: −1 2 − 3 1 2 −3
det( A) = 2 0 1 = 10 det( A1 ) = 0 0 1 =8
3 −4 4 2 −4 4
−1 1 − 3 −1 2 1
det( A2 ) = 2 0 1 = −15, det( A3 ) = 2 0 0 = −16
3 2 4 3 −4 2
det( A1 ) 4 det( A2 ) − 3 det( A3 ) − 8
x= = y= = z= =
det( A) 5 det( A) 2 det( A) 5
3 - 67
2.2. System of Equations: Matrices and
Vectors
Assume an economic model as system of linear
equations in which
aij parameters, where i = 1.. n rows, j = 1.. m
columns, and n=m
xi endogenous variables,
di exogenous variables and constants
a11 x1 + a12 x2 +  a1m xn = d1
a21 x1 + a22 x2 +  a 2 m xn = d 2
M M M M
an1 x1 + an 2 x2 +  anm xn = d n

68
2.2. System of equations: Matrices and Vectors

• A general form matrix of a system of linear


equations
Ax = d where
A = matrix of parameters
x = column vector of endogenous variables
d = column vector of exogenous variables and
constants
• Solve for x* a a  a  x  d 
11 12 1m 1 1
a a  a   x  d 
 21 22 2m   2 
=  2
 M M M M  M  M 
    
 an1 an 2  anm   xn  d n 
Ax = d
x* = A−1d
69
2.2.1. Solution of a General-equation System
Assume the 2x2 model Why?
2x + y = 12 4x + 2y =24
4x + 2y = 24 2(2x + y) = 2(12)
one equation with two
Find x*, y*: unknowns
y = 12 – 2x 2x + y = 12
4x + 2(12 – 2x) = 24 x, y
4x +24 – 4x = 24 Conclusion:
0 = 0 ? indeterminate! not all simultaneous
equation models have
solutions

70
2.2.2. Linear dependence
• A set of vectors is linearly
dependent if any one of
them can be expressed as a v1' = [ 5 12]
linear combination of the v2' = [10 24]
remaining vectors;  5 10   v1' 
otherwise, it is linearly 12 24 =  ' 
  v2 
independent. 2v1/ − v2/ = 0 /
• Dependence prevents
solving a system of  2 1  4
equations. More unknowns v1 =   ; v2 =   ; v3 =  
than independent 7 8  5
equations. 3v1 − 2v2
• The number of linearly = [ 6 21] − [ 2 16]
independent rows or = [ 4 5] = v3
columns in a matrix is the
rank of a matrix (rank(A)). 3v1 − 2v2 − v3 = 0
71
2.2.3. Application 1:One Commodity Market
Model (2x2 matrix)
Economic Model a+c
P =*
1) Qd=Qs b+d
2) Qd = a – bP (a,b >0) ad − bc
Q =
*
3) Qs = -c + dP (c,d >0) b+d
Find P* and Q*
Scalar Algebra Matrix Algebra

Endog. :: Constants 1 b  Q   a 
4) 1Q + bP = a 1 − d   P  = − c 
    
5) 1Q – dP = -c
Ax = d
x* = A−1d
72
2.2.3. One Commodity Market Model
(2x2 matrix)
Matrix algebra

1 b  Q   a 
1 − d   P  = − c 
    
Ax = d
−1
Q  1 b   a 
*

 * =    
 P  1 − d  − c 
−1
x =A d
*

73
2.2.4. General form of 3x3 linear matrix

Scalar algebra form


parameters & endogenous variables exog. vars
& const.
a11x + a12y + a13z = d1
a21x + a22y + a23z = d2
Matrix algebraa form
x + a32y + a33z = d3
31
parameters endog. exog. vars.
vars & constants

a11 a12 a13 x  d1 


a a22 a23 y  = d 
 21    2 

a31 a32 a33 

z 
  d 3 

74
2.2.5. Application II: Three Equation
National Income Model (3x3 matrix)
• Let
Y = C + I 0 + G0
C = a + b(Y-T) (a > 0, 0<b<1)
T = d + tY (d > 0, 0<t<1)
• Endogenous variables?
• Exogenous variables?
• Constants?
• Parameters?
• Why restrictions on the parameters?

75
2.2.6. Three Equation National Income
Model
• Endogenous: Y, C, T: Income (GNP), Consumption,
and Taxes.
• Exogenous: I0 and G0: autonomous Investment &
Government spending.
• Constants a & d: autonomous consumption and taxes.
• Parameter t is the marginal propensity to tax gross
income 0 < t < 1.
• Parameter b is the marginal propensity to consume
private goods and services from gross income 0 < b < 1.

a − bd + I 0 + G0
8) Y =*

1 − b + bt

76
2.2.6. Three Equation National Income
Model
Parameters & Exog.
Endogenous vars. vars.
Given
Y C T &cons.
Y = C + I 0 + G0 1Y -1C +0T = I0+G0
-bY +1C +bT = a
C = a + b(Y-T)
-tY +0C +1T = d
T = d + tY
 1 − 1 0 Y   I 0 + G0 
Find Y*, C*, T*
− b 1 b C  =  a 
Ax = d     
 − t 0 1 T   d 
x * = A−1d
78
2.2.6. Three Equation National Income
Model

 1 − 1 0 Y   I 0 + G0 
− b 1 b  C  =  a 
    
 − t 0 1 T   d 
Ax = d
−1
Y   1 − 1 0  I 0 + G0 
*

 *    
C  = − b 1 b   a 
T *   − t 0 1  d 
 
−1
x =A d
*

79
2.2.7. Application III: Two Commodity
Market Equilibrium (4x4 matrix)
Given Scalar algebra
Qdi = Qsi, i=1, 2 1Q1 +0Q2 +2P1 - 1P2 = 10
Qd1 = 10 - 2P1 + P2 1Q1 +0Q2 - 3P1 +0P2= -2
Qs1 = -2 + 3P1 0Q1+ 1Q2 - 1P1 + 1P2= 15
Qd2 = 15 + P1 - P2
0Q1+ 1Q2 +0P1 - 2P2= -1
Qs2 = -1 + 2P2
1 0 2 − 1   Q1   10 
Find Q , Q2 , P , P 1 0 − 3 0  Q2  − 2
* * * *
1 1 2

 =
Ax = d 0 1 − 1 1   P1   15 
    
x* = A−1d 0 1 0 − 2  P2   − 1 

80
2.2.8. Two Commodity Market Equilibrium

1 0 2 − 1   Q1   10 
1 0 −3    
0   2  − 2
Q 
 =
0 1 −1 1   P1   15 
    
0 1 0 − 2  P2   − 1 
Ax = d
−1
Q1*  1 0 2 − 1  10 
 * 
Q 2  = 1 0 −3 0   − 2
 
 P *  0 1 −1 1  15 
 1*     
 P2  0 1 0 − 2  − 1
x* = A−1d 81
2.3. Eigenvalues and eigenvectors

Eigenvalue problem:

If A is an n× n matrix, do there exist nonzero n× 1 matrices


x such that Ax is a scalar multiple of x ?

Eigenvalue and eigenvector:
A : an n× n matrix
 : a scalar
x : a n× 1 nonzero column matrix

Eigenvalue
(The fundamental equation for
Ax = λx
the eigenvalue problem)
Eigenvector
3 - 82
• Ex 1: (Verifying eigenvalues and eigenvectors)
1 4  1 2
A=  x1 =   x2 =  
 2 3 1 − 1
Eigenvalue
1 4 1 5 1
Ax1 =     =   = 5  = 5 x1
2 3 1 5 1
Eigenvector
Eigenvalue
1 4   2   − 2  2
Ax2 =     =   = −1  = (−1) x2
2 3 − 1  1  − 1
Eigenvector
3 - 83
Question:
Given an n× n matrix A, how can you find the eigenvalues and
corresponding eigenvectors?


Note:
Ax = λ x = λ Ix ⇒ (λ I − A) x = 0 (homogeneous system)
Note: If (λI − A) x = 0 has nonzero solutions iff det(λI − A) = 0.

 Characteristic equation of A∈Mn× n:


det(λ I − A) = ( λ I − A) = λ n + cn−1λ n−1 + L + c1λ + c0 = 0

3 - 84
• Ex: (Finding eigenvalues and eigenvectors)
1 4 
A= 
 2 3 

Sol: Characteristic equation:


λ −1 − 4
(λI − A) =
−2 λ −3
= λ2 − 4λ − 5 = (λ − 5)(λ + 1) = 0
⇒ λ = 5, − 1

Eigenvalue: λ1 = 5, λ2 = −1

3 - 85
 4 −4   x1   0 
(1) λ1 = 5 ⇒ (λ1I − A) x =   x  =  
 −2 2   2   0 
 x1   t   1
x  =   = t  , t ≠ 0
 2  t   1

 −2 −4   x1   0 
(2) λ2 = −1 ⇒ ( λ 2 I − A) x =   x  =  
 −2 −4   2   0 
 x1   2t  2
x  =   = t  , t ≠ 0
 2  −t   − 1

3 - 86
Quadratic Forms
Definition 1: Let A be n×n symmetric matrix and x
denote an n×1 column vector. Then Q=X’AX is said to
be a quadratic form of A.
Example: A =  1 2 
 
2 1

 1 2  X 1 
The form of A is Q = X ′AX = ( X 1 X 2 )   
 2 1  X 2 
2 2
= X1 + 4 X1 X 2 + X 2
Definiteness
Definition 2: A quadratic form is said to be:
A) Negative definite: Q<0 when x≠0
B) Negative semi definite: Q≤0 for all x and Q=0 for
some x≠0
C)Positive definite: Q>0 when x≠0
D)Positive semi definite: Q≥0 for all x and Q=0 for
some x≠0
E) Indefinite: Q≥0 for some x and Q<0 for some other
x
Examples
1 0 0
 
Example 1: D = 0 2 0
0 0 4
 
Q = X ′DX = X 1 + 2 X 2 + X 3
2 2 2
∀X ≠ 0, Q > 0
Hence D is positive definite

Example 2 : Q = X 2 + Y 2 is PD, Q = ( X + Y ) is PSD and Q = X 2 − Y 2 is ID


2
Theorem
A quadratic form Q is:
PD iff λi>0 for all i
ND iff λi<0 for all i
PSD iff λi≥0 for all i
NSD iff λi≤0 for all i
Determining Positive-definiteness
• For a symmetric matrix
1. All diagonal entries are positive
2. Each diagonal entry is greater than sum of the absolute
values of all other entries in the same row.
• For a non-symmetric matrix
1. All diagonal entries are positive.
2. Each diagonal entry is greater than sum of the absolute
values of all other entries in the same row.
3. Each diagonal entry is greater than sum of the absolute
values of all other entries in the same column.

91
Determining Positive-definiteness
An arbitrary matrix is positive definite if and only
if all the principal sub-matrices have a positive
determinant.

92
Diagonal dominance
A matrix M is row diagonally dominant if
n
mi ,i > ∑
j =1, j ≠ i
mi , j

for i=1,…,n.
A matrix M is column diagonally dominant if
n
mi ,i > ∑
j =1, j ≠ i
m j ,i

for i=1,…,n.
A matrix is diagonally dominant if it is both
row and column diagonally dominant.

93
Positive-definite definition
A symmetric row diagonally-dominant matrix
with positive definite entries is positive definite.
Example: if  3 −1 −2 
M =  −2 2 0  ,
 1 0 1 
is it positive definite?
Determinants of principal sub-matrices
3,3*2-2=4,3*2-2+4=8

94

You might also like