# TaoSetGradientNorm
Sets the matrix used to define the norm that measures the size of the gradient. 
## Synopsis
```
#include "petsctao.h" 
PetscErrorCode TaoSetGradientNorm(Tao tao, Mat M)
```
Collective


## Input Parameters

- ***tao  -*** the Tao context
- ***M    -*** matrix that defines the norm





## See Also
 `Tao`, `TaoGetGradientNorm()`, `TaoGradientNorm()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/interface/taosolver.c.html#TaoSetGradientNorm">src/tao/interface/taosolver.c</A>

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/tao/interface/taosolver.c)


[Index of all Tao routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
