NormalMatrixQ

NormalMatrixQ[m]

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

Details and Options

  • A matrix m is normal if m.ConjugateTranspose[m]ConjugateTranspose[m].m.
  • NormalMatrixQ works for symbolic as well as numerical matrices.
  • The following options can be given:
  • SameTest Automaticfunction 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 where a=m.m and b=m.m.
  • For approximate matrices, the option Tolerance->t can be used to indicate that the norm γ=m.m-m.m satisfying γt γ is taken to be zero where γ is the infinity norm of the matrix m.

Examples

open allclose all

Basic Examples  (2)

Test if a 2×2 numeric matrix is normal:

Test if a 3×3 symbolic matrix is normal:

Verify by hand the condition m.ConjugateTranspose[m]ConjugateTranspose[m].m:

Scope  (10)

Basic Uses  (6)

Test if a real machine-precision matrix is normal:

The symmetric part of any real matrix is normal:

Test if a complex matrix is normal:

The Hermitian part of any complex matrix is normal:

Test if an exact matrix is normal:

Verify the result:

Use NormalMatrixQ with an arbitrary-precision matrix:

A random matrix is typically not normal:

Use NormalMatrixQ with a symbolic matrix:

The matrix becomes normal when c=TemplateBox[{b}, Conjugate] and the imaginary part of and is zero:

NormalMatrixQ works efficiently with large numerical matrices:

Special Matrices  (4)

Use NormalMatrixQ with sparse matrices:

Use NormalMatrixQ with structured matrices:

Use with a QuantityArray structured matrix:

The identity matrix is normal:

HilbertMatrix is normal:

Options  (2)

SameTest  (1)

This matrix is normal for a positive real , but NormalMatrixQ gives False:

Use the option SameTest to get the correct answer:

Tolerance  (1)

Generate a normal complex-valued matrix with some random perturbation of order :

m.m-m.m is not exactly zero outside the main diagonal:

Adjust the option Tolerance for accepting a matrix as normal:

Tolerance is applied to the following value:

Applications  (5)

Normal matrices are the most general kind of matrix that can be unitarily diagonalized as with diagonal and unitary. All Hermitian matrices are normal because both sides of the equality are simply :

Similarly, all antihermitian matrices are normal because both sides of the equality are simply :

Unitary matrices are normal, as substituting in the definition TemplateBox[{u}, ConjugateTranspose]=TemplateBox[{u}, Inverse] gives an identity matrix on both sides:

Show that the following matrix is normal, then diagonalize it:

Confirm using NormalMatrixQ:

A normal matrix like can be unitarily diagonalized using Eigensystem:

The entries on the diagonal can be arbitrary complex numbers:

Normalizing the eigenvectors and putting them in columns gives a unitary matrix:

Confirm the diagonalization n=u.d.TemplateBox[{u}, ConjugateTranspose]:

Generate a normal matrix from a given set of eigenvalues using the fact that any normal matrix can be represented in the form p.d.TemplateBox[{p}, ConjugateTranspose] with unitary and diagonal:

In general, the matrix is not Hermitian, antihermitian or unitary:

If the eigenvalues used to generate the matrix are real, the matrix is Hermitian:

If the eigenvalues are pure imaginary, the matrix is antihermitian:

If the eigenvalues lie on the unit circle, the matrix is unitary:

Create a matrix that is both unitary and antihermitian:

Because normal matrices are unitarily diagonalizable, computing matrix functions is particularly simple. If n=u.d.TemplateBox[{u}, ConjugateTranspose], then f(n)=u.f(d).TemplateBox[{u}, ConjugateTranspose], and can be computed by simply applying to each of the diagonal elements. Consider the following normal matrix:

Compute Eigensystem[n]:

The eigenvectors are normalized in this case, so u=TemplateBox[{v}, Transpose] and is the diagonal matrix built from :

Compute and confirm using MatrixPower:

Compute and confirm using MatrixExp:

Compute and confirm using MatrixLog:

Compute and confirm using MatrixFunction:

Many matrix distributions produce normal matrices, including CircularRealMatrixDistribution:

CircularSymplecticMatrixDistribution:

GaussianOrthogonalMatrixDistribution:

GaussianUnitaryMatrixDistribution :

SchurDecomposition for normal matrices is always equivalent to Eigensystem:

The triangular matrix t is effectively diagonal, although it may contain roundoff errors:

The off-diagonal elements of t are roundoff errors:

The eigenvalues on the diagonal of t are not sorted:

Properties & Relations  (15)

NormalMatrixQ[m] is effectively equivalent to m.mm.m:

Any real symmetric matrix is normal:

As is any Hermitian matrix:

Any real antisymmetric matrix is normal:

As is any antihermitian matrix:

Any real orthogonal matrix is normal:

As is any unitary matrix:

For a normal matrix , TemplateBox[{{n, ., x}}, Norm]=TemplateBox[{{TemplateBox[{n}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], ., x}}, Norm] for all vectors :

The product of two normal matrices need not be normal:

The product will be normal if and only if the two normal matrices commute:

In this case, the sum will be normal as well:

A matrix is normal if and only if its Hermitian and antihermitian parts commute:

A normal matrix is always diagonalizable:

Indeed, it is always unitarily diagonalizable using Eigensystem:

The eigenvectors are orthogonal:

Thus, placing the normalized eigenvectors in columns forms a unitary matrix:

Thus, m=u.d.TemplateBox[{u}, ConjugateTranspose], with the diagonal matrix whose entries are the eigenvalues :

Consider {s,j}=JordanDecomposition[m] for a normal matrix m:

The matrix is always diagonal:

The matrix has columns that are orthogonal but not necessarily orthonormal:

This can be verified more quickly using UnitaryMatrixQ with the setting NormalizedFalse:

For a normal matrix , the matrix of SchurDecomposition[n] is diagonal if complex entries are allowed:

As the diagonal entries are eigenvalues, SchurDecomposition coincides with Eigensystem:

A normal matrix with real eigenvalues is Hermitian:

Verify with HermitianMatrixQ:

A normal matrix with pure imaginary eigenvalues is antihermitian:

Verify with AntihermitianMatrixQ:

A normal matrix whose eigenvalues all have unit modulus is unitary:

Verify with UnitaryMatrixQ:

For any normal matrix, where are eigenvalues of :

Absolute values of eigenvalues of a normal matrix are equal to singular values of the matrix:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_normalmatrixq, organization={Wolfram Research}, title={NormalMatrixQ}, year={2014}, url={https://reference.wolfram.com/language/ref/NormalMatrixQ.html}, note=[Accessed: 25-November-2024 ]}