# MatIsSymmetric

Test whether a matrix is symmetric

### Synopsis

    #include "petscmat.h"
    PetscErrorCode  MatIsSymmetric(Mat A,PetscReal tol,PetscTruth *flg)

Collective on Mat

### Input Parameter

| A | - the matrix to test
| tol | - difference between value and its transpose less than this amount counts as equal (use 0.0 for exact transpose)

### Output Parameters

flg -the result

### C++ variants

| PetscTruth MatIsSymmetric(Mat A) |  | -> |  | MatIsSymmetric(A,0,&t); return t;
| PetscTruth MatIsSymmetric(Mat A,PetscReal tol) |  | -> |  | MatIsSymmetric(A,tol,&t); return t;

### See Also

MatTranspose(), MatIsTranspose(), MatIsHermitian(), MatIsStructurallySymmetric(), MatSetOption(), MatIsSymmetricKnown()

Level:intermediate
Location: src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages