AntisymmetricMatrixQ
Details and Options
- AntisymmetricMatrixQ is also known as skew-symmetric.
- A matrix m is antisymmetric if m-Transpose[m].
- AntisymmetricMatrixQ 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
.
Examples
open all close allBasic Examples (2)
Test if a numeric 2×2 matrix is explicitly antisymmetric:
AntisymmetricMatrixQ[(| | |
| -- | - |
| 0 | 2 |
| -2 | 0 |)]Test if a symbolic 3×3 matrix is antisymmetric:
AntisymmetricMatrixQ[(| | | |
| -- | -- | - |
| 0 | a | b |
| -a | 0 | c |
| -b | -c | 0 |)]Scope (10)
Basic Uses (6)
Test if a real machine-precision matrix is antisymmetric:
m = {{0, -2.3}, {2.3, 0}};AntisymmetricMatrixQ[m]A real antisymmetric matrix is also antihermitian:
AntihermitianMatrixQ[m]Test if a complex matrix is antisymmetric:
m = {{0, 2 - 3I}, {-2 + 3I, 0}};AntisymmetricMatrixQ[m]A complex antisymmetric matrix has antisymmetric real and imaginary parts:
{AntisymmetricMatrixQ[Re[m]], AntisymmetricMatrixQ[Im[m]]}Test if an exact matrix is antisymmetric:
m = (| | | |
| - | -- | -- |
| 4 | -5 | 2 |
| 3 | -3 | -3 |
| 5 | 5 | 5 |);AntisymmetricMatrixQ[m]Make the matrix antisymmetric:
AntisymmetricMatrixQ[(m - m^/2)]Use AntisymmetricMatrixQ with an arbitrary-precision matrix:
m = RandomReal[5, {3, 3}, WorkingPrecision -> 15]A random matrix is typically not antisymmetric:
AntisymmetricMatrixQ[m]Use AntisymmetricMatrixQ with a symbolic matrix:
AntisymmetricMatrixQ[{{a, b}, {c, d}}]The matrix becomes antisymmetric when
and
:
Block[{c = -b, a = d = 0}, AntisymmetricMatrixQ[{{a, b}, {c, d}}]]AntisymmetricMatrixQ works efficiently with large numerical matrices:
m = RandomReal[1, {1000, 1000}];AbsoluteTiming[AntisymmetricMatrixQ[m]]a = m - m^;
AbsoluteTiming[AntisymmetricMatrixQ[a]]Special Matrices (4)
Use AntisymmetricMatrixQ with sparse matrices:
SparseArray[{i_, j_} -> (i - j) / (i + j) ^ 2, {5, 5}]AntisymmetricMatrixQ[%]Use AntisymmetricMatrixQ with structured matrices:
SymmetrizedArray[{{1, 2} -> a, {2, 3} -> b}, {3, 3}, Antisymmetric[{1, 2}]]AntisymmetricMatrixQ[%]Use with a QuantityArray structured matrix:
QuantityArray[{{1, 2}, {2, 5}}, "Meters"]AntisymmetricMatrixQ[%]The identity matrix is not antisymmetric:
AntisymmetricMatrixQ[IdentityMatrix[3]]HilbertMatrix is not antisymmetric:
AntisymmetricMatrixQ[HilbertMatrix[5]]Options (2)
SameTest (1)
This matrix is antisymmetric for a positive real
, but AntisymmetricMatrixQ gives False:
m = {{0, Log[x ^ 2]}, {-2 Log[x], 0}};AntisymmetricMatrixQ[m]Use the option SameTest to get the correct answer:
AntisymmetricMatrixQ[m, SameTest -> (Simplify[#1 - #2, x > 0] == 0&)]Tolerance (1)
Generate a real-valued antisymmetric matrix with some random perturbation of order
:
SeedRandom[12];
m = Block[{a = RandomReal[1, {3, 3}]}, a - a^];
m = m + 10^-14 RandomReal[10, {3, 3}];AntisymmetricMatrixQ[m]Adjust the option Tolerance to accept this matrix as antisymmetric:
AntisymmetricMatrixQ[m, Tolerance -> 10 ^ -12]The norm of the difference between the matrix and its transpose with opposite sign:
(m + m^)//NormApplications (5)
Any matrix generated from an antisymmetric function
is antisymmetric:
f[i_, j_] := i - jThe function is antisymmetric:
f[i, j] == -f[j, i]Using Table generates an antisymmetric matrix:
AntisymmetricMatrixQ[Table[f[i, j], {i, 5}, {j, 5}]]SymmetrizedArray can generate matrices (and general arrays) with symmetries:
SymmetrizedArray[{{1, 2} -> a, {2, 3} -> b}, {3, 3}, Antisymmetric[{1, 2}]]AntisymmetricMatrixQ[%]Consider the family of rotation matrices corresponding to rotation by
in the plane:
r[θ_] := (| | |
| ------ | ------- |
| Cos[θ] | -Sin[θ] |
| Sin[θ] | Cos[θ] |)The logarithmic derivative
is antisymmetric:
D[r[θ], θ].Inverse[r[θ]]//FullSimplifyAntisymmetricMatrixQ[%]This will be true of any 1-parameter family of rotations:
rot = RotationMatrix[θ, RandomReal[1, 3, WorkingPrecision -> 5]];
AntisymmetricMatrixQ[D[rot, θ].Inverse[rot]]The cross product of two vectors can be expressed as a product of an antisymmetric matrix and a vector:
{a, b, c}⨯{x, y, z} == (| | | |
| -- | -- | -- |
| 0 | -c | b |
| c | 0 | -a |
| -b | a | 0 |).{x, y, z}AntisymmetricMatrixQ[(| | | |
| -- | -- | -- |
| 0 | -c | b |
| c | 0 | -a |
| -b | a | 0 |)](| | | |
| -- | -- | -- |
| 0 | -c | b |
| c | 0 | -a |
| -b | a | 0 |).{a, b, c} == {0, 0, 0}{x, y, z}.((| | | |
| -- | -- | -- |
| 0 | -c | b |
| c | 0 | -a |
| -b | a | 0 |).{x, y, z})//Simplify Find the function
satisfying this time-dependent 3D equation:
(ⅆx/ⅆt) = Overscript[v, ⇀]⨯x, Overscript[v, ⇀] = {2, -1, 1}, x(0) = {1, 0, -1};Represent the cross product by means of multiplication by the antisymmetric matrix
:
vvec = {2, -1, 1};
(v = -LeviCivitaTensor[3].vvec)//MatrixFormAntisymmetricMatrixQ[v]v.{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3]} == vvec⨯{Subscript[x, 1], Subscript[x, 2], Subscript[x, 3]}Compute the exponential
and use it to define a solution to the equation:
u[t_] := MatrixExp[v t]
x0 = {1, 0, -1};
x[t_] = u[t].x0Verify that
satisfies the differential equation and initial condition:
x'[t] == v.x[t] && x[0] == x0//SimplifyThe matrix
is orthogonal for all values of
:
OrthogonalMatrixQ[u[t]]Thus, the orbit of the solution is at a constant distance from the origin, in this case a circle:
Show[ParametricPlot3D[x[t], {t, 0., 5.}, PlotStyle -> Tube[0.02]], Graphics3D[{Opacity[.5], Sphere[{0, 0, 0}, Norm[x0]]}], PlotRange -> All]Properties & Relations (15)
AntiymmetricMatrixQ[x] trivially returns False for any x that is not a matrix:
AntisymmetricMatrixQ[Sqrt[3]]A matrix is antisymmetric if m-Transpose[m]:
m = (| | | |
| ------ | ------- | -- |
| 0 | -2 - 2I | 3 |
| 2 + 2I | 0 | -I |
| -3 | I | 0 |);{m == -Transpose[m], AntisymmetricMatrixQ[m]}An antisymmetric matrix must have zeros on the diagonal:
m = (| | |
| -- | -- |
| 0. | I |
| -I | 0 |);AntisymmetricMatrixQ[m]Use Diagonal to pick out the diagonal elements:
Diagonal[m]A real-valued antisymmetric matrix is antihermitian:
m = (| | |
| - | -- |
| 0 | -2 |
| 2 | 0 |);{AntisymmetricMatrixQ[m], AntihermitianMatrixQ[m]}But a complex-valued antisymmetric matrix may not be:
m = (| | |
| -------- | ------- |
| 0 | 2 + 2 I |
| -2 - 2 I | 0 |);{AntisymmetricMatrixQ[m], AntihermitianMatrixQ[m]}Use Symmetrize with the symmetry Antisymmetric to compute the antisymmetric part of a matrix:
m = RandomReal[1, {3, 3}];Symmetrize[m, Antisymmetric[{1, 2}]]This equals the normalized difference between m and Transpose[m]:
% == (m - m/2)Any matrix can be represented as the sum of its symmetric and antisymmetric parts:
m = RandomComplex[1 + I, {3, 3}];
{sym, asym} = {(m + m) / 2, (m - m) / 2};m == sym + asymUse SymmetricMatrixQ to test whether a matrix is symmetric:
{SymmetricMatrixQ[sym], AntisymmetricMatrixQ[asym]}If
is an antisymmetric matrix with real entries, then
is Hermitian:
m = Block[{a = RandomReal[1, {5, 5}]}, a - a^];{AntisymmetricMatrixQ[m], HermitianMatrixQ[I m]}MatrixExp[m] for real antisymmetric m is both orthogonal and unitary:
m = Symmetrize[RandomReal[1, {5, 5}], Antisymmetric[{1, 2}]];
expm = MatrixExp[m];{OrthogonalMatrixQ[expm], UnitaryMatrixQ[expm]}For complex antisymmetric m, the exponential is orthogonal but not, in general, unitary:
mc = Symmetrize[RandomComplex[1 + I, {5, 5}], Antisymmetric[{1, 2}]];
expmc = MatrixExp[mc];{OrthogonalMatrixQ[expmc], UnitaryMatrixQ[expmc]}A real-valued antisymmetric matrix is always a normal matrix:
m = Block[{a = RandomReal[1, {5, 5}]}, a - a^];{AntisymmetricMatrixQ[m], NormalMatrixQ[m]}A complex-valued antisymmetric matrix need not be normal:
c = (| | | |
| -- | - | - |
| 0 | 1 | I |
| -1 | 0 | 0 |
| -I | 0 | 0 |);{AntisymmetricMatrixQ[c], NormalMatrixQ[c]}Real-valued antisymmetric matrices have pure imaginary eigenvalues:
m = Block[{a = RandomReal[1, {4, 4}]}, a - a];AntisymmetricMatrixQ[m]Use Eigenvalues to find eigenvalues:
Eigenvalues[m]//ChopNote that a complex-valued antisymmetric matrix may have both real and complex eigenvalues:
c = (| | | | |
| -- | ------ | -- | ----- |
| 0 | I | -I | I |
| -I | 0 | 1 | 1 - I |
| I | -1 | 0 | -1 |
| -I | -1 + I | 1 | 0 |);AntisymmetricMatrixQ[c]Eigenvalues[c]Consider a real antisymmetric m of even dimensions:
m = Block[{a = RandomReal[1, {4, 4}]}, a - a];CharacteristicPolynomial[m,x] contains only even powers of x:
CharacteristicPolynomial[m, x]//ChopFor an odd-dimensioned m, the polynomial contains only odd powers:
m = Block[{a = RandomReal[1, {5, 5}]}, a - a];CharacteristicPolynomial[m, x]//ChopReal-valued antisymmetric matrices have a complete set of eigenvectors:
m = Block[{a = RandomReal[1, {3, 3}]}, a - a];AntisymmetricMatrixQ[m]As a consequence, they must be diagonalizable:
DiagonalizableMatrixQ[m]Use Eigenvectors to find the necessarily complex-valued eigenvectors:
Eigenvectors[m]//ChopNote that a complex-valued antisymmetric matrix need not have these properties:
c = (| | | |
| - | -- | -- |
| 0 | 0 | -I |
| 0 | 0 | 1 |
| I | -1 | 0 |);{AntisymmetricMatrixQ[c], DiagonalizableMatrixQ[c]}Det[m] for antisymmetric m of odd dimensions is zero:
m = Block[{a = RandomComplex[1 + I, {5, 5}]}, a - a];{AntisymmetricMatrixQ[m], Det[m]//Chop}If m has even dimensions and its entries are real, its determinant is non-negative:
m = Block[{a = RandomReal[1, {6, 6}]}, a - a];{AntisymmetricMatrixQ[m], Det[m] >= 0}The inverse of an antisymmetric matrix is antisymmetric:
m = Block[{a = RandomComplex[1 + I, {4, 4}]}, a - a];AntisymmetricMatrixQ[Inverse[m]]Odd powers of an antisymmetric matrix are antisymmetric:
m = Block[{a = RandomComplex[1 + I, {3, 3}, WorkingPrecision -> 5]}, a - a];AntisymmetricMatrixQ[MatrixPower[m, 9]]SymmetricMatrixQ[MatrixPower[m, 8]]Possible Issues (1)
AntisymmetricMatrixQ uses the definition
for both real- and complex-valued matrices:
c = (| | | |
| -- | - | - |
| 0 | 1 | I |
| -1 | 0 | 0 |
| -I | 0 | 0 |);{AntisymmetricMatrixQ[c] , c == -c}These complex matrices need not be normal or possess many properties of skew-adjoint (real antisymmetric) matrices:
NormalMatrixQ[c]AntihermitianMatrixQ tests the condition
for skew-adjoint matrices:
AntihermitianMatrixQ[c]Alternatively, test if the entries are real to restrict to real symmetric matrices:
antisymmetricMatrixQ[m_] := AntisymmetricMatrixQ[m] && Element[m, Reals]antisymmetricMatrixQ[c]Related Guides
History
Text
Wolfram Research (2014), AntisymmetricMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/AntisymmetricMatrixQ.html.
CMS
Wolfram Language. 2014. "AntisymmetricMatrixQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AntisymmetricMatrixQ.html.
APA
Wolfram Language. (2014). AntisymmetricMatrixQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AntisymmetricMatrixQ.html
BibTeX
@misc{reference.wolfram_2026_antisymmetricmatrixq, author="Wolfram Research", title="{AntisymmetricMatrixQ}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/AntisymmetricMatrixQ.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_antisymmetricmatrixq, organization={Wolfram Research}, title={AntisymmetricMatrixQ}, year={2014}, url={https://reference.wolfram.com/language/ref/AntisymmetricMatrixQ.html}, note=[Accessed: 13-June-2026]}