Matrix Domain and Codomain Guide
A matrix can describe a linear transformation. It takes an input vector from one space. It returns an output vector in another space. The input space is the domain. The target space is the codomain. For an m by n matrix, the usual mapping is from R^n to R^m. The n columns define how many input coordinates are required. The m rows define how many output coordinates are produced.
Why These Spaces Matter
Domain and codomain help explain what a matrix is allowed to accept and return. They also support deeper questions. A map is injective when different inputs do not collapse to the same output. A map is surjective when every vector in the codomain can be reached. Rank, nullity, pivot columns, and dimensions tell the story.
Rank and Nullity
Rank is the dimension of the column space. It counts independent output directions. Nullity is the dimension of the null space. It counts free input directions that map to zero. The rank nullity theorem connects them. For a matrix with n columns, rank plus nullity equals n. This calculator uses row reduction to estimate these values and then explains the mapping status.
Practical Interpretation
When rank equals the number of columns, the transformation is one to one. When rank equals the number of rows, it covers the whole codomain. A square matrix with full rank is both injective and surjective. Then the map is invertible. If rank is smaller, some information is lost, or some target vectors cannot be reached.
Use in Study and Work
This tool is useful for algebra classes, engineering models, data transformations, graphics pipelines, and systems analysis. You can enter a matrix, choose labels, test a vector, and export the result. The example table gives quick patterns for common matrix sizes. Always review numerical answers when entries are rounded, very large, or very close to zero.
Good Entry Habits
Use rows for output equations and columns for input variables. Separate entries with spaces or commas. Keep dimensions small enough to inspect. Try exact integers first. Then test decimals if needed. Compare the vector result with the row formulas. This makes errors easier to find before downloading reports or sharing files.