
In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, the kernel of a
linear map
In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that p ...
, also known as the null space or nullspace, is the part of the
domain which is mapped to the
zero vector
In mathematics, a zero element is one of several generalizations of the number zero to other algebraic structures. These alternate meanings may or may not reduce to the same thing, depending on the context.
Additive identities
An '' additive id ...
of the
co-domain; the kernel is always a
linear subspace
In mathematics, the term ''linear'' is used in two distinct senses for two different properties:
* linearity of a ''function (mathematics), function'' (or ''mapping (mathematics), mapping'');
* linearity of a ''polynomial''.
An example of a li ...
of the domain. That is, given a linear map between two
vector space
In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
s and , the kernel of is the vector space of all elements of such that , where denotes the
zero vector
In mathematics, a zero element is one of several generalizations of the number zero to other algebraic structures. These alternate meanings may or may not reduce to the same thing, depending on the context.
Additive identities
An '' additive id ...
in ,
or more symbolically:
Properties

The kernel of is a
linear subspace
In mathematics, the term ''linear'' is used in two distinct senses for two different properties:
* linearity of a ''function (mathematics), function'' (or ''mapping (mathematics), mapping'');
* linearity of a ''polynomial''.
An example of a li ...
of the domain .
[Linear algebra, as discussed in this article, is a very well established mathematical discipline for which there are many sources. Almost all of the material in this article can be found in , , and Strang's lectures.]
In the linear map
two elements of have the same
image
An image or picture is a visual representation. An image can be Two-dimensional space, two-dimensional, such as a drawing, painting, or photograph, or Three-dimensional space, three-dimensional, such as a carving or sculpture. Images may be di ...
in
if and only if
In logic and related fields such as mathematics and philosophy, "if and only if" (often shortened as "iff") is paraphrased by the biconditional, a logical connective between statements. The biconditional is true in two cases, where either bo ...
their difference lies in the kernel of , that is,
From this, it follows by the
first isomorphism theorem that the image of is
isomorphic
In mathematics, an isomorphism is a structure-preserving mapping or morphism between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between the ...
to the
quotient of by the kernel:
In the case where is
finite-dimensional
In mathematics, the dimension of a vector space ''V'' is the cardinality (i.e., the number of vectors) of a basis of ''V'' over its base field. p. 44, §2.36 It is sometimes called Hamel dimension (after Georg Hamel) or algebraic dimension to d ...
, this implies the
rank–nullity theorem:
where the term refers to the dimension of the image of ,
while ' refers to the dimension of the kernel of ,
That is,
so that the rank–nullity theorem can be restated as
When is an
inner product space
In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
, the quotient
can be identified with the
orthogonal complement in of
. This is the generalization to linear operators of the
row space, or
coimage In algebra, the coimage of a homomorphism
:f : A \rightarrow B
is the quotient
:\text f = A/\ker(f)
of the domain by the kernel.
The coimage is canonically isomorphic to the image by the first isomorphism theorem, when that theorem applies ...
, of a matrix.
Generalization to modules
The notion of kernel also makes sense for
homomorphism
In algebra, a homomorphism is a morphism, structure-preserving map (mathematics), map between two algebraic structures of the same type (such as two group (mathematics), groups, two ring (mathematics), rings, or two vector spaces). The word ''homo ...
s of
modules, which are generalizations of vector spaces where the scalars are elements of a
ring, rather than a
field. The domain of the mapping is a module, with the kernel constituting a
submodule. Here, the concepts of rank and nullity do not necessarily apply.
In functional analysis
If and are
topological vector space
In mathematics, a topological vector space (also called a linear topological space and commonly abbreviated TVS or t.v.s.) is one of the basic structures investigated in functional analysis.
A topological vector space is a vector space that is als ...
s such that is finite-dimensional, then a linear operator is
continuous if and only if the kernel of is a
closed subspace of .
Representation as matrix multiplication
Consider a linear map represented as a matrix with coefficients in a
field (typically
or
), that is operating on column vectors with components over .
The kernel of this linear map is the set of solutions to the equation , where is understood as the
zero vector
In mathematics, a zero element is one of several generalizations of the number zero to other algebraic structures. These alternate meanings may or may not reduce to the same thing, depending on the context.
Additive identities
An '' additive id ...
. The
dimension
In physics and mathematics, the dimension of a mathematical space (or object) is informally defined as the minimum number of coordinates needed to specify any point within it. Thus, a line has a dimension of one (1D) because only one coo ...
of the kernel of ''A'' is called the nullity of ''A''. In
set-builder notation,
The matrix equation is equivalent to a homogeneous
system of linear equations
In mathematics, a system of linear equations (or linear system) is a collection of two or more linear equations involving the same variable (math), variables.
For example,
: \begin
3x+2y-z=1\\
2x-2y+4z=-2\\
-x+\fracy-z=0
\end
is a system of th ...
:
Thus the kernel of ''A'' is the same as the solution set to the above homogeneous equations.
Subspace properties
The kernel of a matrix over a field is a
linear subspace
In mathematics, the term ''linear'' is used in two distinct senses for two different properties:
* linearity of a ''function (mathematics), function'' (or ''mapping (mathematics), mapping'');
* linearity of a ''polynomial''.
An example of a li ...
of . That is, the kernel of , the set , has the following three properties:
# always contains the
zero vector
In mathematics, a zero element is one of several generalizations of the number zero to other algebraic structures. These alternate meanings may or may not reduce to the same thing, depending on the context.
Additive identities
An '' additive id ...
, since .
# If and , then . This follows from the distributivity of
matrix multiplication
In mathematics, specifically in linear algebra, matrix multiplication is a binary operation that produces a matrix (mathematics), matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the n ...
over addition.
# If and is a
scalar , then , since .
The row space of a matrix
The product ''A''x can be written in terms of the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
of vectors as follows:
Here, denote the rows of the matrix . It follows that is in the kernel of , if and only if is
orthogonal
In mathematics, orthogonality (mathematics), orthogonality is the generalization of the geometric notion of ''perpendicularity''. Although many authors use the two terms ''perpendicular'' and ''orthogonal'' interchangeably, the term ''perpendic ...
(or perpendicular) to each of the row vectors of (since orthogonality is defined as having a dot product of 0).
The
row space, or coimage, of a matrix is the
span of the row vectors of . By the above reasoning, the kernel of is the
orthogonal complement to the row space. That is, a vector lies in the kernel of , if and only if it is perpendicular to every vector in the row space of .
The dimension of the row space of is called the
rank of ''A'', and the dimension of the kernel of is called the nullity of . These quantities are related by the
rank–nullity theorem
Left null space
The left null space, or
cokernel
The cokernel of a linear mapping of vector spaces is the quotient space of the codomain of by the image of . The dimension of the cokernel is called the ''corank'' of .
Cokernels are dual to the kernels of category theory, hence the nam ...
, of a matrix consists of all column vectors such that , where T denotes the
transpose
In linear algebra, the transpose of a Matrix (mathematics), matrix is an operator which flips a matrix over its diagonal;
that is, it switches the row and column indices of the matrix by producing another matrix, often denoted by (among other ...
of a matrix. The left null space of is the same as the kernel of . The left null space of is the orthogonal complement to the
column space of , and is dual to the
cokernel
The cokernel of a linear mapping of vector spaces is the quotient space of the codomain of by the image of . The dimension of the cokernel is called the ''corank'' of .
Cokernels are dual to the kernels of category theory, hence the nam ...
of the associated linear transformation. The kernel, the row space, the column space, and the left null space of are the four fundamental subspaces associated with the matrix .
Nonhomogeneous systems of linear equations
The kernel also plays a role in the solution to a nonhomogeneous system of linear equations:
If and are two possible solutions to the above equation, then
Thus, the difference of any two solutions to the equation lies in the kernel of .
It follows that any solution to the equation can be expressed as the sum of a fixed solution and an arbitrary element of the kernel. That is, the solution set to the equation is
Geometrically, this says that the solution set to is the
translation
Translation is the communication of the semantics, meaning of a #Source and target languages, source-language text by means of an Dynamic and formal equivalence, equivalent #Source and target languages, target-language text. The English la ...
of the kernel of by the vector . See also
Fredholm alternative and
flat (geometry)
In geometry, a flat is an affine subspace, i.e. a subset of an affine space that is itself an affine space. Particularly, in the case the parent space is Euclidean, a flat is a Euclidean subspace which inherits the notion of distance from it ...
.
Illustration
The following is a simple illustration of the computation of the kernel of a matrix (see , below for methods better suited to more complex calculations). The illustration also touches on the row space and its relation to the kernel.
Consider the matrix
The kernel of this matrix consists of all vectors for which
which can be expressed as a homogeneous
system of linear equations
In mathematics, a system of linear equations (or linear system) is a collection of two or more linear equations involving the same variable (math), variables.
For example,
: \begin
3x+2y-z=1\\
2x-2y+4z=-2\\
-x+\fracy-z=0
\end
is a system of th ...
involving , , and :
The same linear equations can also be written in matrix form as:
Through
Gauss–Jordan elimination, the matrix can be reduced to:
Rewriting the matrix in equation form yields:
The elements of the kernel can be further expressed in
parametric vector form, as follows:
Since is a
free variable ranging over all real numbers, this can be expressed equally well as:
The kernel of is precisely the solution set to these equations (in this case, a
line through the origin in ). Here, the vector constitutes a
basis of the kernel of . The nullity of is therefore 1, as it is spanned by a single vector.
The following dot products are zero:
which illustrates that vectors in the kernel of are orthogonal to each of the row vectors of .
These two (linearly independent) row vectors span the row space of —a plane orthogonal to the vector .
With the rank 2 of , the nullity 1 of , and the dimension 3 of , we have an illustration of the rank-nullity theorem.
Examples
*If , then the kernel of is the solution set to a homogeneous
system of linear equations
In mathematics, a system of linear equations (or linear system) is a collection of two or more linear equations involving the same variable (math), variables.
For example,
: \begin
3x+2y-z=1\\
2x-2y+4z=-2\\
-x+\fracy-z=0
\end
is a system of th ...
. As in the above illustration, if is the operator:
then the kernel of is the set of solutions to the equations
*Let denote the
vector space
In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
of all continuous real-valued functions on the interval
,1 and define by the rule
Then the kernel of consists of all functions for which .
*Let be the vector space of all infinitely differentiable functions , and let be the
differentiation operator:
Then the kernel of consists of all functions in whose derivatives are zero, i.e. the set of all
constant function
In mathematics, a constant function is a function whose (output) value is the same for every input value.
Basic properties
As a real-valued function of a real-valued argument, a constant function has the general form or just For example, ...
s.
*Let be the
direct product of infinitely many copies of , and let be the
shift operator Then the kernel of is the one-dimensional subspace consisting of all vectors .
*If is an
inner product space
In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
and is a subspace, the kernel of the
orthogonal projection is the
orthogonal complement to in .
Computation by Gaussian elimination
A
basis of the kernel of a matrix may be computed by
Gaussian elimination
In mathematics, Gaussian elimination, also known as row reduction, is an algorithm for solving systems of linear equations. It consists of a sequence of row-wise operations performed on the corresponding matrix of coefficients. This method can a ...
.
For this purpose, given an matrix , we construct first the row
augmented matrix
In linear algebra, an augmented matrix (A \vert B) is a k \times (n+1) matrix obtained by appending a k-dimensional column vector B, on the right, as a further column to a k \times n-dimensional matrix A. This is usually done for the purpose of p ...
where is the
identity matrix
In linear algebra, the identity matrix of size n is the n\times n square matrix with ones on the main diagonal and zeros elsewhere. It has unique properties, for example when the identity matrix represents a geometric transformation, the obje ...
.
Computing its
column echelon form by Gaussian elimination (or any other suitable method), we get a matrix
A basis of the kernel of consists in the non-zero columns of such that the corresponding column of is a
zero column.
In fact, the computation may be stopped as soon as the upper matrix is in column echelon form: the remainder of the computation consists in changing the basis of the vector space generated by the columns whose upper part is zero.
For example, suppose that
Then
Putting the upper part in column echelon form by column operations on the whole matrix gives
The last three columns of are zero columns. Therefore, the three last vectors of ,
are a basis of the kernel of .
Proof that the method computes the kernel: Since column operations correspond to post-multiplication by invertible matrices, the fact that
reduces to
means that there exists an invertible matrix
such that
with
in column echelon form. Thus and A column vector
belongs to the kernel of
(that is
) if and only if
where As
is in column echelon form, if and only if the nonzero entries of
correspond to the zero columns of By multiplying by one may deduce that this is the case if and only if
is a linear combination of the corresponding columns of
Numerical computation
The problem of computing the kernel on a computer depends on the nature of the coefficients.
Exact coefficients
If the coefficients of the matrix are exactly given numbers, the
column echelon form of the matrix may be computed with
Bareiss algorithm more efficiently than with Gaussian elimination. It is even more efficient to use
modular arithmetic
In mathematics, modular arithmetic is a system of arithmetic operations for integers, other than the usual ones from elementary arithmetic, where numbers "wrap around" when reaching a certain value, called the modulus. The modern approach to mo ...
and
Chinese remainder theorem
In mathematics, the Chinese remainder theorem states that if one knows the remainders of the Euclidean division of an integer ''n'' by several integers, then one can determine uniquely the remainder of the division of ''n'' by the product of thes ...
, which reduces the problem to several similar ones over
finite field
In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field (mathematics), field that contains a finite number of Element (mathematics), elements. As with any field, a finite field is a Set (mathematics), s ...
s (this avoids the overhead induced by the non-linearity of the
computational complexity of integer multiplication).
For coefficients in a finite field, Gaussian elimination works well, but for the large matrices that occur in
cryptography
Cryptography, or cryptology (from "hidden, secret"; and ''graphein'', "to write", or ''-logy, -logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of Adversary (cryptography), ...
and
Gröbner basis
In mathematics, and more specifically in computer algebra, computational algebraic geometry, and computational commutative algebra, a Gröbner basis is a particular kind of generating set of an ideal in a polynomial ring K _1,\ldots,x_n/math> ove ...
computation, better algorithms are known, which have roughly the same
computational complexity, but are faster and behave better with modern
computer hardware
Computer hardware includes the physical parts of a computer, such as the central processing unit (CPU), random-access memory (RAM), motherboard, computer data storage, graphics card, sound card, and computer case. It includes external devices ...
.
Floating point computation
For matrices whose entries are
floating-point numbers, the problem of computing the kernel makes sense only for matrices such that the number of rows is equal to their rank: because of the
rounding errors, a floating-point matrix has almost always a
full rank, even when it is an approximation of a matrix of a much smaller rank. Even for a full-rank matrix, it is possible to compute its kernel only if it is
well conditioned, i.e. it has a low
condition number.
Even for a well conditioned full rank matrix, Gaussian elimination does not behave correctly: it introduces rounding errors that are too large for getting a significant result. As the computation of the kernel of a matrix is a special instance of solving a homogeneous system of linear equations, the kernel may be computed with any of the various algorithms designed to solve homogeneous systems. A state of the art software for this purpose is the
Lapack library.
See also
*
Kernel (algebra)
In algebra, the kernel of a homomorphism is the relation describing how elements in the domain of the homomorphism become related in the image. A homomorphism is a function that preserves the underlying algebraic structure in the domain to it ...
*
Zero set
In mathematics, a zero (also sometimes called a root) of a real-, complex-, or generally vector-valued function f, is a member x of the domain of f such that f(x) ''vanishes'' at x; that is, the function f attains the value of 0 at x, or eq ...
*
System of linear equations
In mathematics, a system of linear equations (or linear system) is a collection of two or more linear equations involving the same variable (math), variables.
For example,
: \begin
3x+2y-z=1\\
2x-2y+4z=-2\\
-x+\fracy-z=0
\end
is a system of th ...
*
Row and column spaces
*
Row reduction
*
Four fundamental subspaces
*
Vector space
In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
*
Linear subspace
In mathematics, the term ''linear'' is used in two distinct senses for two different properties:
* linearity of a ''function (mathematics), function'' (or ''mapping (mathematics), mapping'');
* linearity of a ''polynomial''.
An example of a li ...
*
Linear operator
In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pr ...
*
Function space
In mathematics, a function space is a set of functions between two fixed sets. Often, the domain and/or codomain will have additional structure which is inherited by the function space. For example, the set of functions from any set into a ve ...
*
Fredholm alternative
Notes and references
Bibliography
*
*
*
*
*
*
*
*
External links
*
*
Khan AcademyIntroduction to the Null Space of a Matrix
{{DEFAULTSORT:Kernel (linear algebra)
Linear algebra
Functional analysis
Matrices (mathematics)
Numerical linear algebra