Let X , Y , Z β S ( n ) X,Y,Z\in\mathcal{S}(n) X , Y , Z β S ( n ) . Two real n Γ n n\times n n Γ n matrices are equal exactly when all their entries agree, and by Difference of Real Matrices and Sum of Real Matrices the entries of a difference and of a sum are the corresponding differences and sums of entries. Write 0 n 0_{n} 0 n β for the real n Γ n n\times n n Γ n matrix all of whose entries are 0 0 0 . We verify the four conditions of Metric Space for d S ( n ) d_{\mathcal{S}(n)} d S ( n ) β .
Condition 1 (nonnegativity). 0 β€ β₯ X β Y β₯ 0\le\lVert X-Y\rVert 0 β€ β₯ X β Y β₯ by claim 1 of Properties of the Norm of a Symmetric Real Matrix , that is 0 β€ d S ( n ) ( X , Y ) 0\le d_{\mathcal{S}(n)}(X,Y) 0 β€ d S ( n ) β ( X , Y ) .
Condition 2 (vanishing). By claim 4 of Properties of the Norm of a Symmetric Real Matrix , β₯ X β Y β₯ = 0 \lVert X-Y\rVert=0 β₯ X β Y β₯ = 0 holds if and only if X β Y = 0 n X-Y=0_{n} X β Y = 0 n β . Comparing entries, X β Y = 0 n X-Y=0_{n} X β Y = 0 n β holds if and only if X i j β Y i j = 0 X_{ij}-Y_{ij}=0 X ij β β Y ij β = 0 for all indices i , j i,j i , j , and by claim 3 of Additive Cancellation and Elementary Additive Identities in a Field this holds if and only if X i j = Y i j X_{ij}=Y_{ij} X ij β = Y ij β for all i , j i,j i , j , that is if and only if X = Y X=Y X = Y . Hence d S ( n ) ( X , Y ) = 0 d_{\mathcal{S}(n)}(X,Y)=0 d S ( n ) β ( X , Y ) = 0 if and only if X = Y X=Y X = Y .
Condition 3 (symmetry). Let ΞΌ X \mu X ΞΌ X denote the scalar multiple of a matrix, whose entries are ΞΌ X i j \mu X_{ij} ΞΌ X ij β . For all i , j i,j i , j ,
( ( β 1 ) ( X β Y ) ) i j = ( β 1 ) β ( X i j β Y i j ) = β ( X i j β Y i j ) = Y i j β X i j = ( Y β X ) i j , \bigl((-1)(X-Y)\bigr)_{ij}=(-1)\,(X_{ij}-Y_{ij})=-(X_{ij}-Y_{ij})=Y_{ij}-X_{ij}=(Y-X)_{ij}, ( ( β 1 ) ( X β Y ) ) ij β = ( β 1 ) ( X ij β β Y ij β ) = β ( X ij β β Y ij β ) = Y ij β β X ij β = ( Y β X ) ij β ,
using claim 2 of Zero Products and Elementary Identities in a Field together with the identity 1 β
t = t 1\cdot t=t 1 β
t = t for the second equality and claim 6 of Additive Cancellation and Elementary Additive Identities in a Field for the third. Hence Y β X = ( β 1 ) ( X β Y ) Y-X=(-1)(X-Y) Y β X = ( β 1 ) ( X β Y ) , and claim 5 of Properties of the Norm of a Symmetric Real Matrix gives
β₯ Y β X β₯ = β£ β 1 β£ β β₯ X β Y β₯ . \lVert Y-X\rVert=|-1|\,\lVert X-Y\rVert . β₯ Y β X β₯ = β£ β 1β£ β₯ X β Y β₯ .
Here β£ β 1 β£ = β£ 1 β£ = 1 |-1|=|1|=1 β£ β 1β£ = β£1β£ = 1 , by claim 2 of Properties of the Absolute Value in an Ordered Field and by Absolute Value in an Ordered Field applied to 1 1 1 , which satisfies 0 β€ 1 0\le1 0 β€ 1 by claim 1 of Elementary Arithmetic in an Ordered Field . Therefore d S ( n ) ( Y , X ) = d S ( n ) ( X , Y ) d_{\mathcal{S}(n)}(Y,X)=d_{\mathcal{S}(n)}(X,Y) d S ( n ) β ( Y , X ) = d S ( n ) β ( X , Y ) .
Condition 4 (triangle inequality). For all i , j i,j i , j , the field axioms give
X i j β Z i j = ( X i j β Y i j ) + ( Y i j β Z i j ) , X_{ij}-Z_{ij}=(X_{ij}-Y_{ij})+(Y_{ij}-Z_{ij}), X ij β β Z ij β = ( X ij β β Y ij β ) + ( Y ij β β Z ij β ) ,
since the right-hand side equals X i j + ( ( β Y i j ) + Y i j ) + ( β Z i j ) X_{ij}+\bigl((-Y_{ij})+Y_{ij}\bigr)+(-Z_{ij}) X ij β + ( ( β Y ij β ) + Y ij β ) + ( β Z ij β ) by associativity and commutativity of addition, and ( β Y i j ) + Y i j = 0 (-Y_{ij})+Y_{ij}=0 ( β Y ij β ) + Y ij β = 0 is absorbed by the additive identity. Comparing entries, X β Z = ( X β Y ) + ( Y β Z ) X-Z=(X-Y)+(Y-Z) X β Z = ( X β Y ) + ( Y β Z ) . The matrices X β Y X-Y X β Y and Y β Z Y-Z Y β Z are symmetric by claim 1 of The Positive Semidefinite Ordering is a Partial Order Compatible with the Linear Structure , so claim 5 of Properties of the Norm of a Symmetric Real Matrix applies and gives
β₯ X β Z β₯ = β₯ ( X β Y ) + ( Y β Z ) β₯ β€ β₯ X β Y β₯ + β₯ Y β Z β₯ , \lVert X-Z\rVert=\bigl\lVert (X-Y)+(Y-Z)\bigr\rVert\le\lVert X-Y\rVert+\lVert Y-Z\rVert , β₯ X β Z β₯ = β ( X β Y ) + ( Y β Z ) β β€ β₯ X β Y β₯ + β₯ Y β Z β₯ ,
that is d S ( n ) ( X , Z ) β€ d S ( n ) ( X , Y ) + d S ( n ) ( Y , Z ) d_{\mathcal{S}(n)}(X,Z)\le d_{\mathcal{S}(n)}(X,Y)+d_{\mathcal{S}(n)}(Y,Z) d S ( n ) β ( X , Z ) β€ d S ( n ) β ( X , Y ) + d S ( n ) β ( Y , Z ) .
All four conditions hold, so d S ( n ) d_{\mathcal{S}(n)} d S ( n ) β is a metric on S ( n ) \mathcal{S}(n) S ( n ) and ( S ( n ) , d S ( n ) ) \bigl(\mathcal{S}(n),d_{\mathcal{S}(n)}\bigr) ( S ( n ) , d S ( n ) β ) is a metric space.