Engineering/Mathematics/Linear Transformations
Kernel of a Linear Transformation
The kernel of a linear transformation is the set of inputs it sends to the zero vector. It is always a subspace of the domain, its dimension measures exactly how much information the transformation destroys, and it is trivial precisely when the transformation is injective.
- Core level
- Stream: transformations
- Reading time 15 min
- Ref KVS-ENG-MATH-0096
- Taxonomy
- Engineering / Mathematics
- Notation
- Lives in
- The domain , not the codomain
- Key property
- Always a subspace of
- Injectivity test
- injective
- Matrix case
- when
Overview
For a linear transformation , the kernel is the collection of every input that the transformation flattens to zero. It is a subset of the domain, not of the codomain, and it answers a question that recurs in every application of linear models: what can be changed about the input without changing the output at all? The set of such changes is exactly the kernel, and its dimension is the number of independent directions along which the transformation is blind.
Two facts make the kernel more than a curiosity. First, it is always a subspace of the domain — it contains the zero vector, and it is closed under addition and scalar multiplication. That means it can be described by a basis, has a well-defined dimension, and inherits every result about subspaces. Second, it controls the entire preimage structure of the transformation. If any single input produces a given output, then the complete set of inputs producing that output is obtained by adding the whole kernel to that one input. Preimages are therefore either empty or translates of one fixed subspace, all of the same dimension.
The kernel is also the operational test for injectivity. A transformation is one-to-one exactly when its kernel contains nothing but the zero vector. This replaces a statement quantified over all pairs of inputs with a single computation, and for a matrix transformation the kernel coincides with the null space of , so the entire apparatus of row reduction applies unchanged.
In engineering terms the kernel names the redundancy in a system. For a redundant manipulator it is the space of self-motions that reconfigure the arm without moving the tool. For a measurement chain it is the space of state changes the instrument cannot detect. For a structural model it is the space of self-equilibrated internal force states. In each case, computing a basis for the kernel converts a vague sense that the model has slack into an explicit, parameterised description of that slack.
Definition
Kernel of a Linear Transformation
KLTLet be a linear transformation. The kernel of , written , is the set of all vectors in the domain that sends to the zero vector of the codomain:
Older texts sometimes call this the null space of the transformation. The notation keeps it distinct from the null space of a matrix, although the two objects coincide when the transformation is defined by that matrix.
Preimage of a Vector
PIFor and , the preimage is the set of all inputs producing that output: . It may be empty. The notation does not presuppose that has an inverse function.
The kernel is the special case , and it is the only preimage that is ever a subspace.
Nullity of a Linear Transformation
The dimension of the kernel, . It counts the independent directions in the domain along which carries no information, and it is the number of free parameters in every non-empty preimage.
Concepts
The kernel is always a subspace
Apply the three-part subspace test to as a subset of . It is non-empty because every linear transformation satisfies , so the zero vector of the domain belongs to the kernel. If then , giving closure under addition. If is a scalar and then , giving closure under scalar multiplication. Hence is a subspace of the domain. The practical payoff is immediate: the kernel can always be reported as the span of a finite basis rather than as an unstructured set.
Kernel and null space are the same object
When , and for a fixed matrix , the condition is literally the homogeneous system . So , and everything known about null spaces transfers: reduce , identify the free columns, and read off one basis vector per free variable. The dimension of the kernel is . Nothing about the abstract definition is lost in this translation; the abstract version simply extends the same idea to domains of polynomials, matrices or functions.
Preimages are translates of the kernel
Suppose is non-empty and is one of its elements. Then . The proof runs in two inclusions. Any with in the kernel satisfies , so it lies in the preimage. Conversely if then , so lies in the kernel and has the required form. Every non-empty preimage is therefore a copy of the kernel, shifted; all of them have the same dimension, and only the one over passes through the origin and is a subspace.
Injective if and only if the kernel is trivial
This is the theorem that makes the kernel the standard instrument for testing injectivity. If is injective and , then , and injectivity forces ; so the kernel is trivial. Conversely, if the kernel is trivial and , then linearity gives , so lies in the kernel, hence equals , hence . The equivalence converts a statement about every pair of inputs into a single homogeneous computation.
A non-trivial kernel generates collisions everywhere
Take in the kernel. For any input whatsoever, . A single non-zero kernel vector therefore produces a distinct pair of inputs with identical outputs at every point of the domain. This is why the kernel is the natural object to compute when a model is suspected of being unidentifiable: it does not merely certify that ambiguity exists, it parameterises the ambiguity completely.
The engineering meaning of kernel dimension
The nullity is the number of independent input adjustments that leave the output untouched. In robotics it counts the degrees of self-motion of a redundant manipulator: the joint rates lying in the kernel of the Jacobian reconfigure the arm while holding the tool still, and are exploited for obstacle avoidance and joint-limit management. In structural analysis the kernel of an equilibrium matrix contains the self-stress states, and its dimension is the degree of static indeterminacy. In model fitting the kernel of the design matrix contains the parameter changes invisible to the data, and its dimension is the number of unidentifiable directions. A zero-dimensional kernel means no slack; every extra dimension is one more thing the system can do for free, or one more thing you cannot measure.
Computing and using a kernel
Equations
Definition of the kernel
EQ-KLT-01The kernel is a subset of the domain. The zero vector on the right belongs to the codomain .
Kernel as the preimage of zero
EQ-KLT-02The kernel is one particular preimage, and the only one that contains the origin and is therefore a subspace.
Kernel of a matrix transformation
EQ-KLT-03For transformations defined by a matrix the kernel is exactly the null space, so a single row reduction produces a basis.
Structure of a non-empty preimage
EQ-KLT-04One particular solution plus the entire kernel gives the complete solution set. This is the transformation-level form of the particular-plus-homogeneous decomposition.
Injectivity criterion
EQ-KLT-05A transformation is one-to-one exactly when nothing but the zero vector is annihilated.
Nullity from the pivot count
EQ-KLT-06For a matrix transformation, the number of free columns is the dimension of the kernel and the number of parameters in every non-empty preimage.
Collision generated by a kernel vector
EQ-KLT-07Variable Definitions
| Symbol | Name | Meaning | Domain / type |
|---|---|---|---|
| Linear transformation | The map whose kernel is under study | function from U to V | |
| Kernel | The set of domain vectors sent to the zero vector | subspace of U | |
| Domain | The vector space of inputs; the kernel is a subspace of this space | vector space over C | |
| Codomain | The vector space of outputs, containing the target zero vector | vector space over C | |
| Input vector | A candidate element of the kernel or of a preimage | element of U | |
| Kernel vector | An element of , used to translate one solution into all solutions | element of K(T) | |
| Matrix of the transformation | Coefficient matrix when | m x n matrix | |
| Preimage of a vector | All inputs mapping to ; empty, or a translate of the kernel | subset of U | |
| Domain dimension | Number of input coordinates; bounds the kernel dimension from above | positive integer |
Worked Numerical Example
Problem statement
A four-joint planar manipulator carries a tool whose velocity is described by three quantities: two translation rates and one rotation rate. In a particular pose the Jacobian relating joint rates to tool velocity is the matrix below. Compute the kernel of the associated transformation, interpret it as the space of self-motions, and describe every joint-rate command that produces one specified tool velocity.
Set up the transformation
The map from joint rates to tool velocity is with :
Write the kernel condition
A joint-rate vector lies in when it produces no tool motion at all, that is when . Component by component this is a homogeneous system of three equations in the four unknowns .
Row-reduce the coefficient matrix
Apply and , which produce identical rows ; subtracting one from the other clears the third row entirely.
Identify pivot and free columns
Leading ones sit in columns 1 and 3, so and the free variables are and . The kernel therefore has dimension . Note that the rank is only , not : in this pose the manipulator is also singular, and the tool cannot be driven in every direction.
Extract a basis
Set for the first basis vector, then for the second, reading and from the two pivot rows:
Verify against the original matrix
Substitute both candidates into , not into the reduced form. First vector: . Second vector: . Both check, so the basis is correct and is not injective.
Describe a full preimage
Take the joint-rate command . Then , so this command produces the tool velocity . Every command producing that same tool velocity is plus an arbitrary kernel vector:
Spot-check a second member of the preimage
Taking and gives . Evaluating: ; ; . The tool velocity is unchanged, confirming the coset description.
The kernel is two-dimensional, so the manipulator has two independent self-motions in this pose: whole families of joint-rate commands hold the tool perfectly still. Any commanded tool velocity that is achievable at all is achievable by a two-parameter family of joint-rate vectors, and those two parameters are exactly the freedom a redundancy-resolution scheme has to spend on secondary objectives such as avoiding joint limits. The rank deficiency also signals that this pose is singular, so not every tool velocity is achievable in the first place.
Applications & Industry Use
Self-motion of redundant manipulators
The kernel of the manipulator Jacobian is the space of joint velocities that generate no end-effector motion. Redundancy-resolution schemes project a secondary objective — obstacle clearance, joint-limit avoidance, torque minimisation — onto that kernel so the tool trajectory is unaffected. The dimension of the kernel is the number of free directions available.
Self-stress states in indeterminate structures
For a pin-jointed structure, the kernel of the equilibrium matrix consists of member-force distributions in equilibrium with zero external load. Its dimension is the degree of static indeterminacy, and its basis vectors are the prestress patterns available to a designer of cable nets and tensegrity structures.
Blind directions of a filter bank
A linear analysis stage maps a signal block to a coefficient vector. Signals in the kernel are annihilated entirely and cannot be reconstructed downstream. Characterising the kernel identifies exactly which signal content the front end discards, which is essential when designing an anti-aliasing or decimation stage.
Unobservable subspace
The kernel of the observability matrix is the set of initial states producing an identically zero output. States differing by an element of that kernel are indistinguishable to any observer, no matter how long the record. Its dimension quantifies how much of the state must be handled by other means.
Independent reaction directions
The kernel of the atomic composition matrix contains the stoichiometric vectors that conserve every element. A basis for that kernel is a maximal set of independent balanced reactions, and its dimension tells the process engineer how many reaction extents are needed to describe the chemistry completely.
Unidentifiable parameter directions
In a linear model, the kernel of the design matrix consists of parameter shifts that leave every fitted value unchanged. Coefficients are determined only modulo that kernel, which is precisely why dummy-variable traps and collinear predictors make individual coefficient estimates meaningless while leaving predictions intact.
Design Considerations
Report a basis, not a description
Because the kernel is a subspace it always admits a finite basis, and the basis is far more useful than a verbal statement that a redundancy exists. Downstream code needs vectors to project onto; a sentence cannot be projected onto. Always deliver the kernel as an explicit list of spanning vectors together with its dimension.
Choose the basis for the job
The basis obtained from row reduction has ones and zeros in the free positions, which makes each vector easy to interpret as the effect of one free variable. An orthonormal basis from a singular value decomposition is better conditioned and better suited to projection. Neither is canonical — only the subspace they span is — so state which convention a reported basis follows.
Kernel dimension is discontinuous
Perturbing the entries of a matrix by an arbitrarily small amount can shrink the kernel to nothing. A physically redundant system will often present a numerically empty kernel because measured coefficients are not exact. The reliable numerical statement is not the dimension but the list of small singular values, together with the threshold used to declare them negligible.
Do not confuse the kernel with the range
The kernel is a subspace of the domain; the range is a subspace of the codomain. They generally live in different spaces of different dimensions, and no inclusion between them is meaningful unless domain and codomain coincide. Mixing them is the most common structural error in this part of the subject.
Use the coset structure to organise solutions
Once a kernel basis is available, solving for many different right-hand sides requires only one particular solution each; the free part is reusable. Structuring a solver this way avoids recomputing the homogeneous part and makes the parameterisation of the answer explicit rather than implicit.
A trivial kernel is a design goal, not an accident
If a model is required to be identifiable, the kernel must be forced to be trivial by construction — through sensor placement, excitation design or regularisation — rather than hoped for. Checking the kernel early in a design is cheap; discovering an unidentifiable direction after commissioning is not.
Standards & Codes
Notation, interchange and numerical standards that govern how this material is written down, stored and computed in production systems.
| Reference | Title | Relevance to this topic |
|---|---|---|
ISO 80000-2 | Quantities and units — Part 2: Mathematics | Prescribes the set-builder and mapping notation used for , and the typographic distinction between the transformation and its argument. |
LAPACK / BLAS reference | Linear Algebra PACKage reference implementation | The singular value decomposition driver xGESVD supplies an orthonormal basis for the numerical kernel through the trailing right singular vectors, which is the production route to a kernel basis. |
IEEE 754-2019 | IEEE Standard for Floating-Point Arithmetic | Defines the rounding behaviour that makes exact kernel dimension undecidable from floating-point data, forcing every numerical kernel computation to declare a tolerance. |
ISO 9283 | Manipulating industrial robots — Performance criteria and related test methods | Pose accuracy and repeatability requirements for manipulators are what redundancy resolution in the Jacobian kernel is ultimately designed to protect, by keeping self-motions away from joint limits and singularities. |
W3C WCAG 2.1 AA | Web Content Accessibility Guidelines | Set-builder expressions and matrices on this page are published as semantic MathML with alternative text, so their content is available to screen readers rather than locked in images. |
Material Selection
For a mathematical topic, "material" is the numeric representation: the scalar field, storage format and precision the computation is built from.
| Representation | Select when | Trade-off |
|---|---|---|
| Exact rational arithmetic | Symbolic or integer models where the kernel dimension is a structural fact to be certified, such as a degree of static indeterminacy. | Gives an exact dimension and an exact basis with no tolerance, but intermediate fractions grow rapidly and the method does not scale. |
| IEEE 754 binary64 with SVD-based kernel | Measured or estimated matrices, including robot Jacobians evaluated at a numerical pose. | Produces a well-conditioned orthonormal basis and a graded measure of near-degeneracy, at cubic cost and with a tolerance that must be justified. |
| IEEE 754 binary64 with pivoted QR | Larger matrices where a full SVD is uneconomical and an approximate kernel basis suffices. | Substantially cheaper and reveals dependent columns, but the resulting basis is less orthogonal and the rank decision is less robust. |
| Row-reduced basis with unit free variables | Hand computation, teaching, and any setting where each basis vector must be readable as the effect of one specific input. | Maximum interpretability and exactness, but the basis can be badly conditioned and is unsuitable for repeated numerical projection. |
| Sparse storage with a fill-reducing ordering | Very large network, finite-element or circuit models whose matrices are mostly zero. | Keeps memory tractable, but elimination causes fill-in, so a sparse QR or an iterative null-space method is usually preferable to direct reduction. |
| Finite field arithmetic | Coding theory and combinatorial models where the kernel of a parity-check matrix is the code itself. | Exact and fast with bounded operand size; the kernel dimension over a finite field may differ from the dimension over the rationals. |
Manufacturing Notes
Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.
Cost of computing a kernel basis
Row reduction of an matrix costs on the order of operations and delivers a basis directly from the free columns. A singular value decomposition costs several times more but returns an orthonormal basis plus the singular values that quantify how nearly degenerate the matrix is. For a one-off structural question the reduction is enough; for repeated numerical projection the decomposition is worth its price.
Hand procedure
Reduce the coefficient matrix alone. For each free column in turn, set that free variable to , set all other free variables to , and read the pivot variables straight off the pivot rows — no back-substitution is required once the form is fully reduced. The number of vectors produced is the nullity, and they are automatically linearly independent because of the pattern of ones and zeros in the free positions.
Library behaviour
scipy.linalg.null_space(A, rcond=...) returns an orthonormal kernel basis from the SVD and exposes the tolerance explicitly. numpy.linalg.matrix_rank gives the complementary number. Symbolic systems expose Matrix.nullspace(), which returns the exact row-reduced basis with unit free variables. The three answers span the same subspace only when the numerical tolerance is chosen consistently with the exact structure.Verification discipline
Check every candidate kernel vector against the original matrix, never against its reduced form. Two independent checks are worth the effort: confirm that each basis vector is annihilated, and confirm that the count of basis vectors equals minus the rank. A slip in elimination usually breaks one of the two.
Projecting onto the kernel
Applications that exploit redundancy need the projector onto , not merely a basis. With an orthonormal basis from the SVD, the projector is ; equivalently, for a matrix transformation it is where is the pseudoinverse. Building the projector from a badly conditioned row-reduced basis instead of an orthonormal one is a common source of drift in iterative redundancy-resolution loops.
Failure Modes & Common Mistakes
| Failure mode / mistake | Impact | Root cause | Prevention & detection |
|---|---|---|---|
| Placing the kernel in the codomain | high | Confusing the kernel with the range, or with the set of zero outputs viewed as living in . | The kernel is defined by a condition on inputs, so it is a subspace of the domain. Check the dimensions of the two spaces if in doubt. |
| Reporting the empty set as the kernel | medium | Writing when only the zero vector is annihilated. | The kernel always contains , so it is never empty. The trivial case is , a subspace of dimension zero. |
| Confusing nullity with the number of zero rows | medium | Counting zero rows of the reduced matrix instead of free columns. | Nullity is , computed from the column count of the domain. Zero rows count deficient equations, which is a different quantity unless the matrix is square. |
| Assuming every preimage is a subspace | medium | Generalising the subspace property of the kernel to preimages of non-zero vectors. | Only contains the origin. Other non-empty preimages are translates and are closed under neither addition nor scalar multiplication. |
| Declaring a numerical kernel from an exact-zero test | high | Comparing computed pivots or singular values against zero on floating-point data. | Use a tolerance scaled by the largest singular value and the machine epsilon, and report the tolerance with the result. |
| Treating a row-reduced basis as orthonormal | medium | Building a projector as from a basis that is merely independent. | Orthonormalise first, or take the basis from the SVD, before forming any projector or performing repeated projections. |
| Recomputing the kernel for every right-hand side | low | Solving from scratch for each new . | The kernel does not depend on . Compute it once, then only a particular solution is needed for each new target. |
| Applying the subspace argument to a non-linear map | low | Assuming the zero set of any function is a subspace. | The closure proofs use additivity and scalar-multiple preservation. Without linearity the zero set can be any shape at all. |
FAQs
Is the kernel the same thing as the null space?
For a transformation defined by a matrix, , yes: exactly. The kernel is the more general notion because it is defined for transformations between any vector spaces, including spaces of polynomials, matrices or functions where no coefficient matrix is given in advance.
Why is the kernel always a subspace but a general preimage is not?
The subspace proof relies on the target being the zero vector: sums and scalar multiples of vectors sent to zero are still sent to zero. For a non-zero target , the sum of two inputs maps to , not , so closure fails. Non-empty preimages are translates of the kernel, which are not subspaces unless the translation is trivial.
How does the kernel let me test injectivity?
A transformation is injective if and only if its kernel is trivial. This is a strict equivalence, so it can be used in either direction: a computed non-zero kernel vector immediately produces witness pairs disproving injectivity, and a verified trivial kernel is a complete proof of injectivity.
Can the kernel be the whole domain?
Yes, when is the zero transformation that sends every input to . Then and the nullity equals . This is the extreme case in which the transformation carries no information whatsoever, and the rank is zero.
What does the kernel tell me about solving ?
It tells you the shape of the answer. If the equation has any solution at all, the full solution set is one particular solution plus the entire kernel, so it has as many free parameters as the kernel has dimensions. A trivial kernel means the solution, if it exists, is unique.
Why does my numerical kernel come out empty for a system I know is redundant?
Because rounding in the stored coefficients perturbs an exactly dependent matrix into a nearby independent one. The honest numerical statement is that some singular values are far smaller than the largest, and the kernel dimension is whatever count of singular values falls below your declared tolerance.
How is the kernel related to the rank of a transformation?
They partition the domain dimension: the nullity plus the rank equals . Every dimension of the domain is either carried through to the range or collapsed into the kernel, and no dimension is counted twice. This accounting is the rank-nullity relationship.
References
- Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section ILT, subsection KLT. Licensed under the GNU Free Documentation License v1.2.
- ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
- Golub, G. H. and Van Loan, C. F. Matrix Computations, 4th edition. Johns Hopkins University Press, 2013.
- Siciliano, B., Sciavicco, L., Villani, L. and Oriolo, G. Robotics: Modelling, Planning and Control. Springer, 2009.
- Anderson, E. et al. LAPACK Users' Guide, 3rd edition. Society for Industrial and Applied Mathematics, 1999.
AI Suggested Questions
- Show me a transformation from 2x2 matrices to quadratic polynomials whose kernel has dimension two, and compute a basis for it.
- How do I build the orthogonal projector onto the kernel of a Jacobian, and why should it come from the SVD rather than from row reduction?
- Explain why the preimage of a non-zero vector fails the subspace test, with an explicit counterexample.
- For a structural equilibrium matrix, how does the kernel dimension relate to the degree of static indeterminacy?
- Compare the kernel bases returned by SymPy's nullspace and SciPy's null_space for the same integer matrix and explain the differences.
- If a measured matrix has singular values 10, 4, 0.001, how should I decide whether the kernel is one-dimensional or empty?
Related Calculators
Compute a basis and dimension for the kernel of a linear transformation given by a matrix, in exact or floating-point arithmetic.
Preimage SolverFind one particular solution of and return the complete preimage as that solution plus the kernel.
Matrix Rank & Nullity CalculatorReport rank, nullity and the pivot column set with a selectable numerical tolerance.
