In linear algebra, a matrix pencil is a matrix-valued polynomial function defined on a field K {\displaystyle K} , usually the real or complex numbers.