Rank of a horizontally partitioned matrix is at most the sum of the block ranks
ProvedMatrixBlockRank.rank_fromCols_leLet be a field and let and be matrices over with the same rows, of sizes and . Write for the matrix obtained by placing them side by side, with columns indexed by the disjoint union of the two column index types. Then
The rank of a matrix is the dimension of the image of the linear map it induces by multiplication on column vectors. The image of is contained in the sum of the images of and of , because a vector indexed by the disjoint union splits into its two halves and the block matrix sends it to the sum of the two images; the dimension of a sum of two subspaces is at most the sum of their dimensions. Equality can fail in either direction of the obvious guess: the two images may overlap, in which case the inequality is strict.
The lemma is the ranks-only half of the standard fact that the column space of a block matrix is the sum of the column spaces of its blocks, and it is the form in which that fact is usually consumed: a bound on the rank of a horizontally partitioned matrix by data about its parts.
Formalization Note. No finiteness is required of the row index type, only of the two column index types, so the statement applies to matrices with infinitely many rows.
import Mathlib open Matrix
namespace MatrixBlockRank
theorem rank_fromCols_le {𝕜 : Type*} [Field 𝕜] {l n₁ n₂ : Type*}
[Fintype n₁] [Fintype n₂]
(M : Matrix l n₁ 𝕜) (N : Matrix l n₂ 𝕜) :
(Matrix.fromCols M N).rank ≤ M.rank + N.rank := by
sorry
end MatrixBlockRank