Anda di halaman 1dari 49

Matrix Algebra and Applications

Dudley Cooke
Trinity College Dublin

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

1 / 49

EC2040 Topic 2 - Matrices and Matrix Algebra

Reading
1

Chapters 4 and 5 of CW

Chapters 11, 12 and 13 of PR


Plan

Matrices and Matrix Algebra

Transpose, Inverse, and Determinant of a Matrix

Solutions to Systems of Linear Equations

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

2 / 49

Matrices and System of Equations


A matrix is an array of numbers. Some examples are,

2


2
3
5
2 3

A=
, B = 5 10 , C =
1
7 2
1
1
4
Notation: We shall use a capital letter to denote a matrix and the
corresponding small letter to denote individual elements of a matrix.
The element in the (2, 1) position (2nd row, 1st column)
of A will be

a11 a12
denoted as a21 . So, from above, A =
.
a21 a22
The number of rows and columns in a matrix is also called its order
or dimension. For instance, the matrix A has order 2 2.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

3 / 49

Special Types of Matrices


Square matrix which has the same number of rows as columns (order
n n)
Row matrix (order 1 n)
Column matrix (order n 1).
A vector is a matrix having either a single row or a single column.
Two special types of square matrices are the null matrix (all entries
zero) and the identity matrix which has 1 along the diagonal and
zeros everywhere else:

1 0 ... 0
0 1 ... 0

.. .. .. ..
. . . .
0 0 ... 1
A square matrix where the only non-zero entries are on the diagonal is
also called a diagonal matrix.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

4 / 49

Matrices in Economics
One example of a matrix in economics is the IS-LM macro model.1
Y = C + I + G
C = a + b (1 t )Y

(resource constraint)
(consumption function)

I = e lR
(investment function)
= kY hR
M
(money demand)
We can write the above

1
b (1 t )

0
k

system in matrix notation as:


1 1 0
Y


1
0
0
C =
0
1
l I
0
0 h
R

G
a

Question: what happens to consumption when we increase the money


supply (expansionary monetary policy).
1 Recall, IS (the first three equations) and LM gives AD, where G
and M
are
government policies.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

5 / 49

Arithmetical Operations on Matrices


Addition and Subtraction of matrices is very easy but can be done
only when all the matrices have the same dimension.
Thus, Amn + Bp q is defined only when m = p and n = q.
Example:


4 3
1 2

= A2 2

1 2
5 6

4+1 3+2
1+5 2+6

5 5
8 6

= B2 2

That is, m = p = n = q = 2.



c11
a11 a12
Clearly,
and c12 cannot be added together.
a21 a22
c13
=A
22

Dudley Cooke (Trinity College Dublin)

=C31

Matrix Algebra and Applications

6 / 49

Arithmetical Operations on Matrices


Formal Definition: Suppose that we have two matrices A = [aij ]mn
and B = [bij ]mn .
Then, the matrix A + B is simply [aij + bij ]mn . E.g., for the
m = n = 2 case,

 
 

a11 a12
b11 b12
a11 + b11 a12 + b12
+
=
a21 a22
b21 b22
a21 + b21 a22 + b22
=A22

B2 2

Similarly, the matrix A B is simply [aij bij ]mn .


This process easily extends to the case when we have many matrices.
For instance - if we have three matrices A, B, C of the same
dimension - then A + B + C is the matrix formed by adding the
corresponding (i, j )th entries of A, B and C .

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

7 / 49

Scalar Multiplication
Scalar Multiplication by a number c is just multiplying each element
of the matrix by the number c.

2 1
3 9

For instance if A =
4 5 and c = 5/2 then c A is the
2 2

5
5/2
15/2 45/2

matrix
10 25/2 .
5
5
Note that scalar multiplication applies to any matrix. We can
combine the operations of scalar multiplication and addition: for
instance, you should be able to say what 5A + 3B means if A and B
have the same dimension.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

8 / 49

Matrix Multiplication

Matrix Multiplication is somewhat more complicated (but all it really


requires is concentration).
Suppose that we have two matrices Amn and Bp q .
The product AB is defined only when n = p, that is when the number
of columns in A equals the number of rows in B.
1

This means that the product BA is defined only when q = m.

It is possible that AB is defined but BA is not defined.

Furthermore, even if AB and BA are both defined it is possible that


they do not give the same matrix.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

9 / 49

Matrix Multiplication

The bottom line is, the order of operation is important in matrix


multiplication.
Mathematically, we say that matrix multiplication is not commutative
(whereas the scalar case is).
All this is very different from ordinary multiplication.
Take the previous example:




4 3
1 2
A22 =
and B22 =
1 2
5 6
What are AB and BA?

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

10 / 49

Matrix Multiplication for the 2 by 2 case


First, AB is,


4 3
1 2

4 (1) + 3 (5) 4 (2) + 3 (6)


1 (1) + 2 (5) 1 (2) + 2 (6)

AB =



1 2
5 6




19 17
11 14

However, BA is,



4 3
1 2
BA =
5 6
1 2
 


1 (4) + 2 (1) 1 (3) + 2 (2)
6 7
=
=
5 (4) + 6 (1) 5 (3) + 6 (2)
26 27
So, AB is not BA.
Again, think about this versus the scalar case. If a = 5 and b = 6,
ab = ba = 30.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

11 / 49

Formal Definition of Matrix Multiplication


Suppose we have two matrices A = [aij ]mn and B = [bij ]np .
The product AB is a m p matrix [cij ]mp where,
cij = ai1 b1j + ai2 b2j + . . . + ain bnj .
Loosely speaking, cij is the product of the ith row of A and the jth
column of B.
Again, for the 2

AB =

=

=

by 2 case, we have:


a11 a12
b11 b12
a21 a22
b21 b22
a11 (b11 ) + a12 (b21 ) a11 (b11 ) + a12 (b21 )
a21 (b12 ) + a22 (b22 ) a21 (b12 ) + a22 (b22 )

c11 c12
C
c21 c22

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

12 / 49

Example



1 2
7
8
Suppose A = 3 4 and B =
and AB = C , if
9 10
5 6
possible.
Since A has order 3 2 and B has order 2 2, it follows that
C = AB is defined and the product is a matrix of dimension 3 2.
The individual elements of C (e.g., c11 = a11 b11 + a12 b21 ) are:
c11 = (1 7) + (2 9) = 25, c12 = (1 8) + (2 10) = 28,
c21 = (3 7) + (4 9) = 57, c22 = (3 8) + (4 10) = 64,
c31 = (5 7) + (6 9) = 89, c32 = 5 8 + 6 10 = 100.

c11 c12
25 28
Hence, C = c21 c22 = 57 64 .
c31 c32
89 100
Note that BA is not defined as elements a31 = 5 and a32 = 6 cannot
be matched with elements of B.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

13 / 49

Null and Identity Matrix Multiplication


The null and identity matrix cases are trivial.
The identity matrix plays the role of 1 in the scalar case.
Scalar case:
31 = 3
Matrix case:


 
 

4 3
1 0
4 (1) + 3 (0) 4 (0) + 3 (1)
4 3
=
=
1 2
0 1
1 (1) + 2 (0) 1 (0) + 2 (1)
1 2
The null matrix plays the role of zero. As with 3 0 = 0, so,


 
 

4 3
0 0
4 (0) + 3 (0) 4 (0) + 3 (0)
0 0
=
=
1 2
0 0
1 (0) + 2 (0) 1 (0) + 2 (0)
0 0

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

14 / 49

Recap: Rules for Scalars versus Matrices


Scalar cases:
1

Commutative; a + b = b + a

Associative; (a + b ) + c = a + (b + c ) and (ab ) c = a (bc )

Distributive; a (b + c ) = ab + ac and (b + c ) a = ba + ca
Matrix cases:

Addition
Commutative law; A + B = B + A
Associative law; (A + B ) + C = A + (B + C )

Multiplication
Associative law; (AB ) C = A (BC )
Distributive law; A (B + C ) = AB + AC and (B + C ) A = BA + CA

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

15 / 49

Transpose of a Matrix

The transpose of a matrix A is formed by interchanging the rows and


columns of A.
If A has order m n, then its transpose has dimension n m.
The transpose of A is generally denoted as AT and sometimes A0 .
If A = AT , then we say that A is a symmetric matrix.
A symmetric

1
3
matrix must be a square matrix (e.g., A = AT =
).
3 1
Transpose of a square matrix:




a11 a12
a11 a21
T
A=
A =
a21 a22
a12 a22

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

16 / 49

Properties of the Transpose

The transpose operation has the following properties.


1

(AT )T = A

(A + B )T

AT

+ BT .

4 3
1 2

AT

=
Suppose A =

=




1 2
1 5
and B =
BT =
. Try this at home.
5 6
2 6

4 1
3 2

(AB )T = B T AT
More generally, if we have n-matrices A1 , A2 , . . . , An then
T
T T
(A1 A2 . . . An )T = AT
n An1 . . . A2 A1

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

17 / 49

The Inverse of a Square Matrix

For a square matrix, Ann , the following is always true:


AIn = In A = A
If we can find a matrix Bnn satisfying AB = BA = In , then we say
that B is the inverse matrix of A. The inverse matrix of A is denoted
A1 .
Not all square matrices have inverses.
1

A matrix which has an inverse is called non-singular.

A matrix which does not have an inverse is called singular.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

18 / 49

The Determinant of a Square Matrix


We denote the determinant of A, as |A|.
The determinant of a 1 1 matrix is trivial: it is the number itself.


a11 a12
The determinant of a 2 2 matrix A =
is,
a21 a22

|A| = a11 a22 a12 a21


The procedure for bigger matrices is more complicated. Let A be a
n n matrix. Let Mij denote the determinant of the matrix derived
from A by deleting the ith row and jth column. Let Cij = (1)i +j Mij .
We refer to Mij as a minor and Cij as a co-factor.
Note: A square matrix A has an inverse if and only if its determinant
is non-zero (is non-singular).

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

19 / 49

The Determinant of a Square matrix

Pick any row or column in the matrix. Suppose we pick the ith row.
Then, the determinant of the matrix A is:

|A| = ai1 Ci1 + ai2 Ci2 + . . . + ain Cin


If we pick the a column, say the jth one, then the determinant is
computed as:

|A| = a1j C1j + a2j C2j + . . . + anj Cnj


Observe that we could have picked any row or column: we will always
get the same answer. For practical considerations, we try to pick out
a row or column which has the maximum number of zeros.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

20 / 49

The Determinant of a Square matrix, 2 by 2 case



Suppose we have the following matrix: A =

1 2
3 4


. We know

|A| = (1 4) (2 3) = 2.
Although its a little trivial, we can relate that to the technique for
larger matrices, as a first step.
We have,
|A| = (a11 C11 ) + (a12 C12 )

 

= a11 (1)1+1 M11 + a12 (1)1+2 M12
= a11 M11 a12 M12 ; M11 = 4 and M12 = 3
= a11 4 a12 3 = (1 4) (2 3) = 2
Why is this all so easy? In the 2 by 2 case, the Mij s are scalars. If
we have a 3 by 3 case, the Mij are 2 by 2 matrices, which we have to
work out the determinant of first etc...
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

21 / 49

3 by 3 Example

1 2 3
Suppose we have the following 3 by 3 matrix, A = 4 2 6 .
7 8 9
Let us compute the determinant by computing the co-factors of the
first row.
We have, Cij = (1)i +j Mij , so,
C11 = (1)

1+1

M11 = (1)



2 6

8 9
| {z }

1+1

M11

But we know that M11 = (8 6) (2 9) = 48 18 = 30.


We conclude that C11 = 30.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

22 / 49

3 by 3 Example Continued
We can do this for the other 2 elements of the row. We find,




1+2 4 6
=6
C12 = (1)
7 9
| {z }
=M12

C13



1+3 4 2
= (1)
7 8



= 18

Hence, the determinant, call it for short, is,


= a11 C11 + a12 C12 + a13 C13 = a11 M11 a21 M21 + a13 M13

= [1 (30)] + (2 6) + (3 18) = 36
We could have chosen any other row or column. If we choose the
third column, then we have: C13 = 18, C23 = 6, C33 = 6 and
therefore = (3 18) + (6 6) + [9 (6)] = 36.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

23 / 49

Properties of the Determinant

There are some useful properties of determinants (that we wont


prove) which can simplify the computation of the determinant
significantly.
1

If a row or column of A is multiplied by c, then the determinant of


the new matrix is c |A|.

Multiplying a row (column) by a non-zero constant and adding it to


another row (column) has no effect on the determinant.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

24 / 49

Extended Example with Common Factors


Common factors basically involves taking things outside the brackets,
as we usually do, except we can use the properties of the determinant.

1 2 3
Consider the same matrix as before, A = 4 2 6 .
7 8 9
Note
row can
 that the second

 be written as
2 2 1 3 = 4 2 6 .
We know that multiplying a row by a constant leads the determinant
to change by the same factor.
It follows,

1 2 3

|A| = 2 2 1 3
7 8 9

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

25 / 49

Example Continued

Note
that
column
three also has
1
3
3 1 = 3 .
3
9
It follows that,

1

|A| = (2 3) 2
7

a common factor of 3, i.e.,




1 2 1
2 1


1 1 = 6 2 1 1
7 8 3
8 3

There are now no common factors; however we can now make use of
the row and column operations.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

26 / 49

Example Continued
Since the determinant is not changed by multiplying a row (column)
by a constant and adding it to another row (column) we can use this
to make some entries in a row or column zeros.
Multiplying the first row by 1 and adding it to the second gives,


1 2 1


|A| = 6 1 1 0
7 8 3


1 2 1


What did we do? Well, we started with 6 2 1 1 and we noted,
7 8 3
T T

T
1
2
1

+ 1
= 1 , which is the new middle row
(1) 2
1
1
0
of |A|.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

27 / 49

Example Continued
Similarly, multiplying the first row by 3
row gives:

1 2

|A| = 6 1 1
4 2

and adding it to the third


1
0
0

Following
the same idea
as before, we start out with
1 2 1


|A| = 6 1 1 0 and we note,
7 8 3
T T
T
1
7
4

+ 8
= 2 , which is the new bottom row of
(3) 2
1
3
0
|A|.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

28 / 49

Example Continued


1 2 3


Why did we do all of this? Well, |A| = 4 2 6 is not that easy
7 8 9
to compute.


1 2 1


However, |A| = 6 1 1 0 is easy to compute, as we can take
4 2 0
the cofactors of the third column.
In that case, we only have to compute one cofactor since two entries
in the column are zero.
Therefore, we have,


|A| = 6 1 (1)

Dudley Cooke (Trinity College Dublin)

1+3



1 1


4 2 = 6 6 = 36

Matrix Algebra and Applications

29 / 49

Computing the inverse using the determinant


We observed before that we can find the inverse of a square matrix A
if and only if |A| 6= 0.
When the determinant exists, it can be shown that the inverse is
given by,
1
[cij ]T
A1 =
|A|
where [cij ] is the matrix of cofactors of A.
In words, what we do is the following:
1

Replace each element of A by its cofactor.

Take the transpose of the matrix.

Scalar multiply this matrix by 1/|A|.


Note: the following is also used, adj (A) [cij ]T ; it is called the
adjunct.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

30 / 49

A 2 by 2 Example of Matrix Inversion


Consider the following 2 by 2 matrix A =

3 2
1 0


.

We know that |A| = (3 0) (1 2) = 2. Since |A| 6= 0, an


inverse must exist.
The cofactor matrix (notice how
 easy it is in this case, again due to
0 1
0 2
zeros) is the following; cij =
[cij ]T =
1 3
2 3




0 1
0 2
Then, A1 = |A1 | [cij ]T = 21
= 21 1
.
3
1 3
2 2

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

31 / 49

The Inverse of a Square Matrix


Consider the following 2 by 2 matrix: A =

1
3 4


. Does this

matrix have an inverse?


We know an inverse only exists if the matrix is non-singular. For this
to hold, we require, |A| 6= 0.
We know that if |A| = (1 4) (3 ) = 0 the matrix is singular.
That is, we cant find the inverse of A if = 4/3.
Finding a singularity tends to become a problem is we have very big
matrices (say we have a big model) which is relatively sparse (that is,
has lots of zeros in it).

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

32 / 49

3 by 3 Example

Let us
compute the
inverse of the matrix that we have seen before:
1 2 3
A = 4 2 6 .
7 8 9
We already know the following:
C11 = 30, C12 = 6, C13 = 18, C23 = 6, C33 = 6

|A| = 36
Recall we can use C1j s or Ci3 s to get here.
The remaining cofactors are C21 = 6, C22 = 12, C31 = 6, C32 = 6.
Try this at home.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

33 / 49

Matrix Inversion Example Continued

30
6
18
12 6 .
Here the matrix of cofactors is, [cij ] = 6
6
6
6

30
6
6
12 6 .
The transpose is, [cij ]T = 6
18
6
6
5

1
1
6
6
6
1
The inverse matrix is, A1 = |A1 | [cij ]T = 16 13
as
6
1
1
1
2
6 6
|A| = 36.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

34 / 49

Cramers Rule
Now suppose we have a big linear model.
In its most general specification it is written as a system of linear
equations:
a11 x1 + a12 x2 + . . . + a1n xn = b1
..
..
..
..
.
.
.
.
.
= ..
an1 x1 + an2 x2 + . . . + ann xn = bn
This is system of n linear equations in n unknowns. It can be
represented
compactlyin matrix
asAx =b where,
notation

a11 . . . a1n
x1
b1

..
.
.
.
..
.. , x = .. , b = ...
A= .
.
an1 . . . ann
xn
bn
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

35 / 49

Cramers Rule
We note that providing |A| 6= 0 (that is, A has an inverse) we can
solve for x by just multiplying both sides of the equation Ax = b by
A1 :
(A1 )Ax = (A1 A)x = In x = x = A1 b
Cramers rule is just an alternative formula for this; the advantage of
the rule is that we can find each xi individually; this may be useful if
we dont want to find the value of all xi .
Cramers Rule states that:
xi =

|Ab,i |
|A|

Here Ab,i is the matrix where the ith column of A is replaced by the
column vector b.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

36 / 49

Examples of solving for a specific variable


2 3 7
w
6

y
Consider the system 4 4 4
= 2 . Here, |A| = 80;
1 5 1
z
1
A

hence the system is solvable.


We can compute w independently

6 3 7

2 4 4

1 5 1
w=
|A|

of y and z as,






48
3
= =
80
5

Computation of y and z is left as an exercise.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

37 / 49

Why does Cramers Rule work?

Cramers Rule is equivalent to finding the inverse of A. To see this


more
formally, consider

the
system,

a11 a12 a13


w
b1
a21 a22 a33 y = b2 .
a31 a32 a33
z
b3
Now note that the inverse of A can be written as,

C11 C21 C31


1
C12 C22 C32
A1 =
|A|
C13 C23 C33
where Cij is the co-factor of aij .

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

38 / 49

Why does Cramers Rule work?


Hence, we have,

w
b1 C11 + b2 C21 + b3 C31
y = A1 b = 1 b1 C12 + b2 C22 + b3 C32
|A|
z
b1 C13 + b2 C23 + b3 C33
Now note that b1 C11 + b2 C21 + b3 C31 is nothing but the determinant
of the matrix where the first column of A has been replaced by the
vector b.
Similarly, b1 C12 + b2 C22 + b3 C32 is the determinant of the matrix
where the second column of A has been replaced by the vector b.
You can check that a similar observation holds for
b1 C13 + b2 C23 + b3 C33 . This shows that the inverse approach and
Cramers rule are identical for a system of three linear equations but
this approach can be easily extended.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

39 / 49

A Demand and Supply Example


Consider a linear model of demand and supply (of ice-creams).
1

Demand for ice-creams depends on the price of ice-creams, the


income of individuals and the temperature.

The supply of ice-creams also depends on how much the ice-cream


company can charge for its product and how hot it is.
qd = M bp + T
qs = p eT + d
If income goes up, demand goes up. If the temperature goes up,
demand goes up but supply goes down (some of the ice-cream melts
before it is sold). If price goes up, demand falls and supply rises. In
equilibrium, qd = qs .

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

40 / 49

A Demand and Supply Example


It is very easy to solve this model. The solution for the price is,
M +(+e)T d
. Higher temperatures result in higher prices as
p =
+b
people eat more ice-creams and ice-creams melt, reducing supply.
We can also draw the model in (p, q ) space and shift the curves.
More importantly, we can also represent the model in matrix form.

  

b 1
p
M + T
=
1
q
d eT
A

Now we need |A| = b + 6= 0. If we look at p , that makes a lot of


economic sense. We cant have an infinite price for ice-cream.
Again, we can also use Cramers rule to solve for shocks to income or
temperature.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

41 / 49

Demand and Supply


The supply and demand example is trivial. However, we might
imagine that the entire economy (not just one market) consists of
many demand and supply schedules (what we called a big linear
model).
The demand and supply schedules will probably display some form of
interdependence. That is, consider an economy with ice-creams and
apples. If the temperature goes up, the demand for apples might
drop. Why? Because, with given income, the demand for ice-cream
rises.
If this is the case, our economy consists of an entire vector of prices
and a vector of quantities. We want to know the price and quantities
in equilibrium.
That turns out to be very complicated. Having a grasp of matrix
algebra is then very useful as we want to know if an equilibrium exists.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

42 / 49

Returning to the example at the very beginning


Consider the macroeconomic model we wrote down at the beginning.
C = a + b (1 t )Y
I = e lr
G = G
L = kY hR

M=M
We want to solve this model to determine the endogenous variables
(Y , C , I , R ) in terms of the exogenous variables
).
(G , a, b, t, e, k, h, l, M
We can use all the new tools we have developed to solve the model.
Well focus on solving for consumption as a function of monetary and
fiscal policy.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

43 / 49

Macro Model Example


The equilibrium in this system is determined by the conditions:
Y = C + I + G
C = a + b (1 t )Y
I = e lR
= kY hR
M
We can write the above

1
b (1 t )

0
k

system in matrix notation as:


1 1 0
Y


1
0
0
C =

0
1
l
I
0
0 h
R

G
a

The first thing to do is to compute |A| which is needed no matter


which approach we use to solve this system. We choose one of the
rows or columns with the maximum number of zeros since that will
simplify the computation.
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

44 / 49

Example Continued

Suppose we choose row 2. We know, = 4j =1 a2j C2j .


Then, = b (1 t )C21 + C22 , as a22 = 1 and a23 = a24 = 0.
| {z }
=a21
(1)i +j M

4
2+j M . However, it is
Also Cij =
ij so = j =1 a2j (1)
2j
not as easy as before because the M2j s are 3 by 3 matrices.

We only have two of them, in this case.





1 1 0
1 1 0



2+1
2
+
2
0 1
1
l
l
C21 = (1)
C22 = (1)
0

0


0 h
k 0 h

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

45 / 49

Example Continued
Expanding the 3 3 determinant in the expression for C21 about the
first column (two zero elements), we get,
C21 = [(1)(1 (h ) 0 l )] = h
For C22 we can expand the 3 3 determinant about the first column
(one zero element):




1 l
1 0
1+1
3
+
1
+ (1)

C22 = (1)
1
k
0 h
1 l

= h kl
Hence the determinant of the original 4 4 is,
= bh (1 t ) h kl = h (1 b (1 t )) kl
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

46 / 49

Example Continued
We can now compute the value of any of the endogenous variables
using Cramers Rule. Suppose we want to compute C . We replace


T . Then,
the second column with G a e M



1
G 1 0

1 b (1 t ) a
0
0
C =

0
e
1
l
|A|

k
M
0 h
Computing the determinant of the
the second row, we have



2+1
= b (1 t ) (1)




1 1 0


l
0 1
k 0 h
Dudley Cooke (Trinity College Dublin)

4 4 matrix by expanding around


G
e

1 0
1
l
0 h

Matrix Algebra and Applications




+ a (1)2+2

47 / 49

Example Continued
The second 3 3 determinant above has already been found.
Expanding this about the first 3 3 around the first row, we have,


G 1 0


e
1
l = G (1)2 [1 (h ) 0 l ] + (1)

M

0 h
l]
(1)3 [e (h) M
).
This is (hG + he + Ml
) + a (h + kl ) =
Hence, = b (1 t ) (hG + he + Ml

[b (1 t )(hG + he + Ml ) + a(h + kl )]. It follows that


C =

) + a(h + kl )
b (1 t )(hG + he + Ml
h (1 b (1 t )) + kl

are policy variables.


This is all exogenous; and G , M
Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

48 / 49

Roundup

You should now be able to do the following:


1

Add/subtract/multiply matrices.

Find the inverse of a matrix and its determinant (which is basically


matrix manipulation).

Apply these techniques to standard models and use Cramers rule to


solve for endogenous variables as functions of exogenous variables.

Dudley Cooke (Trinity College Dublin)

Matrix Algebra and Applications

49 / 49

Anda mungkin juga menyukai