Lecture 12' Solving linear equations - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Lecture 12' Solving linear equations

Description:

Step 1: identify the endogenous variables and the exogenous variables. ... The exogenous variables (the parameters of the system) correspond to the b vector. ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 15
Provided by: j720
Category:

less

Transcript and Presenter's Notes

Title: Lecture 12' Solving linear equations


1
Lecture 12. Solving linear equations
  • Learning objectives. By the end of this lecture
    you should
  • Know Cramers rule
  • Know more about how to solve linear equations
    using matrices.
  • Introduction Cramers rule.
  • Often when faced with Axb we are not interested
    in a complete solution for x.
  • We may only wish to find x1 or x4
  • Cramers rule is a short cut for finding a
    particular xi. Its particularly useful when A is
    3x3 or bigger.
  • It is not sensible to use it if you need to find
    several xis finding A-1 is then generally
    quicker.

2
2. Cramers rule
  • Suppose you have the system of equations,
  • Ax b.
  • Define the matrix Ai as the result of replacing
    in the ith column of A with b
  • Example 1.
  • Example 2.

3
2. Cramers rule
  • Suppose you have the system of equations,Ax b,
    then, if det. A? 0,
  • Example 2. (Recall that the solution to this
    system was x1 -1, x2 5.)
  • So x1 1/-1 -1 and x2 -5/-1 5.

4
3. Quiz 1.
  • Suppose,
  • Use Cramers rule to find x1 and x2 .

5
4. Cramers rule in macroeconomics
  • Many macro models involve a system of linear
    equations.
  • Cramers rule can be used to solve for one
    particular variable.
  • Example. Suppose
  • Y C I G
  • C a bY 0 lt b lt 1
  • I I0
  • G G0
  • Write this system in matrix form then use
    Cramers rule to find consumption, C.
  • Step 1 identify the endogenous variables and the
    exogenous variables. The endogenous variables
    correspond to the x vectors in the previous
    example. The exogenous variables (the parameters
    of the system) correspond to the b vector.
  • Example here C and Y are endogenous. I0 and G0
    are the exogenous variables.

6
4. Cramers rule in macroeconomics
  • Step 2 Simplify the system of equations if
    possible then write down the system in such a way
    that all the endogenous variables are on one side
    of the equation and all the exogenous variables
    are on the other side.
  • Example simplify the equations
  • Y C I0 G0
  • C a bY.
  • Rewrite
  • Y - C I0 G0
  • C bY a
  • Step 3. Put into matrix form.
  • Matrix form

7
4. Cramers rule in macroeconomics
  • Step 4. then use Cramers rule
  • So, to find C we replace the second column of the
    matrix with the column vector of parameters.
  • Quiz II. Find Y using the same procedure.

8
6. Some guidance on solving mxn equation systems.
  • The general problem involves m equations and n
    unknowns.
  • Many systems of equations involve fewer equations
    than variables, mltn
  • Some involve more equations than variables, n lt
    m.
  • In either case you cannot use matrix inversion to
    characterise the solution (if it exists).
  • Example.
  • When m ? n we seek to do two things
  • Find out if any solution exists.
  • If at least one solution exists, identify its
    features.

9
6. Some guidance on solving mxn equation systems.
  • Definition The rank of a matrix is the largest
    number of linearly independent rows or columns.
  • Note that the column rank and the row rank will
    be the same.
  • Note that the rank cannot be larger than the
    smaller of m and n. i.e. if A is an mxn matrix
    rank(A) min(m,n)
  • Example.
  • The rank of this matrix is at most 2, but in fact
    rank(A) 1.
  • The rank of a matrix provides a guide to number
    of solutions.

10
6. Some guidance on solving mxn equation systems.
  • Note that for an nxn matrix (det A 0) ? rank(A)
    lt n.
  • We can see ? from the properties of
    determinants. If rank(A) lt n we can add and
    subtract rows to create a row of zeros. The
    determinant of this new matrix is therefore 0,
    but by property 5 adding and subtracting rows
    does not change the determinant. So det(A) 0.
  • Example. A obviously has rank of less than 3
    because the third row equals the sum of the two
    other rows. What is its determinant?

11
6. Some guidance on solving mxn equation systems.
  • Find the rank of the system. Note that the
    maximum possible rank is n.
  • If rank(A) n, then there may be a unique
    solution
  • If rank(A) lt n then there cannot be a unique
    solution.
  • Check consistency (i.e. the absence of
    contradictions)
  • If the system is consistent and rank(A) n then
    there is exactly one solution.
  • If the system is consistent and rank(A) lt n then
    there are multiple solutions.

12
6. Some guidance on solving mxn equation systems.
  • Example
  • This has a rank of 2. We can take the second row
    away from the first row to create
  • Or x1 1-2x3 and x2 13x3. This is as far as
    we can go in defining a solution. One variable is
    free to take on any value which then determines
    the value of the other two variables. For
    example, given any x3 we can calculate the other
    two variables.
  • In general, if the equation system is consistent,
    then the number of free variables is n-rank(A).

13
6. Some guidance on solving mxn equation systems.
  • Example 2
  • Here m 3 and n 2, so we might suspect that
    the system is contradictory.
  • From the third equation we get x2 2
  • But that tells us that (from the first equation)
    x1 -2.
  • Now insert these results into the middle equation
    and we get
  • 2x1 - x2 -6 1. This is obviously wrong, so
    there is no solution.
  • Notice that if the equation system was
  • Then there would be a unique solution.

14
Summary.
  • 3 skills you should be able to do
  • Use Cramers rule to solve for a variable
  • Write down a linear macroeconomic system in
    matrix form
  • Work out the rank of a matrix
  • Characterise the solution of Axb.
Write a Comment
User Comments (0)
About PowerShow.com