# MatProductClear
Clears matrix product internal datastructures. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatProductClear(Mat mat)
```
Collective


## Input Parameters

- ***mat -*** the product matrix





## Notes
This function should be called to remove any intermediate data used to compute the matrix to free up memory.

After having called this function, matrix-matrix operations can no longer be used on mat


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

## Level
intermediate

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


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