820 CHAPTER 39. STATISTICAL TESTS

and so

M (t,s) =1

det(I−2σ2tA−2σ2sB)1/2 =1

det(I−2σ2tA)1/2

1

det(I−2σ2sB)1/2

= M (t,0)M (0,s)

which shows that the two quadratic forms XT AX,XT BX are independent.In fact this is true the other direction. Suppose the two quadratic forms are independent.

Thus M (t,0)M (0,s) = M (t,s). Then this requires

1

det(I−2σ2tA−2σ2sB)1/2 =1

det(I−2σ2tA)1/2

1

det(I−2σ2sB)1/2

and so

det(I−2σ

2tA−2σ2sB)

= det(I−2σ

2tA)

det(I−2σ

2sB)

= det(I−2σ

2tA−2σ2sB+4σ

4tsAB)

This is to hold for all |t| , |s| small enough. However, if AB ̸= 0, the polynomial on the rightwill be of degree 2n while the one on the left will be of degree n. Therefore, these cannotbe equal. The details follow.

From the definition of the determinant, the left side is

∑r1···rn

sgn(r1 · · ·rn)(δ 1r1 −2σ

2tA1r1 −2σ2sB1r1

)· · ·(δ nr1 −2σ

2tAnr1 −2σ2sBnr1

)This expression is of the form ∑p+q≤n akt psq. However, similar reasoning gives

det(I−2σ

2tA−2σ2sB+4σ

4tsAB)

is of the form ∑p+q≤2n bkt psq and if AB ̸= 0, there will be nonzero terms bt psq where b ̸= 0and p+ q = 2n. These two polynomials cannot be equal if this happens. Say p̂+ q̂ = 2nand the second has a term bt p̂sq̂. Then one of p̂, q̂ is larger than n. Say q̂ > n. Differentiate∑p+q≤n akt psq with respect to s q̂+1 times and the result causes det

(I−2σ2tA−2σ2sB

)to vanish but does not cause det

(I−2σ2tA−2σ2sB+4σ4tsAB

)to vanish. Hence AB = 0.

This proves the following very interesting result.

Proposition 39.4.2 Let X1, · · · ,Xn be a random independent sample from n(0,σ2

)and for

X ≡(

X1 · · · Xn

)T

and A,B two symmetric real matrices, then XT AX and XT BX are independent if andonly if AB = 0.

Note that for A,B symmetric, AB = 0 if and only if BT AT = BA = 0.If you have more than two of these, say Ak,k≤m the result would end up being similar

although you would need to have A jAk = 0 whenever j ̸= k.As an interesting observation, from linear algebra, this condition that the products give

0 implies that the matrices {Ak} are a commuting family of diagonalizable matrices and sothey are simultaneously diagonalizable, meaning that there exists a single invertible matrixS such that S−1AkS = Dk where Dk is a diagonal matrix. However, more is assumed here insaying that the product is 0. In particular, you can’t have a repeated nonzero matrix in thelist of matrices.

820 CHAPTER 39. STATISTICAL TESTSand so1 _ 1 1det (I —20621A —2062sB)"? det (I —202tA)"/? det (I —202sB)!/?M (t,0)M (0,5)M(t,s) =which shows that the two quadratic forms X’AX,X1BX are independent.In fact this is true the other direction. Suppose the two quadratic forms are independent.Thus M (t,0) M(0,s) = M (t,s). Then this requires1 1 1det (I —202tA —202sB)"? det (I —2021A)!/? det (I —202sB)1/2and sodet (1—20°tA—20°sB) = det (I—20°1A) det (J —20°sB)= det([—20°tA —20°sB +40*tsAB)This is to hold for all |r| ,|s| small enough. However, if AB 4 0, the polynomial on the rightwill be of degree 2n while the one on the left will be of degree n. Therefore, these cannotbe equal. The details follow.From the definition of the determinant, the left side isy sen (r1-++Tn) (61, = 20° tAt,, = 20°sB\,,) vee (Snr, —20°tAn,, —20°sByr,)rr'TnThis expression is of the form )’,,.4<, axt”s?. However, similar reasoning givesdet (I —20°1A —20°sB + 40“tsAB)is of the form Y),4.9<2n bxt?s4 and if AB # 0, there will be nonzero terms bt?s4 where b #0and p+q = 2n. These two polynomials cannot be equal if this happens. Say 6+ gG = 2nand the second has a term bt’s?. Then one of /,g is larger than n. Say g > n. DifferentiateYptg<n kts? with respect to s G+ 1 times and the result causes det (J — 207tA — 207sB)to vanish but does not cause det (J — 26°tA — 207sB + 40tsAB) to vanish. Hence AB = 0.This proves the following very interesting result.Proposition 39.4.2 Let X,,--- ,X, be a random independent sample from n (0, 0”) and forTx=(% x)and A,B two symmetric real matrices, then X'AX and X" BX are independent if andonly if AB =0.Note that for A,B symmetric, AB = 0 if and only if B’A? = BA = 0.If you have more than two of these, say Ay, k < m the result would end up being similaralthough you would need to have A ;A; = 0 whenever j # k.As an interesting observation, from linear algebra, this condition that the products give0 implies that the matrices {A;,} are a commuting family of diagonalizable matrices and sothey are simultaneously diagonalizable, meaning that there exists a single invertible matrixS such that S~'A,S = D, where D, is a diagonal matrix. However, more is assumed here insaying that the product is 0. In particular, you can’t have a repeated nonzero matrix in thelist of matrices.