:orphan:
# MatSetTransposeNullSpace
attaches the null space of a transpose of a matrix to the matrix 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatSetTransposeNullSpace(Mat mat, MatNullSpace nullsp)
```
Logically Collective


## Input Parameters

- ***mat -*** the matrix
- ***nullsp -*** the null space object





## Notes
This allows solving singular linear systems defined by the transpose of the matrix using `KSP` solvers with left preconditioning.

See `MatSetNullSpace()`


## See Also
 [](ch_matrices), `Mat`, `MatNullSpace`, `MatCreate()`, `MatNullSpaceCreate()`, `MatSetNearNullSpace()`, `MatGetNullSpace()`, `MatSetNullSpace()`, `MatGetTransposeNullSpace()`, `MatNullSpaceRemove()`, `KSPSetPCSide()`

## Level
advanced

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

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


---
[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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
