Function Repository Resource:

LogarithmicNorm

Source Notebook

Evaluate the logarithmic norm of a square matrix

Contributed by: Jan Mangaldan

ResourceFunction["LogarithmicNorm"][m,p]

gives the logarithmic p‐norm of the matrix m.

Details

m must be a square matrix.
p can be any of 1, 2 or .
The logarithmic norm μp(m) is defined as , where id is the identity matrix of appropriate size and the norm satisfies .

Examples

Basic Examples (3) 

Logarithmic 1-norm of a 3×3 matrix:

In[1]:=
ResourceFunction[
 "LogarithmicNorm"][{{27, 48, 81}, {-6, 0, 0}, {1, 0, 3}}, 1]
Out[1]=

Logarithmic -norm of a 3×3 matrix:

In[2]:=
ResourceFunction[
 "LogarithmicNorm"][{{27, 48, 81}, {-6, 0, 0}, {1, 0, 3}}, \[Infinity]]
Out[2]=

Logarithmic 2-norm of a 3×3 matrix:

In[3]:=
ResourceFunction[
 "LogarithmicNorm"][{{27, 48, 81}, {-6, 0, 0}, {1, 0, 3}}, 2]
Out[3]=

Scope (2) 

A 3×3 matrix:

In[4]:=
m = {{1, 1, 1}, {1, 2, 3}, {1, 4, 9}};

Evaluate the logarithmic norm with exact arithmetic:

In[5]:=
ResourceFunction["LogarithmicNorm"][m, \[Infinity]]
Out[5]=

Evaluate the logarithmic norm with machine arithmetic:

In[6]:=
ResourceFunction["LogarithmicNorm"][N[m], \[Infinity]]
Out[6]=

Evaluate the logarithmic norm with 20­digit arbitrary precision arithmetic:

In[7]:=
ResourceFunction["LogarithmicNorm"][N[m, 20], \[Infinity]]
Out[7]=

Logarithmic norm of a sparse matrix:

In[8]:=
ResourceFunction["LogarithmicNorm"][
 SparseArray[{{i_, i_} -> 2., {i_, j_} /; Abs[i - j] == 1 -> 1.}, {99,
    99}], 2]
Out[8]=

Properties and Relations (2) 

The logarithmic norm can be negative, and is thus not a matrix norm:

In[9]:=
ResourceFunction["LogarithmicNorm"][\!\(\*
TagBox[
RowBox[{"(", "", GridBox[{
{
RowBox[{"-", "5"}], "2"},
{"1", 
RowBox[{"-", "4"}]}
},
GridBoxAlignment->{"Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[
          0.27999999999999997`], {
Offset[0.7]}, 
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]}, 
Offset[0.2]}, "RowsIndexed" -> {}}], "", ")"}],
Function[BoxForm`e$, 
MatrixForm[BoxForm`e$]]]\), 1]
Out[9]=

The logarithmic 2-norm of m is equal to the largest eigenvalue of :

In[10]:=
ResourceFunction["LogarithmicNorm"][\!\(\*
TagBox[
RowBox[{"(", "", GridBox[{
{"1", 
RowBox[{"2", " ", "I"}]},
{
RowBox[{"3", "+", 
RowBox[{"4", " ", "I"}]}], "5"}
},
GridBoxAlignment->{"Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[
          0.27999999999999997`], {
Offset[0.7]}, 
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]}, 
Offset[0.2]}, "RowsIndexed" -> {}}], "", ")"}],
Function[BoxForm`e$, 
MatrixForm[BoxForm`e$]]]\), 2]
Out[10]=
In[11]:=
Max[Eigenvalues[(({
       {1, 2 I},
       {3 + 4 I, 5}
      }) + ConjugateTranspose[({
        {1, 2 I},
        {3 + 4 I, 5}
       })])/2]]
Out[11]=

Version History

  • 1.0.0 – 19 January 2022

Source Metadata

Related Resources

License Information