How to Find a Gram Matrix Determinant Without Special Methods
At a glance
- 1. Read the entries
Treat the Gram matrix as an ordinary square matrix; its displayed entries are all you need.
- 2. Choose a determinant method
For a small matrix, use cofactor expansion or elementary row operations.
- 3. Compute and check
Keep track of row-swap and row-scaling effects, then verify the arithmetic.
You do not need a special Gram-matrix theorem to calculate its determinant. Once the matrix entries are known, use the ordinary determinant rules. The fact that it is a Gram matrix can provide a useful check—its determinant is nonnegative for real vectors—but it does not change the basic calculation.
Treat it like any other matrix
A Gram matrix is built from inner products of vectors. For vectors , its entries are . Because real inner products satisfy , the matrix is symmetric.
But to find , you can ignore how those entries were obtained. Apply a standard determinant method to the square array. A single number cannot be calculated unless the matrix entries are specified; the method depends on the matrix size and its entries.
A quick formula for a symmetric 3×3 matrix
Write a general symmetric matrix as
Expanding along the first row gives
This is an ordinary cofactor expansion, simplified using the repeated off-diagonal entries. You can use it whether or not you know the matrix is a Gram matrix.
Worked example
Take three vectors in :
Their pairwise dot products give the matrix
For the formula above, and . Substitute those values:
You can get the same answer by cofactor expansion:
The calculation used only the entries of the matrix. The vectors explain why the matrix is a Gram matrix, but they are not required once the matrix is written down.
Using row operations instead
For a larger matrix, row reduction can be convenient. Reduce the matrix to upper-triangular form; the determinant of an upper-triangular matrix is the product of its diagonal entries. Track the effect of every operation:
- Swapping two rows changes the sign of the determinant.
- Multiplying a row by a number multiplies the determinant by that number.
- Adding a multiple of one row to another leaves the determinant unchanged.
If you use row scaling to make the arithmetic easier, account for it when recovering the original determinant. Adding multiples of rows is often the simplest safe operation because it does not change the determinant.
What the Gram property can tell you
For real vectors, a Gram matrix is positive semidefinite, so its determinant cannot be negative. If the vectors are linearly independent, the determinant is positive; if they are linearly dependent, it is zero. These facts are useful checks, not substitutes for computing the determinant.
For example, a negative answer for a real Gram matrix indicates an arithmetic mistake or that the displayed matrix is not actually a Gram matrix under the stated inner product. A zero determinant means the vectors are linearly dependent, but it does not tell you which vectors depend on the others.
Common mistakes
- Multiplying the diagonal entries. That gives the determinant only for a triangular matrix, not a general matrix. In the example, the diagonal product is , while the determinant is .
- Assuming symmetry makes the determinant a simple product. Symmetry makes opposite entries equal, which shortens the 3×3 formula, but it does not make the matrix diagonal.
- Using for a rectangular matrix. This identity applies when is square. For a rectangular matrix, is square, but is not defined; compute the determinant of by ordinary methods instead.
- Forgetting row-operation effects. Row swaps and row scaling change the determinant; adding a multiple of one row to another does not.
If you have a particular matrix, write down its entries and apply the method that makes the arithmetic shortest. For a small symmetric 3×3 matrix, the displayed formula is usually the quickest route.
References
- Sheldon Axler, Linear Algebra Done Right
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.