Matrix pencil

In linear algebra, if $$A_0, A_1,\dots,A_\ell$$ are $$n\times n$$ complex matrices for some nonnegative integer $$\ell$$, and $$A_\ell \ne 0$$ (the zero matrix), then the matrix pencil of degree $$\ell$$ is the matrix-valued function defined on the complex numbers $$L(\lambda) = \sum_{i=0}^\ell \lambda^i A_i. $$

A particular case is a linear matrix pencil $$A - \lambda B$$ with $$\lambda \in \mathbb C$$ (or $$\mathbb R$$) where $$A$$ and $$B$$ are complex (or real) $$n \times n$$ matrices. We denote it briefly with the notation $$(A,B)$$.

A pencil is called regular if there is at least one value of $$\lambda$$ such that $$\det(A - \lambda B) \neq 0$$. We call eigenvalues of a matrix pencil $$(A,B)$$ all complex numbers $$\lambda$$ for which $$\det(A - \lambda B) = 0$$; in particular, the eigenvalues of the matrix pencil $$(A,I)$$ are the matrix eigenvalues of $$A$$. The set of the eigenvalues is called the spectrum of the pencil and is written $$\sigma(A,B)$$. Moreover, the pencil is said to have one or more eigenvalues at infinity if $$B$$ has one or more 0 eigenvalues.

Applications
Matrix pencils play an important role in numerical linear algebra. The problem of finding the eigenvalues of a pencil is called the generalized eigenvalue problem. The most popular algorithm for this task is the QZ algorithm, which is an implicit version of the QR algorithm to solve the associated eigenvalue problem $$B^{-1}Ax = \lambda x$$ without forming explicitly the matrix $$B^{-1}A$$ (which could be impossible or ill-conditioned if $$B$$ is singular or near-singular)

Pencil generated by commuting matrices
If $$AB = BA$$, then the pencil generated by $$A$$ and $$B$$:
 * 1) consists only of matrices similar to a diagonal matrix, or
 * 2) has no matrices in it similar to a diagonal matrix, or
 * 3) has exactly one matrix in it similar to a diagonal matrix.