An application-led calculation is easier to interpret when the underlying vector operations are explicit. We develop matrix arithmetic and a general determinant, then use one dependent data model and one independent coordinate model to connect span, rank, basis and invertibility.
1 Vectors matrices and linear transformations
A vector is an ordered list of real coordinates. Addition and scalar multiplication act coordinatewise. A linear combination weights and adds vectors. Their span is the set of all such combinations; they are independent if a zero combination forces all coefficients to vanish. A basis is an independent spanning list, and its length is the dimension.
A matrix has rows and columns. Addition requires matching shapes. Matrix-vector multiplication is , equivalently a linear combination of columns with coefficients . Therefore its image is the column span and its kernel consists of coefficient combinations giving zero. Its rank is the dimension of the column span.
For compatible matrices, . Expanding the finite sums proves , so multiplication represents successive transformations. It is associative but not generally commutative. Transpose exchanges row and column indices and satisfies , because its entry is the same finite sum in reversed matrix order.
Dependent observations. Let , , . The third is the sum of the first two, so rank is 2. To represent , the coefficients satisfy , ; the third measurement is redundant. All representations are , with null direction . Dependence is a statement about information, not a computational defect.
Build the determinant from smaller matrices
Definition
Submatrix, minor, and cofactor
Let be an matrix with . For indices , delete row and column simultaneously. The resulting matrix is the submatrix .
The minor belonging to is the scalar
The cofactor belonging to is the signed scalar
The signs form a checkerboard whose upper-left sign is positive:
The notation names a matrix, is a determinant of that matrix, and is that scalar after the sign has been attached. Keeping these three objects distinct prevents a common double-sign error.
Definition
Recursive definition of the determinant
For a matrix , define
For an matrix with , define its determinant by expansion along the first row:
This is a definition, not yet a theorem about other rows or columns. Each minor in the sum has size , so repeated use of the definition eventually reaches the base case. No determinant convention is needed: the submatrix and minor definitions are used only for .
Arbitrary cofactor expansion from the recursive determinant
Let be real , , with determinant defined by the one-by-one base case and first-row recursion. Let be the permutations of . Define the inversion number as the number of pairs with , and put .
Suppose and delete position and value , keeping the relative orders of the remaining positions and values; the resulting permutation is . If entries before position are smaller than , the inversions removed are . Consequently
Define . For , it is the recursive determinant. For , grouping by and using the sign identity gives . Induction therefore proves .
Now fix any row and group the same finite permutation sum by . Deletion is a bijection to all permutations of the corresponding minor, so
For a fixed column , each permutation has a unique position with . Grouping by that position gives
Both expansion formulas concern , so no empty determinant convention was introduced. This proves the general expansion theorem without assuming alternating row rules or the determinant product theorem.
Why the structural rules follow
Zero rows and zero columns
Theorem
A zero row or zero column gives determinant zero
If every entry in one row or one column of a square matrix is zero, then its determinant is zero.
Theorem
A row or column with one possible nonzero entry
For a square matrix of size , suppose all entries in row are zero except possibly . Then
The same formula holds when all entries in column are zero except possibly . The formula includes the case .
For , a matrix with a zero row is , whose determinant is by the base definition. For , expand along that row using the arbitrary-row theorem. Every term has a zero entry as its factor, so every term is zero and hence .
The zero-column statement can be proved directly by induction, which makes the inheritance of the zero column explicit. For , the only matrix with a zero column is , and its determinant is . Assume the statement for . Let be a matrix with zero column . Expand along the first row. The term from column is zero. In every other term, delete row and a column ; the original zero column survives as a zero column of the resulting submatrix (with its index shifted when ). By the induction hypothesis each such submatrix has determinant zero. Hence every term is zero, proving .
For the one-support theorem, the row case follows by expanding along row : all terms except the -term vanish. For the column case, expand along row . The -term remains. For each , the submatrix inherits a zero column from column of , so its determinant is zero by the zero-column result. Therefore only remains. This is the precise reason that a sparse row or column collapses the calculation to one minor.
Triangular matrices
Theorem
Triangular determinant theorem
If is upper triangular or lower triangular, then
We prove the upper-triangular statement by induction on . For , it is the determinant definition. Suppose it holds for upper-triangular matrices, and let be upper triangular of size . Its last row has zero entries except possibly . Expanding along that last row gives
because the sign is . The retained submatrix is still upper triangular, with diagonal . By induction its determinant is , giving the required product through . For a lower-triangular matrix, expand along the first row, whose only possible nonzero entry is ; the retained submatrix is lower triangular with diagonal , and the same induction proves the result.
Multilinearity in one fixed row
Theorem
Multilinearity in one fixed row
Fix every row except row . If the new row is , then
For , the base definition gives
For , fix every row except row . Let matrices agree in all those fixed rows, and suppose their th rows satisfy . For each column , deleting row gives the same submatrix:
Expanding along row and using the entrywise relation gives
The equality works precisely because every other row is held fixed; changing two rows at once is a different statement.
Adjacent swaps and repeated rows
Theorem
Repeated rows force determinant zero
If a square matrix has two identical rows, then its determinant is .
Let have adjacent rows , and let be obtained by swapping those two physical rows. Expand along row . Expand along row , where the row has moved. For each column , the retained submatrix in the two expansions is the same matrix: deleting the position occupied by leaves the other row in the same order. However, the signs differ:
The entries and minors therefore match term by term with the opposite sign, so . Swapping rows in positions can be realised by adjacent swaps, an odd number, and hence also changes the sign.
If rows and of are identical, the matrix obtained by swapping them is still . The swap result then gives . Since the entries are real, this implies and therefore . This proof does not rely on a later row-replacement rule.
Indexing and strategy
For each term, keep three objects visible: the selected entry, its submatrix after deleting one row and one column, and the minor obtained by taking that submatrix determinant. Write the checkerboard sign from the original row and column positions before evaluating the minor. When a minor is expanded again, its local indices guide the inner sign; they do not replace the outer sign.
The arbitrary-row and arbitrary-column theorem makes the choice of expansion line strategic. Choose a line with many zeros or simple surviving minors, and state that choice before calculating. A zero entry removes a branch immediately, whereas a zero minor must be established by its own calculation. The recursive first-row formula defines the determinant; arbitrary-line expansion is the theorem that permits this computational choice.
The determinant product follows from a finite multilinear expansion
Let be real matrices with . Use the already proved determinant permutation formula, multilinearity in the rows, zero determinant for repeated rows, and sign reversal for a row exchange. Row of is , where is row of . Expanding the finite multilinear expression gives
Tuples with a repeated index have zero determinant. Every remaining tuple is a permutation of . Sort it by swapping adjacent inverted neighbours. If a list is not increasing, such neighbours exist. Each swap removes exactly their mutual inversion; comparisons with every other entry contribute the same total before and after. Thus exactly swaps sort the list. The row-exchange rule then gives . Substitution into the finite sum and the proved permutation formula for give . No invertibility assumption or infinite expansion was used.
The adjugate identity and continuity of inversion
For , let and define . The entry of is . If , row expansion makes this . If , it is the row- expansion of the matrix obtained by replacing row by row : its row- cofactors are unchanged, and its repeated rows make its determinant zero. Hence .
The permutation formula also gives : replace a permutation by its inverse. Their inversion numbers agree, since an inversion corresponds to the inversion of the inverse, and their entry products agree after reindexing. This applies to every minor too, so . Applying the first identity to and transposing yields . For , define and both identities are immediate.
Nonsingularity after the adjugate identity
The established cofactor expansions and repeated-row rule give , with when . If , division supplies a two-sided inverse. Conversely, if has an inverse, the product formula gives , so . The adjugate identity is an explicitly selected earlier proof here, not an assumption that every matrix is invertible.
2 A determinant in any finite dimension
For square , define
where counts pairs with . This explicit integer count avoids choosing a transposition factorization. Exchanging two row positions changes inversion parity by an odd number in the reindexed permutation sum, so it reverses the determinant's sign. The formula is linear in each row separately and gives determinant 1 for .
Consequently, equal rows give zero; adding a multiple of one row to another preserves the determinant; multiplying one row by multiplies it by . A triangular matrix has determinant equal to its diagonal product, since all other permutation products include a forced zero entry.
Invertibility criterion. A square matrix is invertible exactly when its determinant is nonzero.
Proof. Elimination uses reversible row operations whose determinant effects are nonzero scalings or sign reversals. With every pivot present it reaches , so determinant is nonzero and the row operations construct an inverse. If a pivot is missing, an echelon row is zero, making determinant zero and leaving a nonzero null vector. That null vector prevents an inverse.
A determinant is defined only for square matrices. A rectangular matrix can have full column rank or full row rank without having a determinant or a two-sided inverse.
3 A complete independent coordinate example
Take columns , , :
Cofactor expansion along the first row gives . Thus the three columns form a basis of . Solving gives
Hence has unique coordinates in this basis. The inverse is half the matrix with rows , and ; multiplying confirms the identity. This basis spans the whole space, whereas the preceding dependent columns span only a plane.
4 Inner products Euclidean norm and orthogonality
The Euclidean inner product is , and the norm is . Orthogonal vectors have dot product zero.
For the Euclidean space with the inner product just defined, the following estimates hold.
Theorem
Cauchy-Schwarz inequality
For all vectors ,
Equality holds if and only if and are linearly dependent.
Proof
The quadratic-polynomial proof
First suppose . Both sides of Cauchy-Schwarz are then , so equality is immediate; moreover, a pair containing the zero vector is linearly dependent. Thus both the inequality and the stated equality condition hold in this case.
Now suppose and consider the function
Since a norm-square is always nonnegative, for every real . Expanding gives
Because its leading coefficient is , this is a genuine quadratic polynomial in . It is nonnegative for every real , so its discriminant is nonpositive:
Therefore
In the case , equality in Cauchy-Schwarz occurs exactly when the discriminant is zero, equivalently when has a real root. Such a root means for some real , so is a scalar multiple of . Conversely, if and are linearly dependent, then for some real , and direct substitution gives equality. Together with the case , this proves the equality condition, including all cases in which one or both vectors are zero.
Theorem
Triangle inequality
For all vectors ,
Equality holds if and only if at least one of and is a nonnegative scalar multiple of the other, including when one vector is zero.
Proof
The equality case must survive both inequalities
There are two successive equality gaps to track:
Equality in the first gap controls the sign of the inner product; equality in the second controls linear dependence. The zero-vector cases are kept separate, so no normalization is needed there.
Start with
By Cauchy-Schwarz,
Therefore
Taking square roots gives
For equality, both estimates in the chain must be tight. The first requires , so the inner product is nonnegative. The Cauchy-Schwarz bound is tight exactly when and are linearly dependent. If both vectors are nonzero, write ; then forces . If one vector is zero, equality is immediate, and the zero vector is a nonnegative scalar multiple of the other. Conversely, vectors satisfying this nonnegative-multiple condition give equality by direct substitution. Thus nonzero vectors pointing in opposite directions give equality in Cauchy-Schwarz, but not in the triangle inequality.
For nonzero , the component of along it is . Subtracting gives an orthogonal residual, because its dot product with is zero. For example, projecting onto gives and residual . This geometry underlies the least-squares accounting chapter without requiring an optional matrix decomposition.
5 Graded practice
E1 Foundation. For and , calculate and .
E2 Determinant. Find the determinant and rank of .
E3 Dependence. Determine whether are independent. Find one nonzero null combination.
E4 Projection. Project onto the line spanned by and find the residual norm.
6 Full solutions
S1. while . The different order gives different transformations.
S2. Triangularity gives determinant . It is nonzero, so rank is 3 and the kernel is zero.
S3. The third vector equals twice the first plus three times the second. Thus is a nonzero coefficient combination; the list is dependent and spans the same two-dimensional plane as the first two vectors.
S4. The coefficient is , so projection is . Residual is , orthogonal to the line and of norm .
Summary
Matrix arithmetic encodes linear combinations and composition. Span and null space identify possible outputs and invisible changes; independence and basis determine uniqueness of coordinates. Determinants detect square invertibility, while Euclidean inner products provide the geometry needed for orthogonality and projection.