Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
SymmetricMatrixQ
  • See Also
    • AntisymmetricMatrixQ
    • HermitianMatrixQ
    • AntihermitianMatrixQ
    • SymmetricMatrix
    • PositiveSemidefiniteMatrixQ
    • Transpose
    • SymmetrizedArray
    • Symmetrize
  • Related Guides
    • Matrix Predicates
    • Matrices and Linear Algebra
    • See Also
      • AntisymmetricMatrixQ
      • HermitianMatrixQ
      • AntihermitianMatrixQ
      • SymmetricMatrix
      • PositiveSemidefiniteMatrixQ
      • Transpose
      • SymmetrizedArray
      • Symmetrize
    • Related Guides
      • Matrix Predicates
      • Matrices and Linear Algebra

SymmetricMatrixQ[m]

gives True if m is explicitly symmetric, and False otherwise.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Basic Uses  
Special Matrices  
Options  
SameTest  
Tolerance  
Applications  
Generating Symmetric Matrices  
Examples of Symmetric Matrices  
Uses of Symmetric Matrices  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • AntisymmetricMatrixQ
    • HermitianMatrixQ
    • AntihermitianMatrixQ
    • SymmetricMatrix
    • PositiveSemidefiniteMatrixQ
    • Transpose
    • SymmetrizedArray
    • Symmetrize
  • Related Guides
    • Matrix Predicates
    • Matrices and Linear Algebra
    • See Also
      • AntisymmetricMatrixQ
      • HermitianMatrixQ
      • AntihermitianMatrixQ
      • SymmetricMatrix
      • PositiveSemidefiniteMatrixQ
      • Transpose
      • SymmetrizedArray
      • Symmetrize
    • Related Guides
      • Matrix Predicates
      • Matrices and Linear Algebra

SymmetricMatrixQ

SymmetricMatrixQ[m]

gives True if m is explicitly symmetric, and False otherwise.

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 Automaticfunction to test equality of expressions
    Tolerance Automatictolerance 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 .

Examples

open all close all

Basic Examples  (2)

Test if a 2×2 numeric matrix is explicitly symmetric:

Test if a 3×3 symbolic matrix is explicitly symmetric:

Scope  (10)

Basic Uses  (6)

Test if a real machine-precision matrix is symmetric:

A real symmetric matrix is also Hermitian:

Test if a complex matrix is symmetric:

A complex symmetric matrix has symmetric real and imaginary parts:

Test if an exact matrix is symmetric:

Make the matrix symmetric:

Use SymmetricMatrixQ with an arbitrary-precision matrix:

A random matrix is typically not symmetric:

Use SymmetricMatrixQ with a symbolic matrix:

The matrix becomes symmetric when :

SymmetricMatrixQ works efficiently with large numerical matrices:

Special Matrices  (4)

Use SymmetricMatrixQ with sparse matrices:

Use SymmetricMatrixQ with structured matrices:

Use with a QuantityArray structured matrix:

The identity matrix is symmetric:

HilbertMatrix is symmetric:

Options  (2)

SameTest  (1)

This matrix is symmetric for a positive real , but SymmetricMatrixQ gives False:

Use the option SameTest to get the correct answer:

Tolerance  (1)

Generate a real-valued symmetric matrix with some random perturbation of order 10-14:

Adjust the option Tolerance to accept this matrix as symmetric:

The norm of the difference between the matrix and its transpose:

Applications  (13)

Generating Symmetric Matrices  (4)

Any matrix generated from a symmetric function is symmetric:

The function is symmetric:

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 :

For example, here is the Jordan matrix of dimension 4 for the eigenvalue :

Define a function for generating a corresponding complex similarity transformation:

The matrix is a sum of times the identity matrix and times the backward identity matrix:

Then s(n).j(lambda,n).TemplateBox[{{s, (, n, )}}, Inverse] is symmetric, which shows that the Jordan matrix is similar to a symmetric matrix:

Confirm the matrix is symmetric:

Examples of Symmetric Matrices  (5)

The Hessian matrix of a function is symmetric:

Many special matrices are symmetric, including FourierMatrix:

HadamardMatrix:

HankelMatrix:

And HilbertMatrix:

Visualize the matrix types:

Many filter kernel matrices are symmetric, including DiskMatrix:

CrossMatrix:

DiamondMatrix:

Visualize the matrices:

AdjacencyMatrix of an undirected graph is symmetric:

As is KirchhoffMatrix:

Visualize adjacency and Kirchhoff matrices for different graphs:

Several statistical measures are symmetric matrices, including Covariance:

Correlation:

AbsoluteCorrelation:

Uses of Symmetric Matrices  (4)

A positive-definite, real symmetric matrix or metric defines an inner product by :

Verify that is in fact symmetric and positive definite:

Orthogonalize the standard basis of TemplateBox[{}, Reals]^n to find an orthonormal basis:

Confirm that this basis is orthonormal with respect to the inner product :

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:

Verify that the matrix is symmetric:

Compute the kinetic energy if its angular velocity is :

The kinetic energy is positive as long as is nonzero, showing the matrix was positive definite:

Determine if a sparse matrix is structurally symmetric:

The matrix is not symmetric:

But it is structurally symmetric:

Use a different method for symmetric matrices, with failover to a general method:

Construct real-valued matrices for testing:

For a non-symmetric matrix m, the function myLS just uses Gaussian elimination:

For a symmetric indefinite matrix ms, try Cholesky and continue with Gaussian elimination:

For a symmetric positive-definite matrix mpd, try Cholesky, which succeeds:

Properties & Relations  (14)

SymmetricMatrixQ[x] trivially returns False for any x that is not a matrix:

A matrix is symmetric if mTranspose[m]:

A real-valued symmetric matrix is Hermitian:

But a complex-valued symmetric matrix may not be:

Use Symmetrize to compute the symmetric part of a matrix:

This equals the average of m and Transpose[m]:

Any matrix can be represented as the sum of its symmetric and antisymmetric parts:

Use AntisymmetricMatrixQ to test whether a matrix is antisymmetric:

If is a symmetric matrix with real entries, then is antihermitian:

MatrixExp[I m] for real symmetric m is unitary:

A real-valued symmetric matrix is always a normal matrix:

A complex-valued symmetric matrix need not be normal:

Real-valued symmetric matrices have all real eigenvalues:

Use Eigenvalues to find eigenvalues:

Note that a complex-valued symmetric matrix may have both real and complex eigenvalues:

CharacteristicPolynomial[m,x] for real symmetric m can be factored into linear terms:

Real-valued symmetric matrices have a complete set of eigenvectors:

As a consequence, they must be diagonalizable:

Use Eigenvectors to find eigenvectors:

Note that a complex-valued symmetric matrix need not have these properties:

The inverse of a symmetric matrix is symmetric:

Matrix functions of symmetric matrices are symmetric, including MatrixPower:

MatrixExp:

And any univariate function representable using MatrixFunction:

SymmetricMatrix can be used to explicitly construct symmetric matrices:

These satisfy SymmetricMatrixQ:

Possible Issues  (1)

SymmetricMatrixQ uses the definition TemplateBox[{m}, Transpose]=m for both real- and complex-valued matrices:

These complex matrices need not be normal or possess many properties of self-adjoint (real symmetric) matrices:

HermitianMatrixQ tests the condition TemplateBox[{m}, ConjugateTranspose]=m for self-adjoint matrices:

Alternatively, test if the entries are real to restrict to real symmetric matrices:

Neat Examples  (1)

Images of symmetric matrices including FourierMatrix:

See Also

AntisymmetricMatrixQ  HermitianMatrixQ  AntihermitianMatrixQ  SymmetricMatrix  PositiveSemidefiniteMatrixQ  Transpose  SymmetrizedArray  Symmetrize

Related Guides

    ▪
  • Matrix Predicates
  • ▪
  • Matrices and Linear Algebra

History

Introduced in 2008 (7.0) | Updated in 2014 (10.0)

Wolfram Research (2008), SymmetricMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/SymmetricMatrixQ.html (updated 2014).

Text

Wolfram Research (2008), SymmetricMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/SymmetricMatrixQ.html (updated 2014).

CMS

Wolfram Language. 2008. "SymmetricMatrixQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/SymmetricMatrixQ.html.

APA

Wolfram Language. (2008). SymmetricMatrixQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SymmetricMatrixQ.html

BibTeX

@misc{reference.wolfram_2025_symmetricmatrixq, author="Wolfram Research", title="{SymmetricMatrixQ}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/SymmetricMatrixQ.html}", note=[Accessed: 01-May-2026]}

BibLaTeX

@online{reference.wolfram_2025_symmetricmatrixq, organization={Wolfram Research}, title={SymmetricMatrixQ}, year={2014}, url={https://reference.wolfram.com/language/ref/SymmetricMatrixQ.html}, note=[Accessed: 01-May-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English