Basis of Image Calculator: How to Find the Image Space of a Matrix
About the Author

A basis of image calculator finds the smallest set of independent vectors whose span equals the image of a matrix — the set of every output the linear map T(x) = Ax can actually produce. The image lives in the codomain ℝm, but it usually doesn't fill it. A 3×4 matrix maps four-dimensional inputs into ℝ3, yet its image might be just a plane through the origin. Finding the basis tells you exactly how big that reachable set is and which directions define it. The whole job comes down to one operation you already know: row reduction.
Image, Column Space, and Range Are the Same Thing
These three names trip people up because textbooks switch between them mid-chapter. They all describe one set. The image of T(x) = Ax is every vector you can write as Ax for some input x. Write that out and Ax is just a linear combination of the columns of A weighted by the entries of x — which is the definition of the column space. And "range" is the function-theory word for the same collection of outputs.
| Term | Where you see it | Lives in |
|---|---|---|
| Image, Im(A) | Linear transformation language | ℝm (codomain) |
| Column space, Col(A) | Matrix language | ℝm |
| Range | Function / mapping language | ℝm |
One warning worth burning into memory: the image is not the kernel. The kernel (or null space) collects the inputs that get crushed to zero and sits in the domain ℝn. The image collects the outputs you can reach and sits in the codomain ℝm. Different spaces, different dimensions, opposite ends of the map.
Why the Basis Comes From the Original Columns, Not the Reduced Ones
Here is the single most common mistake, and it costs students full marks every term. You row-reduce A to spot the pivot columns — good. But then you must go back and grab those columns from the original matrix. Row operations change the column space. They preserve which columns are dependent on which, so they correctly identify the pivots, but the actual vectors in the reduced matrix are different from the ones you started with. The pivot positions are trustworthy; the reduced entries are not.
So the recipe is exactly four steps: row-reduce A, note the pivot column indices, return to the original A, and copy out those columns. Those copied columns are linearly independent and they span the image, which is precisely what "basis" demands. Our RREF calculator handles the reduction if you want to see every elimination step in isolation.
Worked Example: Running a 3×4 Matrix Through the Basis of Image Calculator
Take the matrix below — it has four columns living in ℝ3, so its image is at most three-dimensional, but watch what actually happens.
A = [ 1 2 0 1 ]
[ 0 1 1 1 ]
[ 1 3 1 2 ]
Step 1 — Reduce. Subtract row 1 from row 3, then subtract row 2 from the new row 3. Row 3 becomes all zeros.
Step 2 — Find pivots. The leading ones land in columns 1 and 2. Columns 3 and 4 are free.
Step 3 — Pull originals. Basis = { [1, 0, 1]T, [2, 1, 3]T } — taken straight from columns 1 and 2 of the starting matrix.
Step 4 — Read dimensions. dim Im(A) = 2, so the image is a plane through the origin inside ℝ3, not all of it.
Rank–nullity ties a neat bow on it: with n = 4 columns and rank 2, the nullity is 4 − 2 = 2. Two independent input directions collapse to zero, and the two surviving directions sweep out the plane you just found. Load this exact matrix with the Example button to see the basis, the rank, and the nullity rendered side by side.
Testing Whether a Specific Vector Is in the Image
"Is b reachable?" is the same question as "does Ax = b have a solution?" — and that has a clean rank test. Augment A with b to form [A | b] and reduce. If the rank doesn't change, b was already a combination of the columns and it sits in the image. If the rank jumps by one, you've introduced a new independent direction, the system is inconsistent, and b lives outside the image.
For the matrix above with image = span{[1,0,1]T, [2,1,3]T}, the vector b = [3, 2, 5]T equals −1·[1,0,1]T + 2·[2,1,3]T, so rank([A|b]) stays at 2 and b is in the image. Swap in b = [1, 1, 0]T and the augmented rank climbs to 3 — that target can't be reached. The calculator runs this check automatically when you tick the target-vector box. For the full coordinate breakdown of how b decomposes, the basis calculator expresses any vector in terms of a chosen basis.
When the Image Fills the Whole Codomain
A transformation is onto (surjective) exactly when its image equals the entire codomain — when every possible output is reachable. The test is a one-liner: the map T(x) = Ax from ℝn to ℝm is surjective if and only if rank(A) = m, the number of rows. That immediately rules out tall matrices: if you have more rows than columns (m > n), rank can never reach m, so a tall matrix is never onto. You simply don't have enough columns to span the larger codomain.
This connects to solvability in a satisfying way. If rank(A) = m, then [A | b] can never gain rank for any b, so Ax = b is solvable for every right-hand side. A surjective map leaves no unreachable targets. You can confirm the rank quickly with the matrix rank calculator before you even start hunting for a basis.
Four Mistakes That Wreck an Otherwise Correct Answer
- Reporting reduced columns as the basis. The pivots are right; the numbers are wrong. Always copy from the original matrix.
- Confusing image with kernel. Image dimension is the rank; kernel dimension is the nullity. They add to n, the number of columns — not to anything involving m.
- Using rows instead of columns. The image is spanned by columns. The row space is a different subspace that happens to share the same dimension (the rank), which lures people into the wrong vectors.
- Calling a tall matrix surjective. If m > n, the image can never fill ℝm. Check the shape before you claim "onto."
Where the Image Shows Up in Practice
In least-squares regression, the image of the design matrix is the set of predictions the model can possibly make; fitting a line means projecting your data onto that subspace and the residual is whatever lies outside the image. In control theory, the image of the controllability matrix tells you which states a system can actually be steered to. In computer graphics, a projection matrix has an image that is the screen plane — everything in the scene gets flattened into it. Each case is the same question dressed differently: what outputs are reachable, and how many independent directions do they span? You can build the full transformation and inspect its behavior with the matrix calculator. For the formal definitions, the column space reference on Wikipedia lays out the proofs behind the pivot-column rule.



