# MatGetVecType
Gets the vector type the matrix will return with `MatCreateVecs()` 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatGetVecType(Mat mat, VecType *vtype)
```
Not Collective


## Input Parameter

- ***mat -*** the matrix



## Output Parameter

- ***name -*** name of vector type





## See Also
 `MatType`, `Mat`, `MatSetVecType()`, `VecType`

## Level
intermediate

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matreg.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)  
