APPENDIX A
LONGITUDINAL DATA ANALYSIS
Appendix A: Fun Matrix Facts
For convenience, we summarize several useful matrix facts here.
SQUARE MATRIX RESULTS: Let A and B be square matrices of the same dimension. Inverses
below are assumed to exist.
• (AB)−1 = B −1 A−1 , (A−1 )T = (AT )−1 .
• We denote the determinant of A by |A|.
• |A| = |AT |, |A| = 1/|A−1 |
• |AB| = |A||B|
• (A + B)−1 = A−1 − A−1 (A−1 + B −1 )−1 A−1
• (A + CBD)−1 = A−1 − A−1 C(B −1 + DA−1 C)−1 DA−1 . Here, A and B need not be of the same
dimension, and C and D are conformable matrices.
• The following are equivalent: (i) A is nonsingular , (ii) |A| =
6 0, (iii) A−1 exists.
• We denote the trace of a square matrix A by tr(A).
• tr(A) = tr(AT ), tr(bA) = btr(A)
• tr(A + B) = tr(A) + tr(B), tr(AB) = tr(BA)
• If A is (n × n) and x is (n × 1), then the quadratic form
x T Ax
and A are nonnegative definite if x T Ax ≥ 0. The quadratic form and A are positive definite
if x T Ax > 0. If A is positive definite, then it is symmetric and nonsingular (so its inverse exists).
• x T Ax = tr(Axx T )
• If x is a random vector with mean µ and covariance matrix V , then
E(x T Ax) = tr{E(xx T )A} = tr(V A) + µT Aµ = tr(AV ) + µT Aµ.
APPENDIX A
LONGITUDINAL DATA ANALYSIS
vec and vech NOTATION:
• For a (n × r ) matrix A, vec(A) is defined as the (nr × 1) vector consisting of the r columns of A
stacked in the order 1, ... , r .
• If furthermore A is (n × n) and symmetric, then vec(A) contains redundant entries. The vech(·)
operator yields the column vector containing all the distinct entries of A by stacking the lower
diagonal elements; e.g., for n = 3,
a11 a12 a13
A = a12 a22 a23
a13 a23 a33
and vech(A) =
a11
a12
a13
a22
a23
.
a33
• For matrices A (a × a), B, C, D,
(i) tr(AB) = {vec(A)}T {vec(B T )} = {vec(AT )}T {vec(B)}.
(ii) tr(ABD T C T ) = {vec(A)}T (B ⊗ C)vec(D), where ⊗ represents Kronecker product.
(iii) For A symmetric, there is a relationship between vec(A) and vech(A). In particular, there
exists a unique matrix Φ of dimension {a2 × a(a + 1)/2} such that
vec(A) = Φvech(A).
Clearly, Φ is unique and of full column rank, as there is only one way to write the distinct
elements of A in a full, redundant vector.
APPENDIX A
LONGITUDINAL DATA ANALYSIS
INVERSE OF PARTITIONED MATRIX: Consider a generic (k × k ) matrix
C 11 C 12
,
C=
C 21 C 22
where the C ij are submatrices such that C 11 is (k1 × k1 ) and C 22 is (k2 × k2 ) such that k = k1 + k2 ,
−1
and C −1
11 and C 22 exist, as do all other inverses below. Then
D
D
11
12
,
C −1 =
D 21 D 22
where
−1
D 11 = (C 11 − C 12 C −1
22 C 21 )
−1
−1
−1
D 22 = (C 22 − C 21 C −1
= C −1
11 C 12 )
22 + C 22 C 21 D 11 C 12 C 22
−1
D 12 = −C −1
11 C 12 D 22 = −D 11 C 12 C 22
D 21 = −C −1
22 C 21 D 11 .
MATRIX DIFFERENTIATION: Let x be a (n × 1) vector depending on a (p × 1) vector β, and let A be
a (n × n) square matrix.
• For quadratic form Q = x T Ax, ∂Q/∂x = 2Ax. Note that this is a (n × 1) vector.
• The chain rule then gives ∂Q/∂β = (∂x/∂β)(∂Q/∂x). Note that ∂x/∂β is a (p × n) matrix.
Let V (ξ) be a (n × n) nonsingular matrix depending on a (q × 1) (parameter) vector ξ.
• If ξk is the k th element of ξ, then ∂/∂ξk V (ξ) is the (n × n) matrix whose (`, p) element is the
partial derivative of the (`, p) element of V (ξ) with respect to ξk .
h
i
• ∂/∂ξk {log |V (ξ)|} = tr V −1 (ξ){∂/∂ξk V (ξ)} .
• ∂/∂ξk V −1 (ξ) = −V −1 (ξ) {∂/∂ξk V (ξ)} V −1 (ξ).
• For quadratic form Q = x T V (ξ)x, ∂Q/∂ξk = x T {∂/∂ξk V (ξ)}x. Thus, from the previous result,
∂/∂ξk {x T V −1 (ξ)x} = −x T V −1 (ξ) {∂/∂ξk V (ξ)} V −1 (ξ)x.
© Copyright 2026 Paperzz