Escolar Documentos
Profissional Documentos
Cultura Documentos
1
P
2
+
2
P
2
= -
0
In general,
a
11
x
1
+ a
12
x
2
++ a
1n
X
n
= d
1
a
21
x
1
+ a
22
x
2
++ a
2n
X
n
= d
2
a
m1
x
1
+ a
m2
x
2
++ a
mn
X
n
= d
m
coefficients a
ij
variables x
1, ,
x
n
constants d
1
, ,d
m
Matrices as Arrays
11 12 1
21 22 2
1 2
n
n
m m mn
a a a
a a a
A
a a a
1
1
1
1
1
1
]
L
L
L L L L
L
1
2
n
x
x
x
x
1
1
1
1
1
1
]
M
1
2
d
d
d
dm
1
1
1
1
1
]
M
1
Example:
6x
1
+ 3x
2
+ x
3
= 22
x
1
+ 4x
2
+-2x
3
=12
4x
1
-x
2
+5x
3
= 10
1
2
3
6 3 1 22
1 4 2 12
4 1 5 10
x
A x x d
x
1 1 1
1 1 1
1 1 1
1 1 1
] ] ]
A matrix is defined as a rectangular array of numbers, parameters, or variables.
Members of the array are termed elements of the matrix.
Coefficient matrix A=[a
ij
]
1, 2,...,
1, 2,...,
i m
j n
_
,
Vectors as Special Matrices
Dimension of a matrix = number of rows x number of columns, m x n
m rows
n columns
Note: row number always precedes the column number. this is in line with way the
two subscripts are in a
ij
are ordered.
Special case:
m = n, square matrix
one column : column vector
one row: row vector
usually distinguished from a column vector by the use of a primed symbol:
[ ]
1 2
'
n
x x x x L
Note that a vector is merely an ordered n-tuple and as such it may be interpreted as a
point in an n-dimensional space.
Matrix Notation
Ax = d
Questions: How do we multiply A and x? What is the meaning of equality?
Exercise (p60):
Q
d
= Q
s
Q
d
= a - bP
Q
s
= -c + dP
2
can be rewritten as
1Q
d
1Q
s
=0
1Q
d
+bP =a
0 +1Q
s
+-dP =-c
Coefficient matrix
1 1 0
1 0
0 1
b
d
1
1
1
1
]
Constant vector
0
a
c
1
1
1
1
]
Matrix Operations
Addition and Subtraction
- must have the same dimension
Example 1
4 9 2 0 4 2 9 0 6 9
2 1 0 7 2 0 1 7 2 8
+ + 1 1 1 1
+
1 1 1 1
+ +
] ] ] ]
Example 2
11 12 11 12 11 11 12 12
21 22 21 22 21 21 22 22
31 32 31 32 31 31 32 32
a a b b a b a b
a a b b a b a b
a a b b a b a b
+ + 1 1 1
1 1 1
+ + +
1 1 1
1 1 1 + +
] ] ]
In general
ij ij ij ij ij ij
a b c where c a b 1 1 1 + +
] ] ]
Note that the sum matrix must have the same dimension as the component matrices.
Subtraction:
ij ij ij ij ij ij
a b d where d a b 1 1 1
] ] ]
3
Example
19 3 6 8 19 6 3 8 13 5
2 0 1 3 2 1 0 3 1 3
1 1 1 1
1 1 1 1
] ] ] ]
Scalar Multiplication:
To multiply a matrix by a number by a scalar is to multiply every element of
that matrix by the given scalar.
3 1 21 7
7
0 5 0 35
1 1
1 1
] ]
1 1
11 12 11 12 2 2
1
2
1 1
21 22 21 22 2 2
a a a a
a a a a
1 1
1 1
] ]
Note that the rational for the name scalar is that it scales up or down the matrix by a
certain multiple. It can also be a negative number.
11 12 1 11 12 1
21 22 2 21 22 2
1
a a d a a d
a a d a a d
1 1
1 1
] ]
Multiplication:
Given 2 matrices A and B, we want to find the product AB. The conformability
condition for multiplication is that the column dimension of A (the lead matrix) must
be equal to the row dimension of B ( the lag matrix).
[ ]
11 12 13
11 12
21 22 23
b b b
A a a B
b b b
1
1
]
(1x2) (2x3)
BA is not defined since the conformability condition for multiplication is not satisfied.
In general, if A is of dimension m x n and B is of dimension p x q, the matrix product
AB will be defined only if n = p.
If defined the product matrix AB will have the dimension m x q, the same number of
rows as the lead matrix A and the same number of columns as the lag matrix B.
4
Exact Procedure
[ ]
[ ]
11 12 13
11 12
21 22 23
11 12 13
11 11 11 12 21
12 11 12 12 22
13 11 13 12 23
where:
b b b
A a a B
b b b
AB c c c
c a b a b
c a b a b
c a b a b
1
1
]
+
+
+
Examples:
2x2,2x2,2x2
Example 7
3 4 1 0
5 6 4 7
3( 1) 4(4) 3(0) 4(7) 13 28
5( 1) 6(4) 5(0) 6(7) 19 42
A and B
AB
1 1
1 1
] ]
+ +
1 1
1 1
+ +
] ]
Example 8
3x2, 2x1, 3x1
(3 2) (2 1) (3 1)
1 3 1(5) 3(9) 32
5
2 8 2(5) 8(9) 82
9
4 0 4(5) 0(9) 20
x x x
A B AB
+ 1 1 1
1
1 1 1
+
1
1 1 1
]
1 1 1 +
] ] ]
Example 9
3x3, 3x3, 3x3
3 1 4 9 7 2
0 1 0
5 10
3 1 2 0 1/ 5 3/10 1 0 0
1 0 6 3 0 3
1 0 3 1 1/ 5 7 /10 0 0 0 0 1 0
5 10
4 0 2 0 2/ 5 1/10 0 0 1
4 0 4 12 0 2
0 0 0
5 10
A B AB
+
1
+ +
1
1 1 1
1
+ + +
1 1 1
1
+ +
1 1 1
1
1 1 1 1
] ] ]
+ + +
1
+ +
1
]
Note, the last matrix is a square matrix with 1s in its principal diagonal and 0s
everywhere else, is known as identity matrix.
5
fr 4.4, p56
1
2
3
1 1 2 3
2 1 2 3
3 1 2 3
6 3 1 22
1 4 2 12
4 1 5 10
6 3 1 6 3
1 4 2 4 2
4 1 5 4 5
x
A x x d
x
x x x x
Ax x x x x
x x x x
1 1 1
1 1 1
1 1 1
1 1 1
] ] ]
+ +
1 1 1
1 1 1
+
1 1 1
1 1 1 +
] ] ]
The product on the right is a column vector
When we write Ax= d, we have
1 2 3
1 2 3
1 2 3
6 3 22
4 2 12
4 5 10
x x x
x x x
x x x
+ + 1 1
1 1
+
1 1
1 1 +
] ]
Example 11: simple national income model with two endogenous variables, Y and C
Y = C + Io + Go
C = a + bY
can be rearranged into the standard format
Y C = Io Go
-bY + C = a
Coefficient matrix, vector of variables, vector of constants
0 0
1 1
1
Y I G
A x d
b C a
+ 1 1 1
1 1 1
] ] ]
To express it in terms of Ax=d,
6
1 1 1( ) ( 1)( )
1 1( )
Y Y C Y C
Ax
b C bY C bY C
+ 1 1 1 1
1 1 1 1
+ +
] ] ] ]
Thus, the matrix notation Ax=d would give us
0 0
Y C I G
bY C a
+ 1 1
1 1
+
] ]
The equation Ax=d precisely representx the original equation system.
BTW = NOT POSSIBLE TO DIVIDE ONE MATRIX BY ANOTHER !!!
Digression on notation:
Subcripted symbols helps in designating the locations of parameters and variables but
also lends itself to a flexible shorthand for denoting sums of terms, such as those which
arose during the process of matrix multiplication.
3
1 2 3
1
j
j
x x x x
+ +
j: summation index
x
j
: summand
7
3 4 5 6 7
3
0 1
0
i
i
n
k n
k
x x x x x x
x x x x
+ + + +
+ + +
L
The application of notation can be readily extended to cases in which the x term is
prefixed with a coefficient or in which each term in the sum is raised to some integer
power.
3 3
1 2 3 1 2 3
1 1
3
1 1 2 2 2 3
1
0 1 2
0 1 2
0
2
0 1 2
( )
j j
j j
j j
j
n
j n
i n
i
n
n
ax ax ax ax a x x x a x
a x a x a x a x
a x a x a x a x a x
a a x a x a x
+ + + +
+ +
+ + + +
+ + + +
L
L
- the last example can be used as a shorthand of the general polynomial
function
7
Study the digression on notation (pp.64-65)
Exercises: 4.2 # 1, 2, 3, 4
- whenever the context of the discussion leave no ambiguity as to the range of
the summation, the symbol can be used alone, without an index attached.
Applying to 4.6 each element of the product matrix C=AB is defined as a sum of terms
which may be rewritten as follows:
2
11 11 11 12 21 1 1
1
2
12 11 12 12 22 1 2
1
2
13 11 13 12 23 1 3
1
k k
k
k k
k
k k
k
c a b a b a b
c a b a b a b
c a b a b a b
+
+
+
1
]
and [ ]
' 1 4 5 v
, we can get
3(1) 3(4) 3(5) 3 12 15
'
2(1) 2(4) 2(5) 2 8 10
uv
1 1
1 1
] ]
8
Example 2: Given u [3 4] and
9
7
v
1
1
]
, we have
uv = [3(9) + 4(7)] = [55] - a scalar product
As written, uv is a matrix, despite the fact that only a single element is present.
- 1 x 1 matrices behave exactly like scalars with respect o addition and
multiplication: [4] + [8] =[12], [3][7]=[21]
- a scalar product
Example 3.
Given a row vector u = [3 6 9], find uu. Since u is merely a column vector,
with elements of u arranged vertically, we have,
[ ]
2 2 2
3
' 3 6 9 6 (3) (6) (9)
9
u u
1
1
+ +
1
1
]
Note that the product uu gives the sum of squares of the elements of u.
In general, if u = [ u
1
u
2
u
n
], then uu will be the sum of squares (a scalar) of the
elements of u
j.
2 2 2 2
1 1
1
'
n
n j
j
u u u u u u
+ + +
L
Linear Dependence
A set of vectors v
1
, ,v
n
is linearly dependent if and only if any one of them can be
expressed as a linear combination of the remaining vectors; otherwise, they are linearly
independent.
Example 4. The three vectors
1 2 3
2 1 4
, ,
7 8 5
v v and v
1 1 1
1 1 1
] ] ]
are linear dependent because v3 is a linear combination of v1 and v2:
1 2 3
6 2 4
3 2
21 16 5
v v v
1 1 1
1 1 1
] ] ]
or 3v
1
2v
2
-v
3
=0
where
0
0
0
1
1
]
represents a null vector (also called zero vector)
Example 5. v
1
=[5 12] and v
2
= [10 24] are linearly dependent because
9
2v
1
= 2[5 12] = [10 24] = v
2
or 2v
1
-v
2
=
0
A set of m-vectors v
1
, ,v
n
is linearly dependent if and only if there exists a set of
scalars k
1
, , k
n
(not all zero) such that
1
0
n
i i
i
k v
1 1
1 1
] ]
1 1
1 1
] ]
Example: Let u be a 1x3 (a row vector); then the corresponding column vector u must
be 3x1. The product uu will be 1x1 but the product uu will be 3x3. Thus obviously,
uu uu.
Exceptions:
- A is a square matrix and B is an identity matrix
- A is the inverse of B, A = B
-1
- scalar multiplication: kA=Ak
Associative Law: (AB)C=A(BC)=ABC
Conformability condition: A is mxn, B is n xp, C is pxq
Distributive Law: A(B+C) = AB + AC [premultiplication by A]
(B+C)A = BA + CA [postmultiplication by A]
4.5 IDENTITY MATRICES AND NULL MATRICES
2 3
1 0 0
1 0
0 1 0
0 1
0 0 1
I I
1
1
1
1
1
]
1
]
Characteristics:
like number 1: a(1) = (1)a=a
IA = AI = A
Example: Let
1 2 3
2 0 3
A
1
1
]
11
Special Nature of I Matrices
- it is possible to insert or delete an I w/o affecting the matrix product.
2
( )
Interesting case: if:
( )
( )
mxn nxn nxp
n
n n n
k
n n
A I B AI B AB
A I
AI I I
I I
1 1
1 1 1
1 1
( )
( )
( ') ( ) '
A A
AB B A
A A
1 1
AA AA I
1
2
3
6 3 1 22
1 4 2 12
4 1 5 10
x
A x x d
x
1 1 1
1 1 1
1 1 1
1 1 1
] ] ]
4.4, p.56
13
1
2
3
18 16 10 2
1
13 26 13 3
52
17 18 21 1
x
x
x
1 1 1
1 1 1
1 1 1
1 1 1
] ] ]
One way of finding the solution of a linear equation system Ax=d, where the
coefficient matrix is nonsingular, first find A
-1
, and then post multiply A
-1
by the
constant vector d. The product A
-1
d will then give the solution values of the
variables.
14