Engineering/Mathematics/Linear Transformations
New Linear Transformations From Old
Adding two linear transformations, scaling one, or feeding the output of one into another always produces another linear transformation. These three constructions turn the collection of all maps from to into a vector space in its own right, and they are exactly what matrix addition, scalar multiplication and matrix multiplication compute.
- Core level
- Stream: transformations
- Reading time 15 min
- Ref KVS-ENG-MATH-0094
- Taxonomy
- Engineering / Mathematics
- Prerequisite
- Linear transformations, matrix operations
- Sum
- — same domain and codomain required
- Composition
- — codomain of must be the domain of
- Structure
- is a vector space of dimension
- Matrix dictionary
- Sum ; scalar ; composition
Overview
Once a supply of linear transformations exists, the natural next question is how to combine them. Three constructions cover almost every case that arises: adding two maps that share a domain and codomain, scaling a single map by a constant, and cascading two maps so that the output of the first becomes the input of the second. Each is defined pointwise, in the only way that makes sense, and each is proved to preserve linearity by a short verification against the two axioms.
The engineering readings are immediate. A sum is two parallel paths whose contributions add at a common node — two load paths in a structure, two independent sources in a network, two sensor contributions to a shared channel. A scalar multiple is a change of gain applied uniformly. A composition is a cascade: a pre-amplifier feeding a combiner, a coordinate change followed by a projection, a sequence of manufacturing operations each transforming the state of a workpiece.
Collecting all linear transformations from to into a single set and equipping it with the first two operations produces a vector space. Its zero vector is the transformation that sends every input to the zero vector of , and its additive inverses are the maps scaled by . This is a genuinely useful observation and not merely an aesthetic one: it means the entire theory of spans, independence, bases and dimension applies to transformations themselves, and it is the reason a general linear map can be decomposed into simpler ones.
Composition sits apart from the other two, because it is where matrix multiplication comes from. Requiring the matrix of a composition to be the product of the matrices of the factors is what forces the row-by-column definition of the matrix product, and it explains at a stroke why that product is associative, why it distributes over addition, and why it is not commutative. Order in a cascade matters physically; the matrix product records that fact faithfully.
Definition
Linear Transformation Addition
LTAFor linear transformations and sharing the same domain and codomain, their sum is the function defined by .
The first plus sign is the operation being defined, on transformations; the second is vector addition inside . The definition alone produces only a function — that the result is linear is a separate theorem.
Linear Transformation Scalar Multiplication
LTSMFor a linear transformation and a scalar , the scalar multiple is the function defined by . The scaling is applied to the output, in , after the transformation has acted.
Linear Transformation Composition
LTCFor linear transformations and , the composition is the function defined by . The codomain of must equal the domain of or the expression is undefined.
Read right to left: in the map acts first. This convention matches the matrix product , in which acts on the vector first, and it is the reverse of the left-to-right order a block diagram is usually drawn in.
Zero Transformation
ZTThe transformation defined by for every . It is linear, it is the additive identity for transformation addition, and its definition requires no knowledge of or beyond the fact that has a zero vector. Its matrix representation is the zero matrix.
Concepts
The sum of linear transformations is linear
Check both axioms directly from the pointwise definition. For additivity, , and commutativity of addition in regroups this as . For homogeneity, , using distributivity in . The proof is short precisely because the definition is pointwise, so every step happens inside .
Scalar multiples are linear too
The same pattern applies. Additivity follows from distributivity of scalar multiplication over vector addition in ; homogeneity requires one extra step, since must be rearranged to , which uses commutativity of multiplication in the scalar field. It is worth noticing which property is doing the work at each step: these proofs are the template for verifying linearity of any constructed map.
The transformations themselves form a vector space
Write for the set of all linear transformations from to . The two theorems above establish closure under the two operations, and the remaining vector space properties either reduce to the corresponding property in or hold by direct construction. The additive identity is the zero transformation ; the additive inverse of is . So is a vector space, and when and are finite-dimensional its dimension is , matching the number of entries in a matrix representation.
Composition preserves linearity
Given and , additivity of follows by applying additivity of inside and additivity of outside: . Homogeneity works the same way, with the scalar passing first through and then through . Both axioms of both transformations are used, and each is used exactly once — a clean illustration of why linearity is stated as two separate conditions.
Composition is associative and distributive but not commutative
For maps with matching spaces, , since both send to . Composition distributes over addition on both sides: , which needs linear, and , which needs nothing. Scalars pass through freely: . What fails is commutativity: may be undefined, may have a different domain and codomain from , and even when both are defined on the same spaces they are generally different maps.
The matrix dictionary
For transformations between column vector spaces, take matrix representations for and for . Then is represented by , by , and — when the spaces match — the composition by the product . The first two are unsurprising; the third is the substantive one. Since the matrix of a transformation is built from images of standard unit vectors, the columns of the composite matrix are , which is exactly the row-by-column definition of the matrix product applied to .
Why matrix multiplication looks the way it does
The row-by-column rule is often presented as an arbitrary convention. It is not: it is the unique definition that makes the matrix of a composition equal the product of the matrices. Every algebraic property of the product inherits from composition — associativity because function composition is associative, distributivity because linear maps distribute over sums, non-commutativity because cascading in the other order is a physically different operation. Reading as "apply , then apply " explains the otherwise puzzling right-to-left ordering.
Operators, identity and powers
When domain and codomain coincide, composition becomes an internal operation and acquires a multiplication as well as its vector space structure. The identity transformation is the multiplicative identity, powers are defined by repeated composition, and polynomials in make sense. This is the setting in which eigenvalues, invariant subspaces and the matrix exponential live, and it is why square matrices support a richer theory than rectangular ones.
Decision path: which construction applies?
Equations
Sum of transformations
EQ-NLT-01Defined pointwise. The two transformations must share a domain and a codomain, and the addition on the right is performed in .
Scalar multiple of a transformation
EQ-NLT-02The scalar acts on the output inside . Taking produces the additive inverse of .
Composition of transformations
EQ-NLT-03The composite maps to . The middle space must match exactly; the right-hand map acts first.
Zero and identity transformations
EQ-NLT-04is the additive identity of ; is the identity for composition on . Their matrices are the zero matrix and the identity matrix.
The space of linear transformations
EQ-NLT-05With and , this matches the entries of a matrix representation. Each entry is an independent degree of freedom in choosing a transformation.
Matrix dictionary for the three constructions
EQ-NLT-06Composition corresponds to the matrix product with the first-acting map on the right. This correspondence is what defines matrix multiplication rather than following from it.
Algebraic properties of composition
EQ-NLT-07Associative and distributive, but not commutative. The last relation is an inequality in general; the two composites may not even have the same domain and codomain.
Powers of a linear operator
EQ-NLT-08Defined only when domain and codomain coincide. Repeated composition corresponds to repeated matrix multiplication, which is the setting for eigenvalue analysis and for iterated dynamics.
Variable Definitions
| Symbol | Name | Meaning | Domain / type |
|---|---|---|---|
| First transformation | In a composition, the map that acts first | linear map from U to V | |
| Second transformation | In a composition, the map applied to the output of | linear map from V to W | |
| Sum | Pointwise sum of two maps sharing a domain and codomain | linear map from U to V | |
| Scalar multiple | Output of scaled uniformly by | linear map from U to V | |
| Composition | Cascade of followed by | linear map from U to W | |
| Zero transformation | Sends every input to ; the additive identity | linear map from U to V | |
| Identity transformation | Leaves every vector unchanged; the identity for composition | linear map from V to V | |
| Matrix of | Representation of the first-acting transformation | m x n matrix | |
| Matrix of | Representation of the second-acting transformation | p x m matrix |
Worked Numerical Example
Problem statement
An instrumentation chain has a two-channel input. A pre-amplifier array expands it to three internal channels, a parallel trim path does the same, and a downstream combiner reduces three channels to two outputs. Build the matrices of the summed pre-amplifier, a gain-scaled variant and the full cascade, and confirm each against direct evaluation.
State the three transformations
and share the domain and the codomain , so they may be added. maps to , so it may be composed after either of them.
Write the matrix representations
Each matrix is built from the images of the standard unit vectors, so the coefficients can be read straight off the defining formulas. Note the shapes: and are , while is .
Form the parallel sum
Adding the two pre-amplifier paths is componentwise on the outputs, so the matrix is the entrywise sum. Checking one component confirms it: , matching the first row of .
Apply a gain change
Tripling the pre-amplifier gain scales every output component, so the matrix is scaled entrywise. No structural property changes: the rank, the null space and the column space of are identical to those of .
Compose the cascade directly
Feed the three internal channels of into and expand. The first output is ; the second is .
Compose via the matrix product
The first-acting map goes on the right, so the composite matrix is : a times a , giving . The inner dimension is the size of the internal channel set and vanishes from the result.
Verify numerically
Take the input . The pre-amplifier gives , and the combiner then gives . The matrix product gives . The two routes agree.
Reverse the cascade and observe the asymmetry
Composing in the other order is also defined here, since the codomain of matches the domain of , but it produces a map from to with a matrix. The two composites are not merely different matrices — they act on different spaces, so no comparison is even possible.
The parallel path, the gain change and the cascade are all realised by the corresponding matrix operations, so the end-to-end behaviour of the whole chain is captured by a single matrix regardless of how many internal channels the intermediate stages use. Reversing the cascade produces a operator acting on the internal channels instead — a different physical object entirely, which is the concrete meaning of the non-commutativity of matrix multiplication.
Applications & Industry Use
Collapsing a processing chain to one operator
A chain of linear stages — gain, mixing matrix, decimation, equalisation — composes to a single transformation whose matrix is the product of the stage matrices. Precomputing that product removes intermediate buffers and reduces the per-sample cost to one matrix-vector product, which is standard practice in fixed-configuration embedded pipelines.
Concatenating frame transformations
The pose of an end-effector relative to a base is the composition of the transformations at each joint. Because composition is associative, sub-chains can be precomputed and cached, and because it is not commutative, the joint order is fixed by the mechanism and cannot be rearranged for convenience.
The model-view-projection product
Modelling, viewing and projection transformations are composed into a single matrix uploaded once per object. The right-to-left convention of the product is exactly the order of application to a vertex, and reversing two factors produces a visibly wrong image rather than a subtle error.
Parallel load paths and superposed stiffness
When two structural systems share the same nodes and carry load in parallel — a frame with an added bracing system, say — the combined stiffness transformation is the sum of the individual ones, so the combined stiffness matrix is the entrywise sum. Global assembly from element matrices is this construction applied many times.
Series and parallel interconnection of subsystems
Cascading two plants corresponds to composing their transformations and multiplying their matrices in the correct order; connecting them in parallel corresponds to addition. Block diagram algebra is a graphical notation for exactly these two constructions plus feedback, and the non-commutativity of composition is why block order in a diagram carries meaning.
Sequential unit operations
Each unit operation in a train transforms a composition vector, and for a linearised model the end-to-end response of the train is the composition of the individual responses. This lets a designer evaluate the effect of reordering, inserting or removing a unit by a single matrix product rather than by re-simulating the entire flowsheet.
Design Considerations
Check the space matching before writing anything
Addition requires both maps to share a domain and a codomain; composition requires the middle spaces to agree. Most errors in this area are shape errors that a dimension check would have caught immediately. Write every transformation with its spaces attached, , and confirm the match before forming any product or sum.
Fix the composition order against the physical signal flow
In and in the matrix product , the right-hand factor acts first — the opposite of the left-to-right reading of a block diagram. Establish the convention once for a project and state it in the documentation. A reversed cascade that happens to be dimensionally valid will produce plausible but wrong numbers indefinitely.
Precompute the composite when the configuration is fixed
If a chain of stages is applied to many inputs, forming the product of the stage matrices once reduces the per-input cost from several matrix-vector products to one. If instead a few inputs pass through many stages, applying the stages sequentially to the vector is cheaper, since a matrix-vector product costs against for a matrix-matrix product.
Composition can lose rank; addition can create it
The rank of a composition is bounded by the smaller of the two ranks, so a narrow intermediate stage permanently destroys information no later stage can recover. Addition has no such bound in either direction: two rank-one maps can sum to a rank-two map, and two full-rank maps can sum to the zero map. Analyse rank at the interfaces, not only at the ends.
Numerical conditioning compounds through a cascade
Condition numbers multiply in the worst case, so a chain of moderately ill-conditioned stages can be catastrophically ill-conditioned overall. Where possible, order stages so that ill-conditioned operations occur late, and consider retaining a factored representation of the composite rather than an explicitly formed product matrix.
Use the vector space structure of deliberately
Because the transformations themselves form a vector space, a general map can be expanded in a basis of simple maps — rank-one outer products, elementary matrices, or a physically meaningful set of primitive operations. This underpins low-rank approximation, model reduction and the decomposition of a measured operator into interpretable contributions.
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 | Defines the composition symbol and its right-to-left reading, together with the notation for the identity map, keeping cascade order unambiguous in written work. |
BLAS Level 3 | Basic Linear Algebra Subprograms, matrix-matrix operations | Standardises xGEMM, which computes the matrix product realising a composition; its transpose flags and leading-dimension arguments are precisely the order and orientation choices discussed here. |
ISO 10303 (STEP), Part 42 | Geometric and topological representation | Specifies how compound geometric transformations are represented and concatenated for CAD exchange, fixing the composition order so that data crossing between systems is interpreted identically. |
IEC 61131-3 | Programmable controllers — Programming languages | Function block diagrams express series and parallel interconnection of blocks, the graphical counterparts of composition and addition of transformations, with execution order defined by the standard. |
ISO/IEC 40314 | Mathematical Markup Language (MathML) Version 3.0 | Encodes the composition operator and function application semantically, so that is not confused with a product of two symbols by assistive technology. |
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 |
|---|---|---|
| Explicit product matrix | A fixed chain of stages is applied to a large number of inputs, as in a deployed signal path or a rendering pipeline. | Reduces the per-input cost to a single matrix-vector product, but costs to form once and discards the structure and sparsity of the individual stages. |
| Factored representation applied sequentially | Few inputs, many stages, or stages that are individually sparse or structured. | Preserves sparsity and conditioning information and avoids the cubic cost, but pays a matrix-vector product per stage for every input. |
| Matrix-free composite operator | Stages are simulations or physical processes too large to represent as matrices, and only products with vectors are required. | Memory scales with the vector length rather than its square and suits Krylov methods, but rank, conditioning and null space must be estimated iteratively rather than computed. |
| IEEE 754 binary64 throughout | General engineering cascades where conditioning may degrade through the chain. | Provides enough headroom for several moderately conditioned stages in series, at twice the memory traffic of single precision. |
| IEEE 754 binary32 or fixed point | Embedded instrumentation chains with hard throughput or power limits. | Halves or better the cost per stage, but errors accumulate multiplicatively through a cascade, so the number of stages must be budgeted against the precision available. |
| Exact rational arithmetic | Deriving or verifying a composite representation symbolically, or auditing a coordinate transformation chain. | Confirms an exact algebraic identity such as against a directly expanded composition, but is unusable for runtime evaluation at any scale. |
Manufacturing Notes
Implementation notes — how the result is actually produced by hand, by algorithm and by library, including cost and numerical behaviour.
Cost of forming each construction
Adding two matrices costs operations and scaling costs the same. Forming the product of a and an matrix costs about operations. The asymmetry matters: sums and scalings are essentially free, so the design question is almost always whether and when to form a composition explicitly.
Composing by hand
Two routes are available and cross-checking them is worthwhile. Substitute the output expressions of the first map into the input slots of the second and collect terms; or write both matrices and multiply. The substitution route makes errors visible as mismatched variables, while the matrix route is faster and less error-prone once the shapes have been checked.
Verification strategy
Evaluate the composite on a vector whose components are non-zero and mutually distinct, once through the definition and once through the product matrix. This catches a reversed composition order, a transposed factor and an off-by-one in the internal channel count, none of which is detectable from shapes alone when the dimensions happen to be compatible in both orders.
Library conventions
NumPy's C @ B and MATLAB's C*B both represent the composition that applies first, matching the mathematical convention. Graphics APIs vary: some use row vectors multiplied on the left, which reverses the product order relative to the convention here. Confirm the vector convention of any external library before concatenating transformations across a boundary.
Numerical behaviour of a formed product
Forming explicitly is backward stable, with an error bounded by roughly times the unit round-off times . The risk is not the multiplication itself but cancellation: when and are individually well conditioned yet their product is nearly singular, the explicit product loses information that a factored representation would have retained. Prefer factored form when the composite is close to rank deficient.
Failure Modes & Common Mistakes
| Failure mode / mistake | Impact | Root cause | Prevention & detection |
|---|---|---|---|
| Composing in the wrong order | high | Writing for the cascade because the block diagram reads left to right, while the product convention applies the right-hand factor first. | State the convention explicitly and verify on a vector with distinct non-zero components; shapes alone will not catch the error when both orders are dimensionally valid. |
| Adding transformations with mismatched spaces | high | Attempting to sum maps whose domains or codomains differ, sometimes disguised by matrices that happen to share a shape. | Confirm that both maps have the same domain and codomain as spaces, not merely matrices of the same size; identical shape does not imply identical meaning of the coordinates. |
| Assuming composition commutes | high | Reordering stages in a cascade for algebraic convenience, as one would with scalars. | Treat order as physically fixed. Where a reordering is genuinely required, verify explicitly; it holds only in special cases such as maps sharing an eigenvector basis. |
| Losing information at a narrow intermediate stage | medium | A stage of low rank sits mid-chain, so the composite rank is capped regardless of what follows. | Compute the rank at every interface, not only at the ends, and treat an unexpectedly narrow stage as a design defect rather than a compression opportunity. |
| Forming an explicit product when a factored form is needed | medium | Multiplying stage matrices together destroys sparsity and structure, turning a cheap sequence of products into a dense one. | Compare the cost of the explicit product against sequential application for the expected number of inputs, and retain the factored form when the stages are sparse. |
| Ignoring conditioning growth through a cascade | medium | Each stage is individually acceptable, but condition numbers compound and the composite is unusable. | Estimate the condition number of the composite, not only of the stages, and reorder or regularise where the growth is unacceptable. |
| Confusing the zero transformation with an undefined one | low | Treating a map that legitimately sends everything to as an error condition or a missing definition. | The zero transformation is linear and is the additive identity of the space of transformations. Distinguish it from an unpopulated or misconfigured stage by checking the matrix explicitly. |
| Taking powers of a non-square transformation | low | Writing when the codomain of differs from its domain, so the composition is undefined. | Powers exist only for operators, where domain and codomain coincide. Check that the matrix is square before any repeated composition. |
FAQs
Why must two transformations share a domain and codomain to be added?
Because the sum is defined pointwise as . Both maps must accept the same input, so the domains must agree, and their outputs must be addable, so the codomains must agree. Matrices of the same shape whose coordinates mean different things must not be added even though the arithmetic would succeed.
In , which transformation acts first?
acts first. The notation is read right to left, matching function application and matching the matrix product , in which multiplies the vector before does. This is the reverse of the left-to-right reading of a block diagram and is a persistent source of ordering errors.
Why is matrix multiplication defined by the row-by-column rule?
Because that is the unique rule making the matrix of a composition equal the product of the matrices. The columns of the composite matrix are the images of the standard unit vectors under the composite map, and expanding those images produces exactly the row-by-column sums. Every algebraic property of the product then follows from the corresponding property of composition.
Is the set of linear transformations really a vector space?
Yes. It is closed under pointwise addition and scalar multiplication, its zero vector is the transformation sending everything to , and the remaining properties reduce to the corresponding properties in the codomain. For finite-dimensional spaces its dimension is , which is the number of entries in a matrix representation.
Can I always compose two linear transformations?
Only when the codomain of the first equals the domain of the second. If maps to and maps to then is defined and maps to . The reverse composition requires to equal , and even when both exist they generally differ.
Does scaling a transformation change its structural properties?
Not for a non-zero scalar. The maps and have the same kernel, the same range and the same rank, because scaling by a non-zero constant cannot turn a non-zero output into zero or vice versa. Only the magnitudes change, which is why a gain change never repairs a rank deficiency.
What is the rank of a composition?
It is at most the minimum of the two ranks, so a narrow stage anywhere in a chain caps the rank of the whole chain. It can also be strictly smaller than both, when the range of the first map intersects the kernel of the second. Rank can never be recovered by later stages, which is why interface rank should be checked during design.
References
- Beezer, R. A. A First Course in Linear Algebra, Version 0.70. University of Puget Sound, 2006. Section LT, subsection NLTFO. Licensed under the GNU Free Documentation License v1.2.
- Axler, S. Linear Algebra Done Right, 3rd edition. Springer, 2015. Chapter 3 on the vector space of linear maps and products of linear maps.
- Halmos, P. R. Finite-Dimensional Vector Spaces. Springer, 1974.
- Dongarra, J. J. et al. A Set of Level 3 Basic Linear Algebra Subprograms. ACM Transactions on Mathematical Software 16(1), 1990.
- ISO 80000-2:2019, Quantities and units — Part 2: Mathematics. International Organization for Standardization.
AI Suggested Questions
- Show that the matrix of a composition must be the matrix product, deriving the row-by-column rule rather than assuming it.
- Construct two linear operators on for which , and then a non-trivial pair for which they do commute. What distinguishes them?
- Find a basis for the space of all linear transformations from to and confirm its dimension is six.
- When is it cheaper to form an explicit product of stage matrices than to apply the stages sequentially? Derive the crossover in terms of the number of inputs.
- Give an example where two full-rank transformations compose to something of much lower rank, and explain what the intermediate space is doing.
- How do condition numbers behave under composition and under addition, and what does that imply for ordering stages in a processing chain?
Related Calculators
Compose, add and scale linear transformations, checking space compatibility and returning the resulting matrix in either order.
Matrix Multiplication CalculatorForm with dimension checking, and display the composite alongside a direct expansion of the composition.
Operator Power CalculatorCompute for a square operator by repeated composition or by diagonalisation, with a comparison of the two costs.
