Munich Personal RePEc Archive
A note on matrix differentiation
Kowal, Pawel
December 2006
A note on matrix differentiation
Paweł Kowal
July 9, 2007
Abstract
This paper presents a set of rules for matrix differentiation with respect to a vector of parameters, using the flattered representation of derivatives, i.e. in form of a matrix. We also introduce a new set of Kronecker tensor products of matrices. Finally we consider a problem of differentiating matrix determinant, trace and inverse.
JEL classification: C00
Keywords: matrix differentiation, generalized Kronecker products
1
Introduction
Derivatives of matrices with respect to a vector of parameters can be ex-pressed as a concatenation of derivatives with respect to a scalar parameters. However such a representation of derivatives is very inconvenient in some applications, e.g. if higher order derivatives are considered, and or even are not applicable if matrix functions (like determinant or inverse) are present. For example finding an explicit derivative of det(∂X/∂θ) would be a quite complicated task. Such a problem arise naturally in many applications, e.g. in maximum likelihood approach for estimating model parameters.
The same problems emerges in case of a tensor representation of deriva-tives. Additionally, in this case additional effort is required to find the flat-tered representation of resulting tensors, which is required, since running numerical computations efficiently is possible only in case of two dimensional data structures.
we introduce a new set of the Kronecker matrix products as well as the gener-alized matrix transposition. Then, first order and higher order derivatives of functions being compositions of primitive function using elementary matrix operations like summation, multiplication, transposition and the Kronecker product, can be expressed in a closed form based on primitive matrix func-tions and their derivatives, using these elementary operafunc-tions, the generalized Kronecker products and the generalized transpositions.
We consider also more general matrix functions containing matrix tions (inverse, trace and determinant). Defining the generalized trace func-tion we are able to express derivatives of such funcfunc-tions in closed form.
2
Matrix differentiation rules
Let as consider smooth functions Ω ∋ θ 7→ X(θ) ∈ Rm×n
, Ω ∋ θ 7→
Y(θ)∈Rp×q
, whereΩ⊂Rkis an open set. FunctionsX, Y associate am×n
and p×q matrix for a given vector of parameters,θ = col(θ1, θ2, . . . , θk). Let
the differential of the function X with respect to θ is defined as
∂X ∂θ =
£ ∂X ∂θ1
∂X ∂θ2 . . .
∂X ∂θk
¤
for ∂X/∂θi ∈Rm×n,i= 1,2, . . . , k.
Proposition 2.1. The following equations hold
1. ∂θ∂(αX) =α∂X ∂θ
2. ∂θ∂(X+Y) = ∂X∂θ +∂Y∂θ
3. ∂θ∂(X×Y) = ∂X∂θ ×(Ik⊗Y) +X×∂Y∂θ
where α ∈ R and Ik is a k ×k dimensional identity matrix, assuming that
differentials exist and matrix dimensions coincide.
Proof. The first two cases are obvious. We have
∂
∂θ(X×Y) =
£ ∂X
∂θ1 ×Y +X×
∂Y ∂θ1 . . .
∂X
∂θk ×Y +X× ∂Y ∂θk
¤
=£ ∂X ∂θ1 . . .
∂X ∂θk
¤
×
Y · · · 0
... ... ...
0 · · · Y
+X× £ ∂Y
∂θ1 . . .
∂Y ∂θk
¤
= ∂X
∂θ ×(Ik⊗Y) +X× ∂Y
Differentiating matrix transposition is a little bit more complicated. Let us define a generalized matrix transposition
Definition 2.2. Let X = [X1, X2, . . . Xn], where Xi ∈ Rp×q, i = 1,2, . . . , n
is a p×q matrix is a partition of p×nq dimensional matrix X. Then
Tn(X)=.
£
X′ 1, X
′
2, . . . , X ′
n
¤
Proposition 2.3. The following equations hold 1. ∂θ∂(X′
) = Tk(∂X∂θ)
2. ∂θ∂(Tn(X)) = Tk×n(∂X∂θ)
Proof. The first condition is a special case of the second condition forn = 1. We have
∂
∂θ(T(n)(X)) =
£
T(n)(∂θ∂X1) . . . T(n)(∂X∂θk) ¤
=h ∂X1′
∂θ1, . . . ,
∂X′
n ∂θ1 . . .
∂X′
1
∂θk, . . . , ∂X′
n ∂θk
i
= T(k×n)
³∂X
∂θ
´
since
∂X ∂θ =
£ ∂X1
∂θ1, . . . ,
∂Xn ∂θ1 . . .
∂X1
∂θk, . . . , ∂Xn
∂θk
¤
Let us now turn to differentiating tensor products of matrices. Let for any matrices X, Y, where X ∈ Rp×q
is a matrix with elements xij ∈ R for
i= 1,2, . . . , p,j = 1,2, . . . , q. The Kronecker product, X⊗Y is defined as
X⊗Y =.
x11Y · · · x1qY
... . .. ...
xp1Y · · · xpqY
Similarly as in case of differentiating matrix transposition we need to intro-duce the generalized Kronecker product
Definition 2.4. Let X = [X1, X2, . . . Xm], where Xi ∈Rp×q, i= 1,2, . . . , m
is a p×q matrix is a partition of p×mq dimensional matrix X. Let Y = [Y1, Y2, . . . Yn], whereYi ∈Rr×s, i= 1,2, . . . , nis a r×s matrix is a partition
of r×ns dimensional matrix Y. Then
X⊗1nY = [. X⊗Y1, . . . , X⊗Yn]
X⊗mn Y
.
= [X1⊗1nY, . . . , Xm⊗1nY]
X⊗1,m2,...,ms n1,n2,...,ns Y
.
= [X⊗m2,...,ms
n2,...,ns Y1, . . . , X⊗
m2,...,ms n2,...,ns Yn1] X⊗m1,m2,...,ms
n1,n2,...,ns Y
.
= [X1⊗n1,m1,n22,...,m,...,nss Y, . . . , Xm1 ⊗
1,m2,...,ms n1,n2,...,nsY]
Proposition 2.5. The following equations hold
1. ∂θ∂(X⊗Y) = ∂X∂θ ⊗Y +X⊗1
k ∂Y∂θ
2. ∂θ∂(X⊗m1,...,ms n1,...,ns Y) =
∂X ∂θ ⊗
k,m1,...,ms
1,n1,...,ns Y +X⊗
1,m1,...,ms k,n1,...,ns
∂Y ∂θ
Proof. We have
∂ ∂θ(X⊗
m1,...,ms n1,...,ns Y) =
£ ∂
∂θ1(X⊗
m1,...,ms
n1,...,ns Y) · · · ∂ ∂θk(X⊗
m1,...,ms n1,...,ns Y)
¤
=£ ∂X ∂θ1 ⊗
m1,...,ms
n1,...,ns Y · · · ∂X ∂θk ⊗
m1,...,ms n1,...,ns Y
¤
+£
X⊗m1,...,ms n1,...,ns
∂Y
∂θ1 · · · X⊗
m1,...,ms n1,...,ns
∂Y ∂θk
¤
= ∂X
∂θ ⊗
k,m1,...,ms
1,n1,...,ns Y +X⊗
1,m1,...,ms k,n1,...,ns
∂Y ∂θ
SinceX⊗Y =X⊗1
1Y, in case of the standard Kronecker product we obtain
∂
∂θ(X⊗Y) = ∂X
∂θ ⊗
k
1Y +X⊗1k
∂Y ∂θ =
∂X
∂θ ⊗Y +X⊗
1
k
∂Y ∂θ
In proposition 2.1 we have omitted the case of multiplication of a matrix by a scalar function, using proposition 2.5 we obtain
Proposition 2.6. Let α is a scalar function of θ and X is a matrix valued function of θ, X(θ)∈Rp×q
. Then
∂
∂θ(αX) =α× ∂X
∂θ + ∂α ∂θ ⊗X
Proof. Expression αX can be represented as αX = (α⊗Ip)×X, where Ip
is a p×p dimensional identity matrix. Hence
∂
∂θ(αX) = ∂
∂θ((α⊗Ip)×X) =
∂(α⊗Ip)
∂θ ×(Ik⊗X) + (α⊗Ip)× ∂X
∂θ
= (∂α
∂θ ⊗Ip)×(Ik⊗X) +α× ∂X
∂θ = ∂α
∂θ ⊗X+α× ∂X
∂θ
LetS is a set of smooth matrix valued functions Ω∋ θ 7→X(θ)∈Rp×q
Let ext(S) is a set of functions obtained by applying elementary matrix operations on the set S, i.e. ext(S) is a smallest set such that if X, Y ∈
ext(S), then matrix valued functions X+Y, X×Y, Tn(X), X⊗mn11,...,n,...,mss Y
if exist belong to ext(S), where n, n1, . . . , ns, m1, . . . , ms are any positive
integers.
Theorem 2.7. dif(ext(S)) = ext(S ∪dif(S)).
Proof. By induction using propositions 2.1, 2.3, 2.5, 2.6.
The theorem 2.7 states, that derivatives of matrix valued functions ob-tained by applying elementary operations like summation, matrix multi-plication, generalized transposition and generalized Kronecker tensor prod-uct can be expressed as a combination of these functions and their deriva-tives using these elementary operations. Applying the theorem 2.7 to a set
T = dif(ext(S)) we can see that also higher order derivatives can be ex-presses, using these elementary operations, as combinations of elementary functions S and their higher order derivatives.
3
Derivatives of matrix determinant, trace and
inverse
Let us consider derivatives of matrix inverse, determinant and trace. We need to introduce the generalized trace defined analogously as the generalized transposition.
Definition 3.1. Let X = [X1, X2, . . . Xn], where Xi ∈ Rp×p, i = 1,2, . . . , n
is a p×p matrix, is a partition of p×np dimensional matrix X. Then
trn(X)=.
£
trX1,trX2, . . . ,trXn
¤
Proposition 3.2. The following equations hold
1. ∂det(∂θX) = det(X)×trk(X−1× ∂X∂θ)
2. ∂trn(X)
∂θ = trk×n(∂X∂θ)
3. ∂X∂θ−1 =−X−1
Proof. We have
∂det(X)
∂θ =
h
∂det(X)
∂θ1 . . .
∂det(X)
∂θk
i
=£
det(X) tr(X−1
× ∂X
∂θ1) . . . det(X)×tr(X
−1
× ∂X ∂θk)
¤
= det(X)×trk(X
−1
× ∂X
∂θ ) ∂trn(X)
∂θ =
h
∂trn(X) ∂θ1 . . .
∂trn(X) ∂θk
i
=£
trn(∂θ∂X1) . . . tr(∂θ∂X k)
¤
= trk×n(
∂X ∂θ )
Similarly
∂X−1
∂θ =
h
∂X−1
∂θ1 . . .
∂X−1
∂θk
i
=−£
X−1∂X
∂θ1X
−1
. . . X−1∂X
∂θkX
−1 ¤
=−X−1
×£ ∂X ∂θ1 . . .
∂X ∂θk
¤
×(Ik⊗X
−1
) = −X−1∂X
∂θ (Ik⊗X
−1
)
since in case of scalar parameterθ ∈R,∂det(X)/∂θ = det(X) tr(X−1
∂X/∂θ),
∂tr(X)/∂θ = tr(∂X/∂θ), and∂X−1
/∂θ =−X−1
(∂X/∂θ)X−1
(see for exam-ple Petersen, Petersen, (2006)).
Let a set S and operation dif are defined as in the previous section. Let ext2(S) is a set of functions obtained by applying elementary matrix
operations and matrix determinant, trace and inverse on the setS, i.e. ext(S)
is a smallest set such that if X, Y ∈ ext2(S), then matrix valued functions
X +Y, X×Y, Tn(X), X⊗mn11,...,n,...,mss Y, det(X), trn(X), X
−1
if exist belong to ext2(S), wheren, n1, . . . , ns, m1, . . . , ms are any positive integers.
Theorem 3.3. dif(ext2(S)) = ext2(S ∪dif(S)).
Proof. By induction using propositions 2.1, 2.3, 2.5, 2.6, 3.2.
4
Derivatives of function composition
Letf is a matrix valued function given by
Rp ∋x7→f(x)∈Rm×n
and g is a vector valued function Ω ∋ θ 7→ g(θ) ∈ Rp. We can define a
function composition Ω∋θ7→f(g(θ))∈Rm×n
.
Proposition 4.1. The following condition holds
∂
∂θf(g(θ)) =
∂f(g(θ))
∂x ×
³∂g(θ)
∂θ ⊗In
Proof. Let
f(x) =
f11(x) . . . f1n(x)
... . .. ...
fm1(x) . . . fmn(x)
where fij(x) are scalar valued functions. Then for s = 1, . . . , k
∂fij(x)
∂θs =
p
X
k=1
∂fij(x)
∂xk
×∂xk
∂θs
= ∂fij(x)
∂x × ∂x ∂θs
since ∂x/∂θs is a column vector. Further
f(x)
∂θs = p X k=1
∂f11(x)
∂xk . . .
∂f1n(x) ∂xk
... . .. ...
∂fm1(x)
∂xk . . .
∂fmn(x) ∂xk × ∂xk ∂θs = p X k=1
∂f(x)
∂xk
× ∂xk
∂θs
=h ∂f∂x(x1) . . . ∂f∂x(x)
p i ×
In× ∂x∂θs1
...
In× ∂x∂θsp
=
∂f(x)
∂x ×( ∂x ∂θs
⊗In)
Finally
f(x)
∂θs
= ∂f(x)
∂x ×
£ ∂x
∂θ1 ⊗In . . .
∂x ∂θk ⊗In
¤
= ∂f(x)
∂x ×( ∂x ∂θ ⊗In)
5
Properties of the generalized Kronecker
prod-uct
Proposition 5.1. For any matrices A, B
1. A⊗k
1 B =A⊗B.
2. A⊗...,...,n1,k1,,...1,...B =A⊗...,mk,... ...,nk,... B.
3. A⊗...,1,1,...
...,nk,nk+1,...B =A⊗
...,1,...
...,nk×nk+1,...B.
4. A⊗...,mk,mk+1,...
...,1,nk+1,... B =A⊗
...,mk×mk+1,...
...,nk+1,... B.
Proposition 5.2. For any matrices A, B, C
1. A⊗m1,...,mk
n1,...,nk (B+C) =A⊗
m1,...,mk
n1,...,nk B +A⊗
m1,...,mk n1,...,nk C.
2. (A+B)⊗m1,...,mk
n1,...,nk C =A⊗
m1,...,mk
n1,...,nk C+B⊗
m1,...,mk n1,...,nk C.
assuming that the Kronecker products exist and matrix dimensions coincide.
Proposition 5.3. For any matrices A, B, C, D
(AB)⊗m1,...,ms
n1,...,ns (CD) = (A⊗C)×(B⊗
m1,...,ms n1,...,ns D)
assuming that products AB and CD, as well as Kronecker products exist.
Proof. Observe that X⊗m1,...,ms
n1,...,ns Y =X⊗
m1,...,ms,1
n1,...,ns,1 Y, and (AB)⊗
1
1 (CD) =
(A ⊗ C) × (B ⊗1
1 D), since (AB) ⊗ (CD) = (A ⊗ C) × (B ⊗ D). Let
(AB)⊗mk,...,m1,1
nk,...,n1,1 (CD) = (A⊗C)×(B⊗
mk,...,m1,1
nk,...,n1,1 D)for k ≥0. Then
(AB)⊗1,mk,...,m1,1
nk+1,nk,...,n1,1(CD)
=£
(AB)⊗mk,...,m1,1
nk,...,n1,1 (CD1) . . . ,(AB)⊗
mk,...,m1,1
nk,...,n1,1 (CDnk+1)
¤
=£
(A⊗C)(B ⊗mk,...,m1,1
nk,...,n1,1 D1) . . . ,(A⊗C)(B⊗
mk,...,m1,1
nk,...,n1,1 Dnk+1)
¤
= (A⊗C)×(B ⊗1,mk,...,m1,1
nk+1,nk,...,n1,1D)
Similarly
(AB)⊗mk+1,mk,...,m1,1
nk+1,nk,...,n1,1 (CD)
=h (AB1)⊗n1,mk+1k,...,m,nk,...,n1,11,1(CD) . . . ,(ABmk+1)⊗
1,mk,...,m1,1
nk+1,nk,...,n1,1(CD)
i
=h (A⊗C)(B1⊗n1,mk+1k,...,m,nk,...,n1,11,1D) . . . ,(A⊗C)(Bmk+1⊗
1,mk,...,m1,1
nk+1,nk,...,n1,1D)
i
= (A⊗C)×(B ⊗mk+1,mk,...,m1,1
nk+1,nk,...,n1,1 D)
Proposition 5.4. For any matrices A, B of size p1×q1 and p2×q2
A⊗m1,...,ms
n1,...,ns B = (A⊗B)×(Iq1 ⊗
m1,...,ms n1,...,ns Iq2)
assuming that Kronecker product exists.
Proposition 5.5. For any matrices A, B, C
A⊗m1,...,ms
n1,...,ns (B⊗C) = (A⊗
m1,...,ms
n1,...,ns B)⊗C
Proof. Observe that X⊗m1,...,ms
n1,...,ns Y = X⊗
m1,...,ms,1
n1,...,ns,1 Y, and A⊗
1
1 (B⊗C) =
(A⊗1
1B)⊗C, sinceA⊗(B⊗C) = (A⊗B)⊗C. LetA⊗
mk,...,m1,1
nk,...,n1,1 (B⊗C) =
(A⊗mk,...,m1,1
nk,...,n1,1 B)⊗C for k≥0. Then A⊗1,mk,...,m1,1
nk+1,nk,...,n1,1(B⊗C)
=£
A⊗mk,...,m1,1
nk,...,n1,1 (B1⊗C) . . . , A⊗
mk,...,m1,1
nk,...,n1,1 (Bnk ⊗C)
¤
=£
(A⊗mk,...,m1,1
nk,...,n1,1 B1)⊗C . . . ,(A⊗
mk,...,m1,1
nk,...,n1,1 Bnk)⊗C
¤
= (A⊗1,mk,...,m1,1
nk+1,nk,...,n1,1B)⊗C
Similarly
A⊗mk+1,mk,...,m1,1
nk+1,nk,...,n1,1 (B⊗C)
=h A1⊗n1,mk+1k,n,...,mk,...,n1,11,1(B ⊗C) . . . , Amk+1⊗
1,mk,...,m1,1
nk+1,nk,...,n1,1(B⊗C)
i
=h (A1⊗n1,mk+1k,n,...,mk,...,n1,11,1B)⊗C . . . ,(Amk+1⊗
1,mk,...,m1,1
nk+1,nk,...,n1,1B)⊗C
i
= (A⊗mk+1,mk,...,m1,1
nk+1,nk,...,n1,1 B)⊗C
Proposition 5.6. For any matrices A, B, C A⊗(B⊗m1,...,ms
n1,...,ns C) = (A⊗B)⊗
q,m1,...,ms
1,n1,...,ns C
where q is a number of columns of the matrix A, assuming that Kronecker products exist.
Proof. Observe that X⊗m1,...,ms
n1,...,ns Y = X⊗
m1,...,ms,1
n1,...,ns,1 Y, and A⊗(B⊗
1 1 C) =
(A⊗B)⊗1
1 C = (A⊗B)⊗
q,1
1,1 C, since A ⊗(B ⊗C) = (A⊗B)⊗C and
A⊗q1C =A⊗C if the Kronecker product exists. LetA⊗(B⊗mk,...,m1,1
nk,...,n1,1 C) =
(A⊗B)⊗q,mk,...,m1,1
1,nk,...,n1,1 C for k ≥0. Let A= [A1, . . . , Aq]. Then Ai⊗(B⊗n1,mk+1k,n,...,mk,...,n1,11,1C)
=£
Ai⊗(B ⊗nmkk,...,n,...,m1,11,1C1) . . . , Ai⊗(B⊗
mk,...,m1,1
nk,...,n1,1 Cnk)
¤
=£
(Ai⊗B)⊗nmkk,...,n,...,m11,1,1C1 . . . ,(Ai⊗B)⊗
mk,...,m1,1
nk,...,n1,1 Cnk
¤
= (Ai⊗B)⊗1n,mk+1k,...,m,nk,...,n1,11,1C
Similarly
Ai⊗(B⊗
mk+1,mk,...,m1,1
nk+1,nk,...,n1,1 C)
=h Ai⊗(B1⊗n1,mk+1k,...,m,nk,...,n1,11,1C) . . . , Ai⊗(Bmk+1⊗
1,mk,...,m1,1
nk+1,nk,...,n1,1C)
i
=h (Ai⊗B1)⊗n1,mk+1k,...,m,nk,...,n1,11,1C . . . ,(Ai⊗Bmk+1)⊗
1,mk,...,m1,1
nk+1,nk,...,n1,1 C
i
Finally,
A⊗(B⊗mk+1,mk,...,m1,1
nk+1,nk,...,n1,1 C)
=h A1⊗(B⊗nmkk+1+1,n,mkk,...,n,...,m1,11,1 C) . . . , Aq⊗(B ⊗
mk+1,mk,...,m1,1
nk+1,nk,...,n1,1 C)
i
=h (A1⊗B)⊗
mk+1,mk,...,m1,1
nk+1,nk,...,n1,1 C) . . . ,(Aq⊗B)⊗
mk+1,mk,...,m1,1
nk+1,nk,...,n1,1 C)
i
= (A⊗B)⊗q,mk+1,mk,...,m1,1
1,nk+1,nk,...,n1,1 C
Proposition 5.7. Let A is m×n matrix. Let B is p×q matrix. Then
A⊗1qB = (Im⊗p1Ip)×(B⊗A)
Proof. LetAi is i-th column of AandBj is j-th column ofB. Let Ik
p denotes
k-th column ofp×pidentity matrix and letBi
j denotes element of B atj-th
row and i-th column. Then
(Im⊗1pIp)×(Bj⊗Ai) =
£
Im⊗Ip1 . . . Im⊗Ipp
¤
×
B1jAi
. . . Bj
pAi
= p
X
r=1
(Im⊗Ipr)×(Ai⊗Brj) = p
X
r=1
Ai⊗(Ipr×Brj) = Ai⊗Bj
Further
(Im⊗1pIp)×(Bj⊗A) = (Im⊗1p Ip)×
£
Bj ⊗A1 . . . Bj⊗An ¤
=£
A1⊗Bj . . . An⊗Bj ¤
=A⊗Bj
(Im⊗1pIp)×(B⊗A) = (Im⊗1pIp)×
£
B1⊗A . . . Bq⊗A ¤
=£
A⊗B1 . . . A⊗Bq ¤
=A⊗1
qB
Proposition 5.8. Let A is m×n matrix. Let B is p×q matrix. Then
A⊗1,n1,...,1,ns,1
m1,1,...,ms,1,q/m¯ B = (Im⊗
1
pIp)×(B⊗nm11,...,n,...,mss A)
Proof. Proposition holds for s= 0. Let for any s≥0A⊗1,ns,...,1,n1
ms,1,...,m1,1,q/m¯sB = (Im⊗1pIp)×(B ⊗nmss,...,n,...,m11 A), wherem¯s =m1× · · · ×ms. Then
(Im⊗1pIp)×(B⊗n1,ms+1s,...,m,ns,...,n1 1 A)
= (Im⊗1pIp)×
£
B⊗ms,...,m1
ns,...,n1 A1 . . . B⊗
ms,...,m1
ns,...,n1 Ans+1
¤
=h A1⊗m1,ns,s1,...,,...,m1,n11,,11,q/m¯s B . . . Ans+1⊗
ns,...,n1,1
ms,...,m1,q/m¯sB
i
=A⊗1,ns+1,1,ns,...,1,n1,1
1,1,ms,1,...,m1,1,q/m¯s B
and
(Im⊗1pIp)×(B ⊗nmss+1+1,n,ms,...,ns,...,m11 A)
= (Im⊗1pIp)×
£
B1⊗n1,ms+1s,...,m,ns,...,n1 1 A . . . Bms+1 ⊗
1,ms,...,m1
ns+1,ns,...,n1 A
¤
=h A⊗1,ns+1,1,ns,...,1,n1,1
1,1,ms,1,...,m1,1,q/m¯s+1B1 . . . A⊗
1,ns+1,1,ns,...,1,n1,1
1,1,ms,1,...,m1,1,q/m¯s+1 Bms+1
i
=A⊗1,ns+1,1,ns,...,1,n1,1
ms+1,1,ms,1,...,m1,1,q/m¯s+1 B
Proposition 5.9.
(Im⊗1qIq)
−1
=Iq⊗1mIm
Proof. Observe that (Im⊗1qIq) is an orthogonal matrix since this matrix can
be obtained permuting columns of the matrix Imq. Hence (Im ⊗1q Iq)−1 = (Im⊗1qIq)T. Further
(Im⊗1qIq)T =
Im⊗(Iq1)T
. . . Im⊗(Iqq)T
=
(I1
q)T ⊗1mIm
. . .
(Iq
q)T ⊗1mIm
=Iq⊗1mIm
The second equality can be shown using for example proposition 5.7.
Proposition 5.10.
(Im⊗knIq)
−1
= (Inm⊗nkq/nIq/n)×(Ikq⊗km/kIm/k)
assuming that the Kronecker product exists.
Proof. Observe that(Im⊗1nIq)is an orthogonal matrix since this matrix can
(Im⊗1nIq)T. Further
In⊗(Iq/n⊗1mIm)×(Im⊗1nIq)T =
(Iq/n⊗1mIm)×Im⊗(Iq1)T
. . .
(Iq/n⊗1mIm)×Im⊗(Iqn)T
=
(I1
q)T ⊗1mIm
. . .
(In
q)T ⊗1mIm
=Iq⊗1mIm
The second equality can be shown using for example proposition 5.7. Hence
(Im⊗1nIq)
−1
=³In⊗(Iq/n⊗1mIm)
−1´
×(Iq⊗1mIm)
=³In⊗(Im⊗1q/nIq/n)
´
×(Iq⊗1mIm) = (Inm⊗nq/nIq/n)×(Iq⊗1mIm)
Further ³
Im⊗knIq
´−1
=³(Ik⊗Im/k)⊗k,1,n1Iq
´−1
=³Ik⊗(Im/k⊗1nIq)
´−1
=Ik⊗
³
(Inm/k⊗nq/nIq/n)×(Iq⊗1m/kIm/k)
´
=Ik⊗(Inm/k⊗nq/nIq/n)×Ik⊗(Iq⊗1m/k Im/k) = (Inm⊗nkq/nIq/n)×(Ikq⊗km/kIm/k)
Proposition 5.11. Let A is m×n matrix. Let B is p×q matrix. Then
A⊗B = (Im⊗1pIp)×(B⊗A)×(Iq⊗1nIn)
Proof.
(Im⊗1pIp)×(B⊗A) =A⊗1qB = (A⊗B)×(In⊗1qIq) = (A⊗B)×(Iq⊗1nIn)
−1
6
Concluding remarks
References
[1] T.P. Minka. Old and new matrix algebra useful for statistics. notes, December 2000.