Skip to main content
Home
Calculating...
Home Linear Systems Row_Space

Row Space Calculator: Find Basis for Row Space of a Matrix

Find the row space of a matrix A: all linear combinations of its row vectors. The row space is a subspace whose dimension equals the rank of A, and a basis comes from the non-zero rows of RREF.

Calculator

Enter your matrix below and click "Calculate" to see the step-by-step solution.

Rows (m) =
Cols (n) =
Maximum size: 6ร—6

The row space consists of all vectors that can be written as Aแต€ยทy

A Matrix A (m ร— n)

\\

Rows are labeled rโ‚, rโ‚‚, ..., rโ‚˜

Computing row space basis...

Enter a matrix A to find its row space (all linear combinations of rows).

The row space dimension equals the rank of A.

Learn About Row_Space

Understanding the concepts behind the calculations.


What is Row Space?

The row space of a matrix A is the set of all possible linear combinations of its row vectors. It is a subspace of โ„โฟ (where n is the number of columns).

$$ \text{Row}(A) = \text{span}\{\mathbf{r}_1, \mathbf{r}_2, \ldots, \mathbf{r}_m\} = \left\{ \sum_{i=1}^m c_i \mathbf{r}_i : c_i \in \mathbb{R} \right\} $$

Where rโ‚, rโ‚‚, ..., rโ‚˜ are the row vectors of the mร—n matrix A.

๐Ÿ’ก Intuition: Think of row space as "all vectors you can create by combining the rows" โ€” just like how you combine ingredients to make different recipes.


Key Properties of Row Space

๐ŸŽฏ Core Properties

  • Subspace of โ„โฟ โ€” Lives in the column space of Aแต€
  • Dimension = rank(A) โ€” Same as column space dimension
  • Spanning set โ€” The original rows span the row space
  • Basis from RREF โ€” Non-zero rows of RREF form a basis
  • Row operations preserve it โ€” Row space doesn't change during elimination

โšก Quick Facts

  • Located in โ„โฟ (n = # of columns)
  • dim(Row(A)) = rank(A)
  • Row(A) โŸ‚ Null(A) (orthogonal complements)
  • โ„โฟ = Row(A) โŠ• Null(A)
  • Row operations do not change the row space

๐Ÿ“Œ Remember: The row space is the same for any matrix row-equivalent to A (including RREF). This is why we can use RREF to find a basis!


How to Find a Basis for Row Space

The Standard Method (Using RREF)

  1. Compute RREF โ€” Find the Reduced Row Echelon Form of A
  2. Identify non-zero rows โ€” Take all rows that are not all zeros
  3. These form a basis โ€” Non-zero RREF rows are linearly independent and span the row space

Why this works: Row operations preserve the row space, and non-zero RREF rows are guaranteed to be linearly independent.

Alternative Methods

  • QR Decomposition: Qแต€ gives orthonormal basis (more stable)
  • SVD: Vแต€ gives orthonormal basis (most stable)
  • Original rows: But they may be linearly dependent

Step-by-Step Examples

Example 1: Full Row Rank (Rank = 3)

Matrix A (3ร—3, rank 3):

$$ A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 10 \end{pmatrix} $$

Step 1: Compute RREF

$$ \text{RREF}(A) = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} $$

Step 2: Identify non-zero rows
All three rows are non-zero.

Step 3: Basis for Row Space

$$ \text{Basis} = \left\{ \begin{pmatrix} 1 & 0 & 0 \end{pmatrix},\; \begin{pmatrix} 0 & 1 & 0 \end{pmatrix},\; \begin{pmatrix} 0 & 0 & 1 \end{pmatrix} \right\} $$

Conclusion: The row space is all of โ„ยณ. The rows are linearly independent (full row rank).

Example 2: Rank-Deficient Matrix (Rank = 1)

Matrix B (3ร—3, rank 1):

$$ B = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 3 & 6 & 9 \end{pmatrix} $$

Step 1: Compute RREF

$$ \text{RREF}(B) = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix} $$

Step 2: Identify non-zero rows
Only row 1 is non-zero.

Step 3: Basis for Row Space

$$ \text{Basis} = \left\{ \begin{pmatrix} 1 & 2 & 3 \end{pmatrix} \right\} $$

Conclusion: The row space is a 1-dimensional line through the origin in โ„ยณ. All rows are multiples of (1,2,3).

Example 3: 2ร—3 Matrix (Rank 2)

Matrix C (2ร—3, rank 2):

$$ C = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix} $$

Step 1: Compute RREF

$$ \text{RREF}(C) = \begin{pmatrix} 1 & 0 & -1 \\ 0 & 1 & 2 \end{pmatrix} $$

Step 2: Identify non-zero rows
Both rows are non-zero.

Step 3: Basis for Row Space

$$ \text{Basis} = \left\{ \begin{pmatrix} 1 & 0 & -1 \end{pmatrix},\; \begin{pmatrix} 0 & 1 & 2 \end{pmatrix} \right\} $$

Conclusion: The row space is a 2-dimensional plane in โ„ยณ. Despite having only 2 rows, it lives in 3-dimensional space.


Row Space vs Column Space

Property Row Space Column Space
Definition Span of row vectors Span of column vectors
Located in โ„โฟ (n = # of columns) โ„แต (m = # of rows)
Dimension rank(A) rank(A)
Basis from Non-zero rows of RREF Pivot columns of original A
Orthogonal complement Null(A) Null(Aแต€)

โœจ Key Insight: Although row space and column space live in different spaces (โ„โฟ vs โ„แต), they have the same dimension โ€” the rank of A!


The Fundamental Theorem of Linear Algebra

For an mร—n matrix A with rank r, the four fundamental subspaces satisfy:

In โ„โฟ (Domain)

  • Row(A) โ€” dimension r
  • Null(A) โ€” dimension n-r
  • Row(A) โŸ‚ Null(A) (orthogonal)
  • โ„โฟ = Row(A) โŠ• Null(A)

In โ„แต (Codomain)

  • Col(A) โ€” dimension r
  • Null(Aแต€) โ€” dimension m-r
  • Col(A) โŸ‚ Null(Aแต€) (orthogonal)
  • โ„แต = Col(A) โŠ• Null(Aแต€)
$$ \boxed{\text{Row}(A) \perp \text{Null}(A)} \quad \text{and} \quad \boxed{\text{Col}(A) \perp \text{Null}(A^T)} $$

๐Ÿ’ก Why this matters: Every vector in โ„โฟ can be uniquely decomposed into a row space component (which maps to something) and a null space component (which maps to zero).


Special Cases

โœ… Full Row Rank (rank = m)

  • Rows are linearly independent
  • Row space dimension = m
  • Null space dimension = n - m
  • A is surjective (onto)
  • Ax = b always has a solution

โœ… Full Column Rank (rank = n)

  • Columns are linearly independent
  • Row space dimension = n (if n โ‰ค m)
  • Null space = {0}
  • A is injective (one-to-one)
  • At most one solution to Ax = b

โŒ Zero Matrix (rank = 0)

  • All rows are zero
  • Row space = {0}
  • Null space = โ„โฟ
  • Completely degenerate

โŒ Singular Matrix (rank < n)

  • Row space dimension < n
  • Null space dimension > 0
  • Not invertible
  • Solutions may not exist or be unique

Real-World Applications

๐Ÿ“Š Machine Learning

  • Feature space analysis โ€” Row space contains all possible feature combinations
  • PCA โ€” Principal components span the row space
  • Dimensionality reduction โ€” Project onto row space

๐Ÿ”ง Engineering

  • Control theory โ€” Row space determines observable states
  • Signal processing โ€” Row space captures filter outputs
  • Structural analysis โ€” Force equilibrium equations

๐Ÿ“ˆ Statistics

  • Linear regression โ€” Predicted values lie in column space, but coefficients relate to row space of design matrix
  • ANOVA โ€” Row space of design matrix
  • Factor analysis โ€” Latent factors span row space

๐Ÿงฎ Numerical Analysis

  • Least squares โ€” Solution lies in row space
  • Regularization โ€” Penalizes components outside row space
  • Iterative methods โ€” Krylov subspaces relate to row space

Practice Problems

Beginner

  1. Find the dimension of the row space for a 3ร—5 matrix with rank 2.
  2. True or False: Row operations change the row space of a matrix.
  3. For A = [[1, 0, 0], [0, 0, 0]], find a basis for the row space.

Intermediate

  1. Find a basis for the row space of:
    $$ A = \begin{pmatrix} 1 & 1 & 1 \\ 2 & 2 & 2 \\ 3 & 4 & 5 \end{pmatrix} $$
  2. If A is 4ร—4 with rank 3, what is the dimension of Null(A)? What does this mean?
  3. Prove that Row(A) = Row(RREF(A)).

Advanced

  1. Show that Row(A) and Null(A) are orthogonal complements in โ„โฟ.
  2. If B is row-equivalent to A, what can you say about their row spaces?
  3. Find the row space and null space of A = [[1, 2], [2, 4], [3, 6]] and verify orthogonality.
Click to reveal solutions

1. dim(Row(A)) = rank = 2

2. False โ€” row operations preserve the row space

3. Basis = { (1,0,0) }

4. Basis = { (1,1,1), (0,1,2) }

5. dim(Null(A)) = 4 - 3 = 1 (one free variable, non-unique solutions)

6. Row operations are reversible, so they cannot change the span of rows

7. Every vector in Row(A) is perpendicular to every vector in Null(A) by definition

8. They have the same row space (since row operations preserve it)

9. Row space = span{(1,2)}, Null space = span{( -2,1 )}, dot product = -2 + 2 = 0 โœ“



Summary

Key Takeaways

  • Row space = span of all row vectors of A
  • Dimension = rank(A)
  • Basis = non-zero rows of RREF
  • Orthogonal complement = Null(A)
  • โ„โฟ = Row(A) โŠ• Null(A) (every vector decomposes uniquely)
  • Row operations preserve the row space
$$ \boxed{\text{Row}(A) = \text{Row}(\text{RREF}(A))} \qquad \boxed{\dim(\text{Row}(A)) = \text{rank}(A)} $$

๐Ÿ’ก Pro Tip: Use the Gaussian Elimination Calculator to find RREF, then take non-zero rows โ€” that's your row space basis!

Try It Yourself!

Use the calculator above to explore row spaces:

  1. Enter your matrix (any size up to 6ร—6)
  2. Click "Calculate" to see:
    • The RREF of your matrix
    • A basis for the row space (non-zero RREF rows)
    • The dimension (rank) of the row space
    • Step-by-step row reduction

๐Ÿ“ Try these examples:

  • Full rank (3ร—3): [[1,2,3],[4,5,6],[7,8,10]]
  • Rank deficient (3ร—3): [[1,2,3],[2,4,6],[3,6,9]]
  • Rectangular (2ร—4): [[1,2,3,4],[5,6,7,8]]

๐Ÿ’ก Remember: The row space lives in โ„โฟ (column space lives in โ„แต). Don't confuse them!