Determinant & Trace
Determinant
Determinant is a scalar that reflects characteristics of a given square matrix. It is important for many aspects of a matrix.
A determinant can be defined (or calculated) only for a square matrix, including Determinant of a matrix A is denoted by det(A).
For example, if A is the matrix,
the determinant is notated simply as:
You will also see the determinant notated using parallel lines (as opposed to the square brackets). For example,
1 x 1 Matrices
In the most simplistic case, a matrix, the determinant is the scalar value. For example, if , then .
2 x 2 Matrices
The determinant of a matrix, , is the scalar .
For example,
and
.
Supplemental Video
Larger Matrices
For square matrices larger than it is necessary to utilize Laplace expansion or cofactor expansion. The final determinant, , is the weighted sum of the subdivided determinants that make B.
To do this, it is necessary to identify the cofactor for each sub-matrix. I think an example is easiest to visualize how this process works.
Assume that matrix B is given as:
and the goal is to compute:
The cofactors are any row of the matrix B. The sub-matrices are the other $n$ rows. In the example below, I have selected the first row to contain the cofactors but any row will work.
First, select element and cross out the remaining elements in row a (b, c) and remaining elements in column a (d, g). The resultant submatrix (and determinant) is:
and
Next, select element b and cross off the other elements in row b (a, c) and other elements in column b (e, h). The resultant submatrix is:
and
Finally, select element c and cross of the row and column containing element c. This results in:
and
The sign between the sub-matrices alternatives, +, -, +.
Supplemental Video
What about a or an ?
As above, select any row as the cofactors. Doing this leaves an matrix. For each element in the selected from, identify the submatrix associated with a given cofactor, alternating the sign between elements (+, -, +, -). Repeat this process until the matrix has been decomposed in a (large) number of determinant problems.
Supplemental Video
Properties of determinants
- If one row of a matrix consists entirely of zeros, then the determinant is zero.
- If two rows of a matrix are interchanged, the determinant changes sign
- If two rows of a matrix are identical, the determinant is zero
- If the matrix B is obtained from the matrix A by multiplying every element in one row of A by the scalar , then .
- For an n x n matrix and any scalar ,
- A square matrix has an inverse if and only if its determinant is non-zero.
Trace
In comparison to the determinant, the trace of a matrix is trivial to compute. It is simply the sum of the diagonal of a square matrix. For example:
and the trace of A (tr(A):
Applications to Geography
Frequently, the natural log of the determinant of a semi-definite matrix () needs to be computed in the context of spatial regression (multivariate maximum liklihood estimation problems for non-independent data). If you would like more information about this, check out this blog post about estimating the log determinant. An estimate is necessary becase the calculation is quite expensive for a computer as the total number of observations increases; this is a problem that should sounds familiar having just finished the sections on computational geometry and the goal of maximizing efficiency.


