Professional Documents
Culture Documents
Matrix Algebra 2016
Matrix Algebra 2016
Lectures 1-4
MATRIX ALGEBRA
Charles Nadeau
E-mail: Charles.Nadeau@economics.gu.se
Office: D-604
Office Hours: by appointment
Autumn 2016
(i)
x1 x2 = d1
x2 x3 = d2
x3 - x1 = 0
where (x1 , x2 , x3) denote endogeneous variables, (, , ) denote coefficients
and (d1 , d2) denote constant terms.
Ax = d
Matrix form:
where
A =
Solving:
x 1* =
x =
x 2* =
d =
x 3* =
Ax = d
where
x =
d =
Suppose:
2x1 - x2 = 0
-x1 + x2 = 4
Matrix form:
Ax = d
where
A =
x =
First equation:
Second equation:
d =
[2 -1] = 0
[-1 1] = 4
Vectors
Vectors (cont)
Three-dimensional vectors:
x = [x1 x2 x3]
y =
which can be represented as points or directed segments on
a 3dimensional coordinate space (see textbook discussion).
Vectors (cont)
n-dimensional vectors:
x = [x1
x2
x3 xn]
y =
which cannot be represented in graphical form.
Equality of vectors:
y = z
iff yi = zi
x = z iff xj = zj
Matrices
Matrices (cont)
Special matrices:
Identity matrix:
I2 =
I3 =
There also exists I4 , I5 , I6 , ect . all necessarily square
matrices.
Matrix counterpart to scalar 1: IA = AI = A
Matrices (cont)
Special matrices:
Null matrix:
022 =
032 =
Null matrices are not necessarily square matrices.
Matrix counterpart to scalar 0: (A + 0) = (0 + A) = A
(A0) = (0A) = 0
x = [8 9 -3]
z = [4 -5 6]
Then:
x + z = [12 4 3]
x - z = [4 14 -9]
Suppose:
y =
z =
Then:
y + z =
and y - z =
Generically:
x = [x1 x2 x3]
z = [z1 z2 z3]
x + z = [x1 + z1
x - z = [x1 - z1
y =
y + z =
x 2 + z2
x2 - z2
z =
y - z =
x3 + z3]
x3 - z3]
Scalar Multiplication ()
Suppose:
x = [x1
x2
x 3]
y =
Then:
x = [x1
y =
x2
x3]
x = [x1 x2 x3]
y =
Then:
xy = [x1 x2 x3]
= x 1y 1 + x 2y 2 + x 3 y 3
Requirement: (row vector) x (column vector) with equal number of
elements
Result: scalar (calculated as the inner product of the vector elements)
Linear Dependence
v2 = [10 24]
v2 =
v3 =
Matrix Addition
and
B =
A+B =
Rules:
(1)
(2)
(3)
(4)
Commutative:
Associative: (A
Null matrix (0):
Opposite matrix
A+B = B+A
+ B) + C = A + (B + C)
A+0 = A
(-A): A + (-A) = 0
Matrix Addition/Subtraction
Example:
A =
B =
A+B =
Example:
A =
B =
A-B =
Scalar Multiplication
A =
Rules:
(1) A) = A
(2) (A + B) = A + B
(3) ( ) A = A + 2 A
Matrix Multiplication
Conformability Requirement:
Multiplication Rule:
cij =
i.e. multiply ith row in A with jth column in B and calculate inner product
of them
Rules: (1) AB BA (i.e. not commutative in general)
(2) Associative: (AB)C = A(BC) (assuming conformability holds)
(3) Distributive:
A(B+C) = AB + AC
(B+C)A = BA + CA (assuming )
Transpose of a Matrix
In order to transpose a matrix you interchange the rows and columns
of the matrix:
Suppose:
A =
Then:
A =
Properties: (A) = A
(A + B) = A + B
(AB) = BA
Suppose:
A
Then:
A =
Matrix Inversion
The inverse of square matrix A is denoted as
A-1
and is defined such that
AA-1 = A-1 A = I
Note:
(2)
(3)
(4)
(5)
Determinant of a Matrix
= (a11a22 - a12a21)
(scalar)
where the value of is a crucial test for the singularity of the matrix
(discussed earlier) and is useful for calculating A-1 (also discussed
earlier).
A =
Then:
= a11 - a12 + a13
= a11 - a12
+ a13
det A =
if expanding using row i or, equivalently
det A =
if expanding using column j.
Given:
A =
Calculating:
= (2)(2) (0)(0) = +4
Given:
A =
Calculating:
= (-1)(-10) (5)(2) = 0
Note: -2v1 = v2 (i.e. linear dependent rows)
Note: -5v1 = v2 (i.e. linear dependent columns)
Suppose:
Question:
= +72
= -81
(assume: 0)
(i.e. C adjoint of A)
Calculating:
A-1 =
adj A C
=
=
Example:
A
adjA C
Example:
=
Calculating:
C
Thus:
adj
Suppose:
Ax = d
where the coefficient matrix A is an nxn square matrix and d is an nx1
column vector where d 0. If 0 (i.e. matrix A is non-singular and
thus full rank) then A-1 exists and the unique solution to the system is:
x = A-1 d
Suppose:
Ax = d
where the coefficient matrix A is an nxn square matrix (i.e. Ax = d
denotes a square system with n-equations and n-unknown variables).
= 0:
=0
(1)
(2)
exists or many solutions exist
0:
=0
(1)
m > n:
Cramers Rule
Given:
Ax = d