Matrices
Details
- Valid dimension specifications di in Matrices[{d1,d2},dom,sym] are positive integers. It is also possible to work with symbolic dimension specifications.
- Valid component domain specifications dom are either Reals or Complexes. Matrices[{d1,d2}] uses Complexes by default.
- Possible specifications for matrix symmetry include:
-
{} no symmetry Symmetric[{1,2}] mm Antisymmetric[{1,2}] m-m Hermitian[{1,2}] mm Antihermitian[{1,2}] m-m - Matrices with nontrivial symmetry must be square.
Examples
open all close allBasic Examples (1)
An antisymmetric real matrix in dimension
:
$Assumptions = M∈Matrices[{d, d}, Reals, Antisymmetric[{1, 2}]]The Dot product of
with itself is also a
×
matrix:
M.M//TensorDimensionsBut now it is a symmetric matrix:
M.M//TensorSymmetryScope (1)
Declare matrices of any dimensions, with complex entries and no symmetry:
$Assumptions = M∈Matrices[{d1, d2}]$Assumptions = M∈Matrices[{3, 3}, Reals, Symmetric[{1, 2}]]$Assumptions = M∈Matrices[{d, d}, Complexes, Antisymmetric[All]]TensorContract[M, {{1, 2}}]//TensorReduceApplications (3)
$Assumptions = M∈Matrices[{d, d}, Reals];Inverse[M].MatrixPower[M, 3].M%//TensorReduceInverse[%]//TensorReduceCheck whether a matrix belongs to a given domain:
{{1, 2}, {2, 3}}∈Matrices[{2, 2}, Reals, Symmetric[{1, 2}]]{{1, Pi, I}, {E, 1., 3 / 2}}∈Matrices[{2, 3}, Reals]Conditions involving symbolic parameters may be converted into simpler conditions:
{{Subscript[m, 11], Subscript[m, 12]}, {Subscript[m, 21], Subscript[m, 22]}}∈Matrices[{d, d}, Reals, Symmetric[{1, 2}]]{{Subscript[m, 11], Subscript[m, 12]}, {Subscript[m, 21], Subscript[m, 22]}}∈Matrices[{d, d}, Reals, Antisymmetric[{1, 2}]]{v, {Subscript[x, 1], Subscript[x, 2], Subscript[x, 3]}}∈Matrices[{2, d}, Reals]Assuming[(v1 | v2)∈Vectors[d, Reals], Refine[{v1, v2}∈Matrices[{2, d}, Complexes]]]Properties & Relations (3)
Matrices can also be defined using Arrays with rank 2. These two assumptions are equivalent:
$Assumptions = M∈Arrays[{4, 4}, Complexes, Symmetric[{1, 2}]]$Assumptions = M∈Matrices[{4, 4}, Complexes, Symmetric[{1, 2}]]{{1, 2}, {3, {4}}}∈Matrices[{2, 2}]Two alternative ways of checking numerical matrices:
Element[{{2., 3E}, {I + 1, Sqrt[2 / 3]}}, Matrices[{2, 2}, Complexes]]MatrixQ[{{2., 3E}, {I + 1, Sqrt[2 / 3]}}, NumericQ]Possible Issues (2)
Addition of symbolic and explicit matrices is determined by the Listable attribute of Plus:
Assuming[m∈Matrices[{2, 2}], m + {{1, 2}, {3, 4}}]Hence, listability will in general affect operations that simultaneously involve both symbolic and explicit matrices.
The zero matrix may be represented as 0 in symbolic computations:
Assuming[m∈Matrices[{2, 2}], m - m]Tech Notes
Related Guides
History
Text
Wolfram Research (2012), Matrices, Wolfram Language function, https://reference.wolfram.com/language/ref/Matrices.html.
CMS
Wolfram Language. 2012. "Matrices." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Matrices.html.
APA
Wolfram Language. (2012). Matrices. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Matrices.html
BibTeX
@misc{reference.wolfram_2026_matrices, author="Wolfram Research", title="{Matrices}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/Matrices.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_matrices, organization={Wolfram Research}, title={Matrices}, year={2012}, url={https://reference.wolfram.com/language/ref/Matrices.html}, note=[Accessed: 12-June-2026]}