How this calculation works
A generalized eigenproblem compares two matrices rather than fixing the second one to the identity. Forming B inverse is impossible when B is singular and can hide valid infinite eigenvalues. This page instead computes det(A−λB) exactly. A nonzero determinant polynomial defines a regular pencil; its rational roots give finite eigenvalues, and a degree shortfall gives the infinite algebraic multiplicity. An identically zero polynomial marks a singular pencil, for which the ordinary regular-pencil eigenvalue list is not a complete description.
Av=λBv; for a regular n×n pencil, infinite algebraic multiplicity is n−degree(det(A−λB)).A worked example
Take A=diag(2,3) and B=diag(1,0). Their determinant polynomial is 6−3λ. The finite eigenvalue is two, with right eigenvector (1,0). Since the matrix order is two but the determinant degree is one, there is also one infinite eigenvalue. The direction (0,1) lies in ker(B). Replacing both second diagonal entries by zero makes the determinant identically zero, producing a singular pencil rather than another ordinary finite eigenvalue.
Good to know
Two same-order rational square matrices of size one through four. For regular pencils, every finite root must be rational; unsupported finite eigenvalues raise an error rather than being dropped. Singular-pencil status is supported, but minimal indices and a full Kronecker canonical decomposition are not. Infinite algebraic multiplicity and kernel dimension are different quantities. Generalized chains for matrix pencils are outside the returned eigenspace basis.
Reference: SciPy — generalized and homogeneous eigenvalue conventions (opens in a new tab) ↗
An infinite eigenvalue is a projective eigenvalue, not a division error
Using a homogeneous pair (α,β), the eigenvector relation is βAv=αBv. Finite λ corresponds to β≠0 and λ=α/β; an infinite eigenvalue has β=0. This convention allows a regular pencil with singular B to retain all algebraic eigenvalue multiplicities. Kernel directions of B are reported as infinite eigenvector directions, while the determinant degree supplies their algebraic multiplicity.
The matrix A=I with nilpotent B=((0,1),(0,0)) illustrates the distinction: det(A−λB)=1, so both algebraic eigenvalues are infinite, but ker(B) is only one-dimensional. Counting just zero eigenvalues of B or attempting a numerical reciprocal would miss the generalized structure. The page states both quantities without claiming to construct the missing infinite chains.
A singular pencil needs a different canonical problem
If det(A−λB) vanishes identically, its zero set cannot be treated as a finite root list. A common null vector can be one cause, but singular pencils can also carry polynomial nullspace structure without a common constant null vector. The explicit singular status therefore avoids assigning arbitrary ordinary eigenvalue multiplicities. It does not certify that every scalar gives a regular eigenspace of the same dimension.
For a regular pencil, each displayed finite vector is substituted into Av=λBv exactly. Repeated eigenvalues may have smaller eigenspaces, just as in ordinary Jordan theory; algebraic multiplicity alone does not guarantee a full basis. The Jordan normal form calculator treats B=I with supported eigenvalues, while this page preserves the second matrix and the finite-versus-infinite distinction. Use the declared pencil convention when comparing signs of the determinant polynomial.
A few questions, answered
Does singular B make the pencil singular?
Not necessarily. A pencil is regular when det(A−λB) is not identically zero. Singular B can instead produce ordinary infinite eigenvalues of a regular pencil.
Must I invert B first?
No. Enter A and B directly. The determinant-pencil method supports singular B and avoids changing the problem by an unavailable inverse.