[linalg.algs.blas1.matonenorm]

# 29 Numerics library [[numerics]](./#numerics)

## 29.9 Basic linear algebra algorithms [[linalg]](linalg#algs.blas1.matonenorm)

### 29.9.13 BLAS 1 algorithms [[linalg.algs.blas1]](linalg.algs.blas1#matonenorm)

#### 29.9.13.13 One norm of a matrix [linalg.algs.blas1.matonenorm]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L14065)

[*Note [1](#note-1)*:

These functions exist in the BLAS standard[[bib]](bibliography#bib:blas-std "Bibliography") but are not part of the reference implementation[.](#1.sentence-1)

â *end note*]

[ð](#lib:matrix_one_norm)

`template<[in-matrix](linalg.helpers.concepts#concept:in-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InMat, class Scalar>
  Scalar matrix_one_norm(InMat A, Scalar init);
template<class ExecutionPolicy, [in-matrix](linalg.helpers.concepts#concept:in-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InMat, class Scalar>
  Scalar matrix_one_norm(ExecutionPolicy&& exec, InMat A, Scalar init);
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L14080)

*Mandates*: decltype(*abs-if-needed*(declval<typename InMat​::​value_type>())) is convertible to Scalar[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L14085)

*Returns*: 

- [(3.1)](#3.1)

init if A.extent(1) is zero;

- [(3.2)](#3.2)

otherwise, the sum of init and the one norm of the matrix A[.](#3.sentence-1)

[*Note [2](#note-2)*:

The one norm of the matrix A is the maximum over all columns of A,
of the sum of the absolute values of the elements of the column[.](#3.sentence-2)

â *end note*]

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L14099)

*Remarks*: If InMat​::​value_type and Scalar are all floating-point types or specializations of complex,
and if Scalar has higher precision
than InMat​::​value_type,
then intermediate terms in the sum use Scalar's precision or greater[.](#4.sentence-1)

[ð](#lib:matrix_one_norm_)

`template<[in-matrix](linalg.helpers.concepts#concept:in-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InMat>
  auto matrix_one_norm(InMat A);
template<class ExecutionPolicy, [in-matrix](linalg.helpers.concepts#concept:in-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InMat>
  auto matrix_one_norm(ExecutionPolicy&& exec, InMat A);
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L14117)

*Effects*: Let T bedecltype(*abs-if-needed*(declval<typename InMat​::​value_type>())[.](#5.sentence-1)

Then,

- [(5.1)](#5.1)

the one-parameter overload is equivalent to:return matrix_one_norm(A, T{}); and

- [(5.2)](#5.2)

the two-parameter overload is equivalent to:return matrix_one_norm(std::forward<ExecutionPolicy>(exec), A, T{});
