converts the unitary matrix umat to a structured array.

Details and Options

  • Unitary matrices, when represented as structured arrays, allow for a convenient specification and more efficient operations, including Inverse and LinearSolve.
  • Matrix decompositions that use unitary matrices include QR, Hessenberg, Schur and singular value decompositions.
  • For a unitary matrix , the column vectors are orthonormal so that TemplateBox[{{u, _, i}}, Conjugate].u_j=TemplateBox[{{i, ,, j}}, KroneckerDeltaSeq].
  • A square unitary matrix is a matrix whose conjugate transpose is equal to its inverse; that is, it satisfies the relation TemplateBox[{U}, ConjugateTranspose]=TemplateBox[{U}, Inverse].
  • The inverse of a square unitary matrix is also unitary.
  • A matrix of dimensions p×q is orthogonal if pq and TemplateBox[{U}, ConjugateTranspose]U is the q×q identity matrix, or pq and UTemplateBox[{U}, ConjugateTranspose] is the p×p identity matrix.
  • Unitary matrices are closed under matrix multiplication, so is again a unitary matrix.
  • For a UnitaryMatrix sa, the following properties "prop" can be accessed as sa["prop"]:
  • "Matrix"unitary matrix, represented as a full array
    "Properties"list of supported properties
    "Structure"type of structured array
    "StructuredData"internal data stored by the structured array
    "StructuredAlgorithms"list of functions with special methods for the structured array
    "Summary"summary information, represented as a Dataset
  • Normal[UnitaryMatrix[]] gives the unitary matrix as an ordinary matrix.
  • UnitaryMatrix[,TargetStructure->struct] returns the unitary matrix in the format specified by struct. Possible settings include:
  • Automaticautomatically choose the representation returned
    "Dense"represent the matrix as a dense matrix
    "Structured"represent the matrix as a structured array
  • UnitaryMatrix[,TargetStructureAutomatic] is equivalent to UnitaryMatrix[,TargetStructure"Structured"].


open allclose all

Basic Examples  (1)

Construct a unitary matrix:

Show the elements:

Normal can convert a UnitaryMatrix to its ordinary representation:

Scope  (3)

Complex reflection matrices are both unitary and Hermitian:

A rectangular unitary matrix:

Its conjugate transpose is also unitary:

UnitaryMatrix objects include properties that give information about the matrix:

The "Summary" property gives a brief summary of information about the matrix:

The "StructuredAlgorithms" property lists the functions that have structured algorithms:

Options  (1)

TargetStructure  (1)

Return the unitary matrix as a dense matrix:

Return the unitary matrix as a structured array:

Applications  (5)

Matrices drawn from CircularUnitaryMatrixDistribution are unitary:

Matrices drawn from CircularOrthogonalMatrixDistribution are unitary:

The Pauli matrices are unitary matrices:

The matrix exponentials are also unitary:

Unitary matrices preserve the standard inner product on TemplateBox[{}, Complexes]^n. In other words, if is unitary and and are vectors, then :

This means the angles between the vectors are unchanged:

Since the norm is derived from the inner product, norms are preserved as well:

Unitary matrices play an important role in many matrix decompositions:

The matrix H_v=I_n-(2 vTemplateBox[{v}, Conjugate])/(v.TemplateBox[{v}, Conjugate]) is always unitary for any nonzero vector :

is called a Householder reflection; as a pure reflection, its determinant is :

It represents a reflection through a plane perpendicular to , sending to :

Any vector perpendicular to is unchanged by :

In matrix computations, is used to set to zero selected components of a given column vector :

Properties & Relations  (2)

The conjugate transpose of a UnitaryMatrix is equivalent to the inverse of the original matrix:

A real orthogonal matrix is also a unitary matrix:

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


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


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


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


@misc{reference.wolfram_2023_unitarymatrix, author="Wolfram Research", title="{UnitaryMatrix}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/UnitaryMatrix.html}", note=[Accessed: 21-April-2024 ]}


@online{reference.wolfram_2023_unitarymatrix, organization={Wolfram Research}, title={UnitaryMatrix}, year={2023}, url={https://reference.wolfram.com/language/ref/UnitaryMatrix.html}, note=[Accessed: 21-April-2024 ]}