# IPNorm

Computes the norm of a vector as the square root of the inner product (x,x) as defined by IPInnerProduct().

### Synopsis

    #include "slepcip.h"
    PetscErrorCode IPNorm(IP ip,Vec x,PetscReal *norm)

Collective on IP and Vec

### Input Parameters

| ip | - the inner product context
| x | - input vector

### Output Parameter

norm - the computed norm

### Notes

This function will usually compute the 2-norm of a vector, ||x||_2. But this behaviour may be different if using a non-standard inner product changed via IPSetMatrix(). For example, if using the B-inner product for positive definite B, (x,y)_B=y^H Bx, then the computed norm is ||x||_B = sqrt(x^H Bx).

In an indefinite inner product, matrix B is indefinite and the norm is defined as s*sqrt(abs(x^H Bx)), where s = sign(x^H Bx).

### See Also

IPInnerProduct()

Location: src/ip/ipdot.c
Index of all IP routines
Table of Contents for all manual pages
Index of all manual pages