### 14.1.1 Norms of a vector

There are different norms for vectors in ℝn, and Xcas has different commands for computing them. Let L=[a1,…,an] be a list.

maxnorm(L) returns the ℓ∞ norm of L, namely max{|a1|,|a2|,…,|an|}. For example:

maxnorm([3,-4,2])

4 |  |  |  |  |  |  |  |  |  |

Indeed, 4=max{|3|,|−4|,|2|}.

l1norm(L) returns the ℓ1 norm of L, namely |a1|+|a2|+⋯+|an|. For example:

l1norm([3,-4,2])

9 |  |  |  |  |  |  |  |  |  |

Indeed, 9=|3|+|−4|+|2|.

norm(L) and l2norm(L) both return the ℓ2 norm of L, namely √|a1|2+|a2|2+⋯+|an|2. For example:

norm([3,-4,2])

| √ |
29

Indeed, 29=|3|2+|−4|2+|2|2.