An example for a kernel- the linear operator transforms all points on the line to the zero point, thus they form the kernel for the linear operator
Inmathematics, thekernel of alinear map, also known as thenull space ornullspace, is the part of thedomain which is mapped to thezero vector of theco-domain; the kernel is always alinear subspace of the domain.[1] That is, given a linear mapL :V →W between twovector spacesV andW, the kernel ofL is the vector space of all elementsv ofV such thatL(v) =0, where0 denotes thezero vector inW,[2] or more symbolically:
In the linear map two elements ofV have the sameimage inWif and only if their difference lies in the kernel ofL, that is,
From this, it follows by thefirst isomorphism theorem that the image ofL isisomorphic to thequotient ofV by the kernel:In the case whereV isfinite-dimensional, this implies therank–nullity theorem:where the termrank refers to the dimension of the image ofL, whilenullity refers to the dimension of the kernel ofL,[4] That is,so that the rank–nullity theorem can be restated as
The notion of kernel also makes sense forhomomorphisms ofmodules, which are generalizations of vector spaces where the scalars are elements of aring, rather than afield. The domain of the mapping is a module, with the kernel constituting asubmodule. Here, the concepts of rank and nullity do not necessarily apply.
IfV andW aretopological vector spaces such thatW is finite-dimensional, then a linear operatorL:V →W iscontinuous if and only if the kernel ofL is aclosed subspace ofV.
Consider a linear map represented as am ×n matrixA with coefficients in afieldK (typically or), that is operating on column vectorsx withn components overK.The kernel of this linear map is the set of solutions to the equationAx =0, where0 is understood as thezero vector. Thedimension of the kernel ofA is called thenullity ofA. Inset-builder notation,The matrix equation is equivalent to a homogeneoussystem of linear equations:Thus the kernel ofA is the same as the solution set to the above homogeneous equations.
The productAx can be written in terms of thedot product of vectors as follows:
Here,a1, ... ,am denote the rows of the matrixA. It follows thatx is in the kernel ofA, if and only ifx isorthogonal (or perpendicular) to each of the row vectors ofA (since orthogonality is defined as having a dot product of 0).
Therow space, or coimage, of a matrixA is thespan of the row vectors ofA. By the above reasoning, the kernel ofA is theorthogonal complement to the row space. That is, a vectorx lies in the kernel ofA, if and only if it is perpendicular to every vector in the row space ofA.
The dimension of the row space ofA is called therank ofA, and the dimension of the kernel ofA is called thenullity ofA. These quantities are related by therank–nullity theorem[4]
Theleft null space, orcokernel, of a matrixA consists of all column vectorsx such thatxTA =0T, where T denotes thetranspose of a matrix. The left null space ofA is the same as the kernel ofAT. The left null space ofA is the orthogonal complement to thecolumn space ofA, and is dual to thecokernel of the associated linear transformation. The kernel, the row space, the column space, and the left null space ofA are thefour fundamental subspaces associated with the matrixA.
The kernel also plays a role in the solution to a nonhomogeneous system of linear equations:Ifu andv are two possible solutions to the above equation, thenThus, the difference of any two solutions to the equationAx =b lies in the kernel ofA.
It follows that any solution to the equationAx =b can be expressed as the sum of a fixed solutionv and an arbitrary element of the kernel. That is, the solution set to the equationAx =b isGeometrically, this says that the solution set toAx =b is thetranslation of the kernel ofA by the vectorv. See alsoFredholm alternative andflat (geometry).
The following is a simple illustration of the computation of the kernel of a matrix (see§ Computation by Gaussian elimination, 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 matrixThe kernel of this matrix consists of all vectors(x,y,z) ∈R3 for whichwhich can be expressed as a homogeneoussystem of linear equations involvingx,y, andz:
The same linear equations can also be written in matrix form as:
The elements of the kernel can be further expressed inparametric vector form, as follows:
Sincec is afree variable ranging over all real numbers, this can be expressed equally well as:The kernel ofA is precisely the solution set to these equations (in this case, aline through the origin inR3). Here, the vector(−1,−26,16)T constitutes abasis of the kernel ofA. The nullity ofA is therefore 1, as it is spanned by a single vector.
The following dot products are zero:which illustrates that vectors in the kernel ofA are orthogonal to each of the row vectors ofA.
These two (linearly independent) row vectors span the row space ofA—a plane orthogonal to the vector(−1,−26,16)T.
With the rank 2 ofA, the nullity 1 ofA, and the dimension 3 ofA, we have an illustration of the rank-nullity theorem.
IfL:Rm →Rn, then the kernel ofL is the solution set to a homogeneoussystem of linear equations. As in the above illustration, ifL is the operator: then the kernel ofL is the set of solutions to the equations
LetC[0,1] denote thevector space of all continuous real-valued functions on the interval [0,1], and defineL:C[0,1] →R by the rule Then the kernel ofL consists of all functionsf ∈C[0,1] for whichf(0.3) = 0.
LetC∞(R) be the vector space of all infinitely differentiable functionsR →R, and letD:C∞(R) →C∞(R) be thedifferentiation operator: Then the kernel ofD consists of all functions inC∞(R) whose derivatives are zero, i.e. the set of allconstant functions.
LetR∞ be thedirect product of infinitely many copies ofR, and lets:R∞ →R∞ be theshift operator Then the kernel ofs is the one-dimensional subspace consisting of all vectors(x1, 0, 0, 0, ...).
Computing itscolumn echelon form by Gaussian elimination (or any other suitable method), we get a matrix A basis of the kernel ofA consists in the non-zero columns ofC such that the corresponding column ofB is azero 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 thatThen
Putting the upper part in column echelon form by column operations on the whole matrix gives
The last three columns ofB are zero columns. Therefore, the three last vectors ofC,are a basis of the kernel ofA.
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.
For matrices whose entries arefloating-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 therounding errors, a floating-point matrix has almost always afull 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 iswell conditioned, i.e. it has a lowcondition number.[5][citation needed]
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 theLapack library.[citation needed]
^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 inLay 2005,Meyer 2001, and Strang's lectures.