Motivation
We assume equations, fractions, and Chapter 2's vectors and dot products. This chapter builds a bridge to later linear algebra through scientific balances. You will turn several conservation equations into a matrix system, solve by reversible row operations, describe every free choice, and interpret a unique solution in its physical domain. Three-dimensional coordinates extend the earlier plane geometry.
The calculations below are mathematical balance models. Their assumptions include compatible units and exact conservation. A symbolic chemical balance is an atom-count identity.
4.1 Three-dimensional coordinates and planes
Optional: spatial geometry. Three-dimensional vectors, planes and projections extend coordinate ideas. Exercises 1–2 and 8 explore this connection.
A vector has dot product and norm . A plane through point with nonzero normal is described by
The normal is perpendicular to every displacement within the plane. A line has equation with . Substitution into a plane equation produces one scalar condition on .
Worked example
Worked example 1: line–plane intersection. Let and plane . Substitution gives , so and the intersection is . Its coordinates sum to six. If the direction's dot product with the normal were zero, there would instead be no intersection or the whole line would lie in the plane, depending on its starting point.
The vector projection onto a nonzero direction remains in three dimensions. The residual's dot product with is zero by direct expansion. The denominator ensures that rescaling the direction does not alter the geometric projection.
4.2 Matrices organize coefficients
Matrices and systems. Sections 4.2–4.4 develop matrix operations and elementary systems. The summation sign below means adding the indicated products over all column indices; Section 5.1 explains that notation in detail.
Definition
A matrix with rows and columns has size . Matrix-vector multiplication is
Thus represents simultaneous linear equations in unknowns. Each column records the contribution of one unknown to all balances; each row records one balance. Addition is entrywise for matching sizes. For an matrix and an matrix, and size is .
Worked example
Worked example 2: two samples at once. A sensor model is with . For input columns and , put both in . Then
Each output column corresponds to the matching sample. Entrywise multiplication would not represent this combined sensor rule.
The transpose interchanges rows and columns. The identity has diagonal entries one and others zero. Multiplication generally depends on order; a transformation applied after another appears on the left. Checking sizes is necessary even before checking entries.
4.3 Reversible elimination and free variables
Proposition
Store a system in its augmented matrix . Swapping two rows, multiplying a row by a nonzero scalar, and adding a multiple of one row to another preserve all solutions. The reason is reversibility: undo a swap, multiply by the reciprocal, or subtract the added multiple. Multiplication by zero has no inverse and is not allowed.
Eliminate entries below a nonzero leading entry, or pivot, then continue to the right on the remaining rows. Back substitution recovers constrained variables. A column without a pivot corresponds to a free variable in a consistent system. A row of zeros with nonzero right side is impossible; a completely zero row imposes no condition.
Worked example
Worked example 3: three concentrations. Suppose litres of solutions at concentrations mass units per litre make litres at concentration three. An additional requirement is . Volume and mass balances give
Use , giving and . Subtract five times the first from the second: . Thus , , . Volumes are nonnegative, sum to ten, and total solute mass is . An algebraic solution failing a nonnegativity condition would not be a valid mixture.
Worked example
Worked example 4: infinitely many rather than an arbitrary single answer. For , , the second equation is redundant. Choose , giving every solution . Setting both free variables to zero produces one member, not the complete answer. If all three quantities must be nonnegative, feasibility additionally requires and .
4.4 Inverses and determinants as preparation
Proof
For a square matrix, an inverse satisfies . Then has the unique solution . Inverses are unique: if were both inverses, .
Proposition
For , determinant gives
Common mistake
Direct multiplication proves the identity. A zero determinant does not mean every right side is impossible; it means the coefficient matrix does not support a unique solution for every right side. Elimination then distinguishes inconsistency from redundancy.
Worked example
Worked example 5: invert a calibration table. In Worked example 2, determinant of is , so . For observed column , the recovered input is . Multiplication by the original table checks the recovery. Measurement errors and approximate inversion require additional numerical analysis; the exact algebra alone does not quantify them.
Proof details: matrix composition, elimination and the two-by-two inverse
For the optional spatial section, use the elementary Euclidean distance and Pythagorean theorem (including its converse). For , direct coordinate expansion gives
For nonzero , Pythagoras and its converse therefore identify exactly with a right angle; the zero vector has zero dot product with every vector by definition. If and , then and
The component lies on the direction line of . Its uniqueness follows because any with forces . This supplies the three-dimensional projection and normal-plane interpretation, not just an analogy with the plane.
Work over real numerical entries, with finite positive dimensions and all displayed products size-compatible. From the row-by-column definition, for , and ,
Distributivity and interchange of these finite real sums justify every equality. Applying the same computation to each column proves whenever the sizes match; the diagonal definition gives and with the appropriate identity sizes. Thus, if is a two-sided inverse of square , then supplies a solution, while any solution satisfies . This proves both existence and uniqueness, rather than only giving a candidate.
For elimination, a row operation is performed on the entire augmented row. At each stage choose a nonzero entry in the current coefficient column among the remaining rows, swap its row into place, and use its nonzero pivot to clear the entries below it. If the current remaining coefficient column is zero, skip that column. Each pivot consumes one row and one column, so the finite procedure terminates in echelon form. A zero coefficient row with nonzero right side forbids any solution. Otherwise give arbitrary real values to the nonpivot coefficient variables. Starting at the last pivot row, divide by its nonzero pivot to determine its pivot variable, then continue upwards. This constructs one solution for every free choice and determines each pivot variable uniquely. Conversely, every solution supplies those free choices and must obey the same back substitutions. Since each row operation has the inverse already stated in Section 4.3, these are exactly all solutions of the original system. The augmented right-hand-side column is not an unknown-variable column.
For , put and . Direct multiplication on both sides gives
If , division by this nonzero real scalar proves that is the inverse in Section 4.4. If and the first row is nonzero, the nonzero column satisfies . If that row is zero but , use ; if , use . Thus in every zero-determinant case for some . Whenever has one solution , all with are also solutions, so it is not unique; other right sides may be inconsistent. This proves the stated distinction without inferring it from one singular example alone.
4.5 Homogeneous conservation and integer coefficients
Application: atom counts. This example and Exercise 9 apply elementary homogeneous systems.
A homogeneous system has form and always has the zero solution. A nonzero balance can be scaled: if , then . A physical counting interpretation may require positive integers rather than arbitrary real scales.
Worked example
Worked example 6: atom-count balance. Write an algebraic identity
Counting carbon, hydrogen and oxygen gives , , and . Thus , , and . The smallest positive integer choice is , giving coefficients . The zero vector also satisfies the homogeneous equations but is not a meaningful nonzero count identity. Multiplying the positive-coefficient solution above by a negative scalar still satisfies the homogeneous equations, but the resulting negative coefficients violate the positive-count convention.
This example shows how a homogeneous solution family is filtered by an interpretation. Solving over real numbers and choosing an integer normalization are different steps.
4.6 Graded exercises
Foundation
Checkpoint
Exercise 1
- Find the length of and its dot product with .
Checkpoint
Exercise 2
- Give a normal-vector equation for the plane through with normal .
Checkpoint
Exercise 3
- Compute for .
Core
Checkpoint
Exercise 4
- Solve , , .
Checkpoint
Exercise 5
- Describe all real solutions to , . Then give the extra inequalities for nonnegative variables.
Checkpoint
Exercise 6
- Decide whether , is consistent, and name a reversible operation proving the answer.
Checkpoint
Exercise 7
- Find the inverse of and solve .
Checkpoint
Exercise 8
- Find the intersection of line with plane .
Synthesis
Checkpoint
Exercise 9
- Find the smallest positive integer coefficients in the atom-count identity , writing the homogeneous constraints first.
Checkpoint
Exercise 10
- Let a square matrix have an inverse. Prove two different input vectors cannot give the same output. Explain why this says nothing by itself about whether a recovered input is nonnegative.
4.7 Full solutions
Solution · Exercise 1
- Length is . Dot product is .
Solution · Exercise 2
- The plane equation is , or .
Solution · Exercise 3
- The output is .
Solution · Exercise 4
- Subtract the second from the first to obtain , hence . Subtract the third from the first to obtain , hence . The first then gives . All original equations check.
Solution · Exercise 5
- The second equation is redundant. Set , giving . For nonnegativity require .
Solution · Exercise 6
- Apply to the augmented matrix. The result is , proving inconsistency.
Solution · Exercise 7
- Determinant is , so the inverse is . Its product with is , which gives original output .
Solution · Exercise 8
- Substitution gives , so and the point is .
Solution · Exercise 9
- Hydrogen gives , oxygen gives . Thus . The smallest positive integer choice is . These are symbolic atom counts.
Solution · Exercise 10
- If , then . Multiply by to obtain , hence . This establishes uniqueness over real vectors. It does not constrain their signs; for example, recovers a negative input from the same negative output just as uniquely as a positive one.
Matrix reasoning laboratory: operations, pivots and interpretation
A matrix calculation should answer a precise modelling question. Before doing arithmetic, identify which entries are coefficients, which unknown column the matrix acts on, and what one output component means. If the original equations carry different units, first express each measured quantity numerically in its declared unit and normalize each balance by its own unit. Row operations then combine numerical equalities; they are not instructions to add unlike physical quantities without conversion. This distinction matters when a volume balance and a mass balance appear in the same augmented matrix.
Why matching sizes do not imply interchangeable order
Worked example
Let
Both products exist and are two by two, but direct row-by-column multiplication gives
For an input column , applying and then gives , whereas applying and then gives . This one checked counterexample disproves a universal commutativity claim. The correct composition rule keeps the last transformation on the left. A size check is necessary for multiplication, but it does not prove that two differently ordered products are equal.
See every reversible step in a three-balance problem
Worked example
Return to the concentration balance from Section 4.3. Write for the numerical volumes in litres. After the balances have been expressed in the stated numerical units, the augmented matrix is
Apply and . Next divide row two by the nonzero number two. The resulting matrix is
Now gives last row . Thus . Back substitution gives , so , and then , so . Each of the three columns has a pivot, leaving no freely chosen unknown. Every operation used has an explicit inverse: add back the removed multiple or multiply by two. Therefore the procedure preserves the complete solution set, not just a candidate that happens to work.
The algebraic answer must still be interpreted. The three recovered volumes are nonnegative, total ten litres, satisfy the additional ratio constraint, and produce the required mass. Checking all original balances catches transcription errors that a neat final triangular matrix cannot detect. If an algebraic answer had a negative component, reversible elimination could still have been correct while the proposed mixture was infeasible. Uniqueness over real numerical columns and feasibility as a physical mixture are separate conclusions.
A zero determinant requires a case analysis, not a guess
Consider the same coefficient matrix with two different right sides:
The determinant of is zero. In the system , subtracting twice the first row from the second produces the identity . It supplies no new restriction. Setting the second unknown to gives every solution , with . For nonnegative unknowns one must additionally restrict . The unrestricted solution line and its feasible segment are not the same set.
In the system , the identical row operation instead produces . No real input can satisfy that equality, so the system is inconsistent. The coefficient determinant is the same in both problems; it cannot alone distinguish their solution sets. Geometrically, the first pair of equations describes the same line twice, while the second describes distinct parallel lines. A nonzero determinant for a two-by-two coefficient matrix instead gives one intersection for every right side, as the inverse formula in Section 4.4 proves.
Common mistake
A zero row on the coefficient side is not enough information. Inspect the right side as well: an all-zero augmented row is redundant, but a zero coefficient row with a nonzero right side is a contradiction. In a consistent system, identify the free unknowns and express every pivot unknown in terms of them; setting all free quantities to zero gives only one member and does not describe the full solution set. Physical inequalities filter that set only after the algebraic family has been found.
Summary
Coordinates turn lines and planes into scalar equations. Matrices collect simultaneous balances, and reversible elimination preserves all solutions. Free parameters describe a family rather than one arbitrary member. Inverses certify uniqueness for square systems. Scientific interpretations then impose additional nonnegative, integer, dimensional or capacity constraints.