# MatNullSpaceGetVecs
get the vectors defining the null space 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatNullSpaceGetVecs(MatNullSpace sp, PetscBool *has_const, PetscInt *n, const Vec **vecs)
```
Not Collective


## Input Parameter

- ***sp -*** null space object



## Output Parameters

- ***has_cnst -*** `PETSC_TRUE` if the null space contains the constant vector, otherwise `PETSC_FALSE`
- ***n -*** number of vectors (excluding constant vector) in null space
- ***vecs -*** orthonormal vectors that span the null space (excluding the constant vector)





## Note
These vectors and the array are owned by the `MatNullSpace` and should not be destroyed or freeded by the caller


## See Also
 `MatNullSpace`, `MatNullSpaceCreate()`, `MatGetNullSpace()`, `MatGetNearNullSpace()`

## Level
developer

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex49.c.html">src/ksp/ksp/tutorials/ex49.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex69.c.html">src/snes/tutorials/ex69.c.html</A><BR>


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