# MatInvertBlockDiagonalMat
set the values of matrix C to be the inverted block diagonal of matrix A 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatInvertBlockDiagonalMat(Mat A, Mat C)
```
Collective on Mat


## Input Parameters

- ***A -*** the matrix
- ***C -*** matrix with inverted block diagonal of `A`.  This matrix should be created and may have its type set.





## Note
The blocksize of the matrix is used to determine the blocks on the diagonal of `C`


## See Also
 `Mat`, `MatInvertBlockDiagonal()`

## Level
advanced

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