Interpret “distinct eigenvalues” as pairwise distinct eigenvalues in the chosen field. Select a nonzero eigenvector for each. A single nonzero vector is linearly independent. Suppose inductively that are linearly independent. If adding made the set linearly dependent, its nontrivial relation would have a nonzero coefficient of , since otherwise it would contradict the induction hypothesis. Solving for would place it in the linear span of the first eigenvectors.
Part (c) would then force for some , contradicting pairwise distinctness. Mathematical induction therefore proves that all selected eigenvectors are linearly independent, forming a basis. If the field is , the assertion requires real eigenvalues; a real matrix can instead have nonreal eigenvalues and a eigenvector basis over the complex numbers.
For , the triangular matrix formula gives the characteristic polynomial
The three eigenvalues are distinct, so part (d) already proves the existence of an eigenvector basis. Explicit choices, ordered by eigenvalues , are
Their column matrix has determinant one, and direct multiplication gives respectively one, three and two times the indicated vector.
For , expansion along the last row gives
Again the three eigenvalues are distinct. An explicit eigenvector basis, ordered by eigenvalues , is
Its column matrix has determinant . In particular, 's diagonal entries are not its eigenvalues: it is not a triangular matrix.
Finally , so every nonzero vector is an eigenvector with eigenvalue one. Choose the standard basis . These are linearly independent even though their eigenvalues coincide. Distinct eigenvalues are sufficient for an eigenvector basis, and are not necessary.
Use the source's type Matrix a = [[a]]. For its nonempty rectangular matrices, the number of rows and the first row's length determine the dimensions:
dimensions :: Matrix a -> (Int,Int)
dimensions rows = (length rows, length (head rows))

addMat :: Num a => Matrix a -> Matrix a -> Matrix a
addMat a b
  | dimensions a /= dimensions b = error "addMat: incompatible sizes"
  | otherwise = [[x + y | (x,y) <- zip r s]
                         | (r,s) <- zip a b]
The outer list comprehension pairs corresponding rows; the inner one pairs corresponding entries. Checking both dimensions before using zip prevents silent truncation. Thus the result has entries , the definition of matrix addition. The Num constraint supplies the addition operation.
A recursive transpose removes the first column, then transposes the remaining columns:
transpose :: Matrix a -> Matrix a
transpose [] = []
transpose ([] : _) = []
transpose rows = map head rows : transpose (map tail rows)
The internal recursive calls eventually reach rows of length zero, even though the original input has positive dimensions; the second equation handles this terminating case. Rectangularity ensures that the rows become empty together, so no head or tail is applied to an empty row in the third equation. The output is an matrix with entry . The element type is unrestricted.
Accumulate the product of the matrices from left to right, which matches forward linked list traversal.
PROCEDURE cf2rat(f: fraction; VAR n, d: INTEGER);
VAR p: fraction; a, b, c, e, x: INTEGER;
BEGIN
  a := 1; b := 0; c := 0; e := 1;
  p := f;
  WHILE p # NIL DO
    x := p.head;
    a, b, c, e := a*x+b, a, c*x+e, c;
    p := p.tail
  END;
  n := a; d := c
END cf2rat;
The four-value assignment is simultaneous, as permitted by the source. With , the loop invariant after reading the prefix is
with the empty product initialized to the identity matrix. Multiplication on the right by produces exactly the four assignments above. The associativity of matrix multiplication allows this left-to-right accumulation even though the recursive conversion groups operations from the right.
At completion, the first column is the numerator/denominator pair for the whole continued fraction: the last factor sends to , and each earlier factor applies the recurrence from part (d). The vector is an algebraic device, not a finite input ratio requiring division by zero. For a nonempty list the resulting is positive; for a singleton it is . The product has determinant , so its first-column entries are coprime. Return in linear node-processing time and auxiliary space, without changing the list.
First enumerate each possible row, then choose one row from each row's alternatives:
expand :: Matrix [a] -> [Matrix a]
expand = cp . map cp
The inner Cartesian product converts one row of cell choices into its possible rows; the outer product combines those rows into whole matrices. Every assignment is represented exactly once when each cell's alternatives are distinct. Empty cell domains yield no grids, and an empty matrix yields the singleton list containing the empty matrix.
The product is , so multiplying it by the matrix gives an matrix. The product is , so multiplying it on the left by the matrix also gives an matrix. Both multiplications have matching inner dimensions.
Associativity of matrix multiplication identifies . Thus each matrix has the required action and .
Consequently for every . Taking successively as the standard basis vectors shows that every column of this difference is zero. Hence . Equality on one selected vector would not suffice; here it holds on all vectors.
Using the unit length of ,
Then ordinary matrix expansion gives . Both and its complementary matrix are projectors. The second calculation in fact holds for every idempotent matrix, without requiring the matrix to equal its transpose.
For a sum of mutually orthogonal projectors, orthonormality gives for and one for . Therefore equals zero for different indices and for equal indices. Expanding the finite sum yields
Thus every stated partial sum is a projector. Its image of a linear map is the span of the first orthonormal set of vectors; arbitrary sums of idempotent matrices would not have this conclusion.
The iteration matrix has eigenvalues : expanding its characteristic polynomial down the first column leaves the triangular two-by-two block with diagonal entries . The distinct eigenvalues ensure diagonalizability. Thus its spectral radius is .
The previous bound gives , so the Gauss-Seidel iteration converges for every initial guess under the stated diagonalization. Its limit is the exact solution . Since , a fixed matrix also sends this transformed error to zero; its operator norm can account for any amplification in the original coordinates.
The independent-column representation gives . Thus a vector lies in the kernel of a linear map represented by this matrix precisely when and . Writing the two free coordinates separately gives
The two displayed vectors are linearly independent, so they form a basis of the kernel. Its dimension two also agrees with the rank-nullity theorem, .
True. Transposing the inverse identities shows . If , this becomes , exactly the symmetric matrix condition. The reasoning uses the matrix inverse and transpose identities, without assuming that different matrix factors commute.
True for these square matrices. The determinant multiplication identity gives . Since is invertible, its determinant is nonzero; both factors are therefore nonzero, so both matrices have matrix inverses.
Equivalently, must be injective and must be surjective, and either property implies invertibility for an endomorphism of a finite-dimensional vector space. The equal square dimensions matter: a rectangular matrix and a right inverse can have identity product without being mutually invertible square matrices.
Not unique in general. For any invertible matrix ,
is another rank factorization, with the same full ranks. This is a change of basis in the intermediate -dimensional space. For example, even has different full-rank factors. Once a particular ordered basis is fixed, its coordinate matrix is unique; it is the basis choice that creates the freedom.
For the first matrix choose its single independent column:
Their product has every column equal to , and both factors have rank one.
For the second matrix, the first and third columns are independent and the second equals the first, giving
Multiplication reconstructs the stated matrix. The first factor has independent columns and the second has independent rows, so both have matrix rank two, as required for a rank factorization.
The two square products can have different sizes, but their matrix traces are both the same finite double sum:
Interchanging two finite sums and commuting their scalar factors is valid over the real numbers. No commutation of the matrix products themselves is asserted. This proves the cyclic property of the trace in the rectangular-factor case.
Let . If , the matrix is zero and the identity is immediate. Otherwise choose the rank factorization from part b. The column space of is the image of .
An idempotent matrix acts as the identity on its image: if , then . Applying this to each column of gives . Substituting yields . Since has full column rank, the represented map is injective, so each column of is zero. Thus .
Now the rectangular cyclic property of the trace gives
This proves that the trace of an idempotent equals its rank using the supplied factorization method. Orthogonality of the projection is unnecessary: the argument applies to every real idempotent matrix.