issymmetric
Check whether a matrix is symmetric
Syntax
t = issymmetric(A)
Arguments
- A
real or complex square matrix.
- t
boolean value (%t or %f).
Description
issymmetric checks whether a matrix A is symmetric, that is if A'=A.
For complex matrices, symmetry is tested using the simple tranpose (not the conjugate transpose). Diagonal elements are not taken into account.
To check whether a complex matrix is Hermitian (A*=A), use the ishermitian function.
Examples
X = [1 2 3;2 1 4; 3 4 1]; issymmetric(X) // %t
X = [1 2;3 4]; issymmetric(X) // %f
X = [1 %i; %i 2]; issymmetric(X) // %t
See also
- ishermitian — Check whether a matrix is hermitian
- isequal — tests the strict global equality between several objects, without equivalences
- quote — (') 転置演算子, 文字列デリミタ
History
| バージョン | 記述 |
| 2026.1.0 | Function added. |
| Report an issue | ||
| << ishermitian | Elementary Functions | modulo >> |