"sample mean" vector: See the section on estimation in the article on the normal distribution for details; the process here is similar. Since the estimate does not depend on Σ, we can just substitute it for μ in the likelihood function, getting and then seek the value of Σ that maximizes the likelihood of the data (in practice it is easier to work with log ). The trace of a 1 × 1 matrix Now we come to the first surprising step: regard the scalar as the trace of a 1×1 matrix. This makes it possible to use the identity tr(AB) = tr(BA) whenever A and B are matrices so shaped that both products exist. We get where is sometimes called the scatter matrix, and is positive definite if there exists a subset of the data consisting of affinely independent observations (which we will assume). Using the spectral theorem It follows from the spectral theorem of linear algebra that a positive-definite symmetric matrix S has a unique positive-definite symmetric square root S1/2. We can again use the "cyclic property" of the trace to write Let B = S1/2 Σ −1 S1/2. Then the expression above becomes The positive-definite matrix B can be diagonalized, and then the problem of finding the value of B that maximizes Since the trace of a square matrix equals the sum of eigenvalues ("trace and eigenvalues"), the equation reduces to the problem of finding the eigenvalues λ1, ..., λp that maximize This is just a calculus problem and we get λi = n for all i. Thus, assume Q is the matrix of eigen vectors, then i.e., n times the p×p identity matrix. Concluding steps Finally we get i.e., the p×p "sample covariance matrix" is the maximum-likelihood estimator of the "population covariance matrix" Σ. At this point we are using a capital X rather than a lower-case x because we are thinking of it "as an estimator rather than as an estimate", i.e., as something random whose probability distribution we could profit by knowing. The random matrix S can be shown to have a Wishart distribution with n − 1 degrees of freedom. That is: Alternative derivation An alternative derivation of the maximum likelihood estimator can be performed via matrix calculus formulae (see also differential of a determinant and differential of the inverse matrix). It also verifies the aforementioned fact about the maximum likelihood estimate of