# MatGetOption
Gets a parameter option that has been set for a matrix. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatGetOption(Mat mat, MatOption op, PetscBool *flg)
```
Logically Collective


## Input Parameters

- ***mat -*** the matrix
- ***option -*** the option, this only responds to certain options, check the code for which ones



## Output Parameter

- ***flg -*** turn the option on (`PETSC_TRUE`) or off (`PETSC_FALSE`)





## Notes
Can only be called after `MatSetSizes()` and `MatSetType()` have been set.

Certain option values may be unknown, for those use the routines `MatIsSymmetric()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`, or
`MatIsSymmetricKnown()`, `MatIsHermitianKnown()`, `MatIsStructurallySymmetricKnown()`


## See Also
 `Mat`, `MatOption`, `MatSetOption()`, `MatIsSymmetric()`, `MatIsHermitian()`, `MatIsStructurallySymmetric()`,
`MatIsSymmetricKnown()`, `MatIsHermitianKnown()`, `MatIsStructurallySymmetricKnown()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatGetOption">src/mat/interface/matrix.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
