IsSymmetric
Tests if a matrix is symmetric.
Syntax
-
IsSymmetric(A[, ε])
-
A
is a matrix -
ε
is a positive number
-
Description
If A
is a matrix, then IsSymmetric(A)
returns true
iff A
is symmetric, that is, iff A
is square and A[i, j] = A[j, i]
for all valid indices i
and j
. Floating-point comparisons are made with epsilon ε
.
Examples
A ≔ ❨❨5, 1, 2, 3❩, ❨1, 6, 3, 7❩, ❨2, 3, 5, i❩, ❨3, 7, i, 4❩❩
⎛5 1 2 3⎞ ⎜1 6 3 7⎟ ⎜2 3 5 i⎟ ⎝3 7 i 4⎠
IsSymmetric(A)
true