Details and Options
- A matrix m is symmetric if m==Transpose[m].
- SymmetricMatrixQ works for symbolic as well as numerical matrices.
- The following options can be given:
SameTest Automatic function to test equality of expressions Tolerance Automatic tolerance for approximate numbers
- For exact and symbolic matrices, the option SameTest->f indicates that two entries mij and mkl are taken to be equal if f[mij,mkl] gives True.
- For approximate matrices, the option Tolerance->t can be used to indicate that all entries Abs[mij]≤t are taken to be zero.
- For matrix entries Abs[mij]>t, equality comparison is done except for the last bits, where is $MachineEpsilon for MachinePrecision matrices and for matrices of Precision .
Examplesopen allclose all
An approximate MachinePrecision matrix:
Adjust the option Tolerance to accept this matrix as symmetric:
Using Table generates a symmetric matrix:
Many special matrices are symmetric, including FourierMatrix:
Many filter kernel matrices are symmetric, including DiskMatrix:
AdjacencyMatrix of an undirected graph is symmetric:
KirchhoffMatrix of an undirected graph is symmetric:
Several statistical measures are symmetric matrices, including Covariance:
SymmetrizedArray can generate matrices (and general arrays) with symmetries:
Check that a matrix drawn from GaussianOrthogonalMatrixDistribution is symmetric:
Check that a matrix drawn from CircularOrthogonalMatrixDistribution is both symmetric and unitary:
Properties & Relations (8)
A matrix is symmetric if mTranspose[m]:
Use AntisymmetricMatrixQ to test whether a matrix is antisymmetric:
Use NormalMatrixQ to test whether a matrix is normal:
Use Eigenvalues to find eigenvalues:
This also means that their CharacteristicPolynomial has real coefficients:
Use Eigenvectors to find eigenvectors:
As well as general MatrixFunction:
A symmetric matrix is always diagonalizable as tested with DiagonalizableMatrixQ:
Neat Examples (1)
Images of symmetric matrices including FourierMatrix:
Wolfram Research (2008), SymmetricMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/SymmetricMatrixQ.html (updated 2014).
Wolfram Language. 2008. "SymmetricMatrixQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/SymmetricMatrixQ.html.
Wolfram Language. (2008). SymmetricMatrixQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SymmetricMatrixQ.html