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
Basic Examples (2)
Basic Uses (6)
Use SymmetricMatrixQ with an arbitrary-precision matrix:
Use SymmetricMatrixQ with a symbolic matrix:
SymmetricMatrixQ works efficiently with large numerical matrices:
Adjust the option Tolerance to accept this matrix as symmetric:
Generating Symmetric Matrices (4)
Using Table generates a symmetric matrix:
SymmetrizedArray can generate matrices (and general arrays) with symmetries:
Convert back to an ordinary matrix using Normal:
Check that matrices drawn from GaussianOrthogonalMatrixDistribution are symmetric:
Matrices drawn from CircularOrthogonalMatrixDistribution are symmetric and unitary:
Every Jordan matrix is similar to a symmetric matrix. Since any square matrix is similar to its Jordan form, this means that any square matrix is similar to a symmetric matrix. Define a function for generating an Jordan block for eigenvalue :
Examples of Symmetric Matrices (5)
Many special matrices are symmetric, including FourierMatrix:
Many filter kernel matrices are symmetric, including DiskMatrix:
AdjacencyMatrix of an undirected graph is symmetric:
As is KirchhoffMatrix:
Several statistical measures are symmetric matrices, including Covariance:
Uses of Symmetric Matrices (4)
The moment of inertia tensor is the equivalent of mass for rotational motion. For example, kinetic energy is , with taking the place of the mass and angular velocity taking the place of linear velocity in the formula . can be represented by a positive-definite symmetric matrix. Compute the moment of inertia for a tetrahedron with endpoints at the origin and positive coordinate axes:
Properties & Relations (13)
A matrix is symmetric if mTranspose[m]:
Use Symmetrize to compute the symmetric part of a matrix:
This equals the average of m and Transpose[m]:
Use AntisymmetricMatrixQ to test whether a matrix is antisymmetric:
Use Eigenvalues to find eigenvalues:
CharacteristicPolynomial[m,x] for real symmetric m can be factored into linear terms:
Use Eigenvectors to find eigenvectors:
Matrix functions of symmetric matrices are symmetric, including MatrixPower:
And any univariate function representable using MatrixFunction:
Possible Issues (1)
SymmetricMatrixQ uses the definition for both real- and complex-valued matrices:
HermitianMatrixQ tests the condition for self-adjoint matrices:
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