# norm

Vector and matrix norms

## Description

returns the Euclidean norm of
vector `n`

= norm(`v`

)`v`

. This norm is also called the 2-norm, vector
magnitude, or Euclidean length.

returns the generalized vector
`n`

= norm(`v`

,`p`

)*p*-norm.

returns the `n`

= norm(`X`

,`p`

)*p*-norm of matrix `X`

, where
`p`

is `1`

, `2`

, or
`Inf`

:

If

`p = 1`

, then`n`

is the maximum absolute column sum of the matrix.If

`p = 2`

, then`n`

is approximately`max(svd(X))`

. This value is equivalent to`norm(X)`

.If

`p = Inf`

, then`n`

is the maximum absolute row sum of the matrix.

returns the Frobenius norm of
matrix or array `n`

= norm(`X`

,"fro")`X`

.

## Examples

## Input Arguments

## Output Arguments

## More About

## Tips

Use

`vecnorm`

to treat a matrix or array as a collection of vectors and calculate the norm along a specified dimension. For example,`vecnorm`

can calculate the norm of each column in a matrix.

## Extended Capabilities

## Version History

**Introduced before R2006a**