Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Evaluate the matrix sign function
ResourceFunction["MatrixSign"][m] gives the matrix sign of m. | |
ResourceFunction["MatrixSign"][m,v] gives the matrix sign of m applied to the vector v. |
Sign of a 2×2 matrix:
In[1]:= |
Out[1]= |
Sign applied to a vector:
In[2]:= |
Out[2]= |
Find the matrix sign of a MachinePrecision matrix:
In[3]:= |
Out[3]= |
Matrix sign of a complex matrix:
In[4]:= |
Out[4]= |
Matrix sign of an exact matrix:
In[5]:= |
Out[5]= |
Matrix sign of an arbitrary-precision matrix:
In[6]:= |
Out[6]= |
Matrix sign of a symbolic matrix:
In[7]:= |
Out[7]= |
Computing the sign of large machine-precision matrices is efficient:
In[8]:= |
Out[8]= |
Directly applying the sign to a single vector is more efficient:
In[9]:= |
Out[9]= |
Directly apply the matrix sign of a sparse matrix to a sparse vector:
In[10]:= |
Out[10]= |
The matrix sign is involutory:
In[11]:= |
Out[11]= |
If m is invertible, its matrix sign has eigenvalues of ±1:
In[12]:= |
Out[13]= |
The matrix sign of a diagonal matrix is diagonal:
In[14]:= |
Out[14]= |
If m is invertible, then sgn(m) is unimodular (has Det(sgn(m))=±1):
In[15]:= |
Out[15]= |
In[16]:= |
Out[16]= |
If m is diagonalizable with m=v-1.d.v, then sgn(m)=v-1.sgn(Re(d)).v:
In[17]:= |
Out[17]= |
In[18]:= |
Out[18]= |
Verify an identity involving the matrix sign and the matrix square root:
In[19]:= |
Out[19]= |
This work is licensed under a Creative Commons Attribution 4.0 International License