CS代考计算机代写 Solution of Exercise 1

Solution of Exercise 1
Prof. Dr. Dominik Liebl
􏱫1 −2􏱬 􏱫3 −6􏱬 3· 5 7 = 15 21
It holds that
=
The matrices D and E are not defined.
Solution of Exercise 2
Remember:
A =
B =
C =
F =
G =
H =
􏱩3 1􏱪+􏱩−2 −3􏱪=􏱩1 −2􏱪
􏱫3 1􏱬􏱫6 7 −3􏱬 􏱫16 20 −5􏱬
Econometrics Solution 1 (Ch. 2)
2 0 −2 −1 4 = 12 14 −6 􏱫3􏱬􏱩 􏱪 􏱫3 27􏱬
7 1 9 = 7 63
􏱩 􏱪􏱫 3 5􏱬􏱫−3􏱬 􏱩 􏱪􏱫−3􏱬
−4 2 −9 7 −9 = −30 −6 −9 =144
􏱫6 3 −3􏱬′􏱫1 −8 −4􏱬 6 4􏱫1 −8 −4􏱬
4 1 2 7 5 2 =3 17 5 2 −3 2
34 −28 −16 10 −19 −10 11 34 16
• The rank of a matrix can be defined as the maximal number of linearly independent columns of the matrix.
• If A is a (n × m) dimensional matrix, then rank(A) = min{m, n}.
• A column vector is said to be linearly dependent if it can be written as a linear combination of the
other column vectors.
• A set of column vectors {v1, . . . , vp} is said to be linearly independent if the vector equation
c1v1 +···+cpvp =0
has only the trivial solution c1 = ··· = cp = 0. Otherwise, the set of column vectors is linearly
dependent.
Solution: One can compute the rank of a matrix using R as following:
1

library(“Matrix”)
A <- rbind(c(1, 0, 3, 2), c(5, 0,-1,-6), c(4, 0, 2,-2)) B <- rbind(c(1, -1), c(-1, 0)) rankMatrix(A)[1] ## [1] 2 rankMatrix(B)[1] ## [1] 2 Explanations: Matrix A has rank 2, since with the zero vector the set of column vectors of A is always linearly dependent. Moreover, the first column of A can be expressed as a linear combination of the third and the fourth column; A[,1] == A[,3] - A[,4] ## [1] TRUE TRUE TRUE Matrix B has rank 2 since both column vectors are linearly independent. Solution of Exercise 3 Remember: A (n × n) matrix D−1 is called the inverse of a (n × n) matrix D, if D−1D = DD−1 = In. In exercise 3 we are asked whether the inverse of AB, i.e. (AB)−1, equals A−1B−1. So, we have to check the following two statements: 1. (B−1A−1)(AB) = In 2. (AB)(B−1A−1) = In To 1. To 2. (B−1A−1)(AB) = B AA−1 B−1 = BB−1 = In 􏱟 􏱞􏱝 􏱠 =In (AB)(B−1A−1) = A BB−1 A−1 = AA−1 = In 􏱟 􏱞􏱝 􏱠 =In So, (B−1A−1) is indeed the inverse of (AB), i.e., (AB)−1 = (B−1A−1). Solution of Exercise 4 a) (AB)′(B−1A−1)′ = B′A′(A−1)′(B−1)′ = B′ A′A′−1 B′−1 􏱟 􏱞􏱝 􏱠 =In =B′B′−1 =In 􏱟 􏱞􏱝 􏱠 =In b) (A(A−1 +B−1)B)(B+A)−1 =((AA−1 +AB−1)B)(B+A)−1 =(B+AB−1B)(B+A)−1 = (B+ A)(B + A)−1 = In 􏱟 􏱞􏱝 􏱠 􏱟 􏱞􏱝 􏱠 =In =In 2 Solution o Exercise 5 Solution of Exercise 6 X=􏱭x1 x2···xn􏱮′ (n×m) (m×1) (m×1) (m×1) X′X =􏱩x1 x2 ··· xn􏱪·􏱩x1 x2 ··· xn􏱪′ (m×m)  x ′1  x′  􏱩 􏱪 ·2 =x1 x2 ··· xn ··  ·  x′n =x1x′1 +x2x′2 +···+xnx′n (m×m) (m×m) n =􏱛xix′i i=1 (m×m) nn 􏱛(xi − x)(yi − y) = i=1 􏱛(xiyi−xiy−xyi+xy) i=1 nnn = 􏱛xiyi −y􏱛xi −x􏱛yi +nxy i=1 i=1 i=1 nn = 􏱛xiyi −ynx−x􏱛yi +nxy i=1 i=1 nn = 􏱛xiyi−x􏱛yi i=1 i=1 n = 􏱛(xiyi − xyi) i=1 n = 􏱛(xi−x)yi i=1 Note that by similar arguments one can show that and that nn 􏱛(xi −x)(yi −y)=􏱛(yi −y)xi i=1 i=1 nnn 􏱛(xi −x)2 =􏱛(xi −x)(xi −x)=􏱛(xi −x)xi. i=1 i=1 i=1 3