# MatSolves
Solves A x = b, given a factored matrix, for a collection of vectors 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatSolves(Mat mat, Vecs b, Vecs x)
```
Neighbor-wise Collective


## Input Parameters

- ***mat -*** the factored matrix obtained with `MatGetFactor()`
- ***b -*** the right-hand-side vectors



## Output Parameter

- ***x -*** the result vectors



## Note
The vectors b and x cannot be the same.  I.e., one cannot
call `MatSolves`(A,x,x).




## See Also
 `Vecs`, `MatSolveAdd()`, `MatSolveTranspose()`, `MatSolveTransposeAdd()`, `MatSolve()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatSolves">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)  
