gives True if m is an explicitly orthogonal matrix, and False otherwise.

Details and Options

  • A p×q matrix m is orthogonal if pq and Transpose[m].m is the q×q identity matrix, or pq and m.Transpose[m] is the p×p identity matrix.
  • OrthogonalMatrixQ works for symbolic as well as numerical matrices.
  • The following options can be given:
  • NormalizedTruetest if matrix rows are normalized
    SameTestAutomaticfunction to test equality of expressions
    ToleranceAutomatictolerance for approximate numbers
  • For exact and symbolic matrices, the option SameTest->f indicates that two entries aij and bij are taken to be equal if f[aij,bij] gives True.
  • For approximate matrices, the option Tolerance->t can be used to indicate that the norm γ=m.mT-In satisfying γt is taken to be zero where In is the identity matrix.


open allclose all

Basic Examples  (1)

Test if a matrix is orthogonal:

Scope  (4)

A real matrix:

A complex matrix:

A dense matrix:

A sparse matrix:

An approximate MachinePrecision matrix:

An approximate arbitrary-precision matrix:

A matrix with symbolic entries:

The matrix becomes orthogonal when c = b and d = -a:

Generalizations & Extensions  (1)

A matrix can be rectangular:

In this case, matrix rows can be checked to see if they are orthonormal:

A matrix can have more rows than columns:

The columns of the matrix m are orthonormal:

Options  (3)

Normalized  (1)

Symbolic orthogonal matrix rows are often not normalized to 1:

Testing can be avoided if the rows or columns are normalized:

SameTest  (1)

This matrix is orthogonal for a positive real , but OrthogonalMatrixQ gives False:

Use the option SameTest to get the correct answer:

Tolerance  (1)

Generate an orthogonal real-valued matrix with some random perturbation of order 10-13:

q.q is not exactly zero outside the main diagonal:

Adjust the option Tolerance for accepting the matrix as orthogonal:

Tolerance is applied to the following value:

Applications  (6)

Any rotation matrix is orthogonal:

Any permutation matrix is orthogonal:

Orthogonal matrices play an important role in some matrix decompositions:

The inverse of an orthogonal matrix is orthogonal:

The inverse of an orthogonal matrix can be replaced by its transpose:

Orthogonalize applied to real vectors generates an orthogonal matrix:

The matrix does not need to be square:

Check that a matrix drawn from CircularRealMatrixDistribution is orthogonal:

Properties & Relations  (10)

A matrix is orthogonal if m.Transpose[m]IdentityMatrix[n]:

For an approximate matrix, the identity is approximately true:

Any real-valued orthogonal matrix is unitary:

But a complex unitary matrix is typically not orthogonal:

Dot products of orthogonal matrices are orthogonal:

For some matrix functions, an orthogonal matrix argument gives an orthogonal matrix:

An orthogonal matrix is normal:

An orthogonal matrix has a full set of linear independent eigenvectors:

All eigenvalues of an orthogonal matrix have the absolute value equal to 1:

The singular values are all 1 for an orthogonal matrix:

The determinant of an orthogonal matrix is 1 or :

The 2-norm of an orthogonal matrix is always 1:

The matrix exponential MatrixExp of an antisymmetric matrix is always orthogonal:

Neat Examples  (1)

Rotation matrices are orthogonal:

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


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


Wolfram Language. 2014. "OrthogonalMatrixQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/OrthogonalMatrixQ.html.


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


@misc{reference.wolfram_2021_orthogonalmatrixq, author="Wolfram Research", title="{OrthogonalMatrixQ}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/OrthogonalMatrixQ.html}", note=[Accessed: 25-June-2022 ]}


@online{reference.wolfram_2021_orthogonalmatrixq, organization={Wolfram Research}, title={OrthogonalMatrixQ}, year={2014}, url={https://reference.wolfram.com/language/ref/OrthogonalMatrixQ.html}, note=[Accessed: 25-June-2022 ]}