Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find the null values and vectors for the pencil of a set of square matrices
ResourceFunction["MatrixPencilSolve"][{m0,m1,…,mn}] finds the generalized eigenvalues λ and corresponding vectors v for which the matrix m0+λm1+λ2m2+…λnmn has a nontrivial null space. |
Form some random real-valued matrices:
| In[1]:= | ![]() |
Find the null-valued vectors for the pencil of these matrices:
| In[2]:= |
| Out[2]= | ![]() |
Check that the first of these value/vector pairs satisfies the necessary equation:
| In[3]:= |
| Out[3]= |
MatrixPencilSolve will handle exact as well as approximate input matrices:
| In[4]:= | ![]() |
| Out[7]= |
| In[8]:= |
| Out[8]= | ![]() |
MatrixPencilSolve with one argument is equivalent to obtaining vectors from NullSpace, with λ having no value:
| In[9]:= |
| In[10]:= |
| Out[10]= |
| In[11]:= |
| Out[11]= |
MatrixPencilSolve with two matrices is equivalent to the two-argument form of Eigensystem, with the second matrix negated and the result transposed:
| In[12]:= |
| Out[13]= |
| In[14]:= |
| Out[14]= |
| In[15]:= |
| Out[15]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License