Professional Documents
Culture Documents
how to take derivatives with respect to vectors. The proofs are beyond the scope of the course, but this handout might still be helpful in illustrating how to make basic operations with matrices and vectors.
A scalar-based function y = f (x1 ; x2 ; :::; xk ) can be expressed in vector form by y = f (x) where bold denotes a vector. x has dimesions (k y = a0 x where a is a (k 1) vector. 6 7 i6 x 7 6 2 7 7 = a1 x1 + a2 x2 + ::: + ak xk ::: ak 6 6 ::: 7 4 5 xk 2 x1 3 1). A linear function y = a1 x1 + a2 x2 + ::: + ak xk can also be expressed in matrix algebra form by
y=
a1 a2
Notice that with linear functions we have y = a0 x = x0 a. Multiply the matrices in the 2nd way to convince yourself. The vector of partial derivatives of function f (x) with respect to vector x is dened by 2
@y @x1 @y @x2
In the linear vector function case it is easy to prove that 6 7 6 6 7 6 6 7 6 =6 7=6 6 ::: 7 6 4 5 4
@y @xk
6 7 7 @f (x) 6 6 7 =6 7 6 ::: 7 @x 4 5
@y @xk
@f (x) @x
=a 2 a1 3
@f (x) @x
@y @x1 @y @x2
:::
@(a1 x1 +a2 x2 +:::+ak xk ) @xk
Property 1. Hence, the property that we have just proved is that @a0 x =a @x 1
1) vectors.
Let us now check whether this applies for a system of linear equations. Consider matrix A of dimensions (4 3), and vector x is (3 1). Now we have a system of linear regressions: y = Ax Notice that y is now bold because is also a vector (4 of linear equations: 2 3 2 3 1). That why we say we have a system s 2 3 7 7 7 7 7 5
7 6 6 6 y 7 6 a 6 2 7 6 21 a22 a23 y=6 7=6 6 y3 7 6 a31 a32 a33 5 4 4 a41 a42 a43 y4
y1
What does it mean to take derivatives of y with respect to x? Notice that they are both vectors. In other words y = Ax is actually a system of equations. Finding the rst order derivatives is actually taking the derivative of each equation, with respect to each variable. Hence, the result is necessarily a matrix. 2
@y1 @x1 @y1 @x2 @y1 @x3 @y2 @x1 @y2 @x2 @y2 @x3 @y3 @x1 @y3 @x2 @y3 @x3 @y4 @x1 @y4 @x2 @y4 @x3
@y @x
@y1 @x
@y2 @x
@y3 @x
@y4 @x
6 =6 4
where the rst equality follows by denition and the last two equalities are the application to our linear case. Property 2. Hence, this proofs the second property @Ax = A0 @x where A is a matrix (h k), and x is a vector (k 1).
Now consider the following quadratic form: q = x0 Ax where A is a symmetric matrix (k quadratic form). Then, it can be shown that: k), and x is a vector (k 1). (This is the denition of a
Property 3.
where A is a matrix (k
For further information I attach some derivations that you can nd in "William H. Greene (2005) Econometric Analysis. Pearson Education, New York NY."