{
  "id": "column-space",
  "title": "Column space",
  "lang": "en",
  "source_lang": "en",
  "summary": "The column space of a matrix is the vector subspace spanned by its columns, consisting of all outputs obtainable by multiplying the matrix by a vector.",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [
    "Column span",
    "Column range"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/column-space/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/column-space/",
      "json": "https://aiwiki.page/zh/column-space.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "In linear algebra, the column space of a matrix is the set of all linear combinations of its column vectors. For an \\(m\\times n\\) matrix \\(A\\) over a field \\(\\mathbb F\\), it is a linear subspace of \\(\\mathbb F^m\\), commonly denoted by \\(\\operatorname{Col}(A)\\). Equivalently, it is the set of all vectors \\(Ax\\) as \\(x\\) ranges over \\(\\mathbb F^n\\). The column space describes which outputs a matrix can produce and which right-hand sides make a linear system solvable."
    },
    {
      "heading": "Definition and interpretation",
      "text": "Write the columns of \\(A\\) as \\(a_1,\\ldots,a_n\\), so that\n\n\\[A=\\begin{bmatrix}a_1&a_2&\\cdots&a_n\\end{bmatrix}.\\]\n\nThen\n\n\\[\\operatorname{Col}(A) =\\operatorname{span}\\{a_1,\\ldots,a_n\\} =\\left\\{\\sum_{j=1}^{n}x_ja_j:x_j\\in\\mathbb F\\right\\}.\\]\n\nHere, \\(\\operatorname{span}\\) denotes the linear span. Since\n\n\\[Ax=x_1a_1+\\cdots+x_na_n,\\]\n\nthe same definition can be written as\n\n\\[\\operatorname{Col}(A)=\\{Ax:x\\in\\mathbb F^n\\}.\\]\n\nThe column space contains the zero vector and is closed under vector addition and scalar multiplication. These properties make it a vector space in its own right.\n\nThe matrix defines a linear map\n\n\\[T_A:\\mathbb F^n\\longrightarrow\\mathbb F^m, \\qquad T_A(x)=Ax.\\]\n\nIts column space is precisely the image of this map. The image is an intrinsic property of a linear map; its description as a column space arises after choosing bases and representing the map by a matrix.\n\nFor real matrices, the geometry is particularly direct. A column space of dimension one is a line through the origin; one of dimension two is a plane through the origin. The column space always lies in the space associated with the matrix’s rows: an \\(m\\times n\\) matrix has column space in \\(\\mathbb F^m\\), not generally in \\(\\mathbb F^n\\)."
    },
    {
      "heading": "Dimension, rank, and bases",
      "text": "The dimension of the column space is the rank of the matrix:\n\n\\[\\dim\\operatorname{Col}(A)=\\operatorname{rank}(A).\\]\n\nConsequently,\n\n\\[0\\leq\\operatorname{rank}(A)\\leq\\min(m,n).\\]\n\nAlthough all columns together span the column space, they need not form a basis. A basis can be obtained by selecting a maximal linearly independent subset of the columns.\n\nTwo important cases are:\n\n- Full column rank: \\(\\operatorname{rank}(A)=n\\). All columns are independent and form a basis of the column space. This requires \\(n\\leq m\\).\n- Full row rank: \\(\\operatorname{rank}(A)=m\\). The column space equals the entire codomain \\(\\mathbb F^m\\). This requires \\(m\\leq n\\).\n\nFor a square matrix, the column space is the entire ambient space exactly when an inverse exists.\n\nFinding a basis by elimination\n\nGaussian elimination identifies pivot columns in an echelon form of \\(A\\). The columns of the original matrix in those pivot positions form a basis for \\(\\operatorname{Col}(A)\\).\n\nThis distinction is essential: elementary row operations generally change the column space. If row reduction produces\n\n\\[R=EA,\\]\n\nwhere \\(E\\) is invertible, then\n\n\\[\\operatorname{Col}(R)=E\\operatorname{Col}(A).\\]\n\nThe spaces have equal dimensions, but need not be the same subspace. Row operations preserve the linear dependence relations among the columns, which is why pivot positions still identify a basis in the original matrix.\n\nBy contrast, multiplying on the right by an invertible \\(n\\times n\\) matrix \\(B\\) preserves the column space:\n\n\\[\\operatorname{Col}(AB)=\\operatorname{Col}(A).\\]\n\nSuch multiplication replaces the columns by invertible combinations of themselves without changing their span."
    },
    {
      "heading": "Example",
      "text": "Consider the real matrix\n\n\\[A= \\begin{bmatrix} 1&2&0\\\\ 0&0&1\\\\ 1&2&1 \\end{bmatrix}.\\]\n\nIts columns are\n\n\\[a_1=\\begin{bmatrix}1\\\\0\\\\1\\end{bmatrix}, \\qquad a_2=\\begin{bmatrix}2\\\\0\\\\2\\end{bmatrix}, \\qquad a_3=\\begin{bmatrix}0\\\\1\\\\1\\end{bmatrix}.\\]\n\nSince \\(a_2=2a_1\\), the second column adds no new direction. The first and third columns are independent, so\n\n\\[\\operatorname{Col}(A) = \\left\\{ \\begin{bmatrix}s\\\\t\\\\s+t\\end{bmatrix} :s,t\\in\\mathbb R \\right\\}.\\]\n\nThus the column space is the plane\n\n\\[z=x+y\\]\n\nin \\(\\mathbb R^3\\), and \\(A\\) has rank two.\n\nThe vector \\((1,2,3)^{\\mathsf T}\\) belongs to this plane, whereas \\((1,2,4)^{\\mathsf T}\\) does not. Consequently, \\(Ax=(1,2,3)^{\\mathsf T}\\) has a solution, but \\(Ax=(1,2,4)^{\\mathsf T}\\) has none."
    },
    {
      "heading": "Solvability and the null space",
      "text": "A system of linear equations\n\n\\[Ax=b\\]\n\nis consistent if and only if\n\n\\[b\\in\\operatorname{Col}(A).\\]\n\nEquivalently, adjoining \\(b\\) as an extra column does not increase the rank:\n\n\\[\\operatorname{rank}\\begin{bmatrix}A&b\\end{bmatrix} =\\operatorname{rank}(A).\\]\n\nThe column space determines which outputs are attainable. The null space,\n\n\\[\\ker(A)=\\{x\\in\\mathbb F^n:Ax=0\\},\\]\n\ndetermines whether different inputs produce the same output. If \\(x_0\\) is one solution of \\(Ax=b\\), every solution has the form\n\n\\[x=x_0+z,\\qquad z\\in\\ker(A).\\]\n\nA consistent system therefore has a unique solution exactly when the null space is \\(\\{0\\}\\).\n\nThese two spaces are related by the rank–nullity theorem:\n\n\\[\\dim\\operatorname{Col}(A)+\\dim\\ker(A)=n.\\]"
    },
    {
      "heading": "Orthogonality and least squares",
      "text": "Over \\(\\mathbb R\\) or \\(\\mathbb C\\), equipped with the standard inner product, the column space satisfies\n\n\\[\\operatorname{Col}(A)^\\perp=\\ker(A^*),\\]\n\nwhere \\({}^\\perp\\) denotes the orthogonal complement and \\(A^*\\) is the conjugate transpose. For real matrices, \\(A^*=A^{\\mathsf T}\\).\n\nIndeed, a vector \\(y\\) is orthogonal to every column of \\(A\\) exactly when \\(A^*y=0\\). Hence\n\n\\[\\mathbb F^m =\\operatorname{Col}(A)\\oplus\\ker(A^*).\\]\n\nThese orthogonality statements require an inner-product setting; the basic definition of column space does not.\n\nThis decomposition underlies least squares. If \\(b\\) does not belong to the column space, no exact solution exists, but the problem\n\n\\[\\min_x\\|Ax-b\\|_2\\]\n\nfinds the attainable output nearest to \\(b\\). The fitted vector\n\n\\[\\widehat b=A\\widehat x\\]\n\nis the orthogonal projection of \\(b\\) onto \\(\\operatorname{Col}(A)\\), and its residual satisfies\n\n\\[A^*(b-A\\widehat x)=0.\\]\n\nThe fitted vector is unique even when the coefficient vector \\(\\widehat x\\) is not.\n\nIf \\(A\\) has full column rank, the projection matrix is\n\n\\[P=A(A^*A)^{-1}A^*.\\]\n\nAlternatively, if the columns of \\(Q\\) form an orthonormal basis of the column space, then\n\n\\[P=QQ^*.\\]\n\nIn linear regression, the column space of the design matrix is the set of all possible fitted response vectors. Under ordinary least squares, different coefficient vectors can produce the same fit when the design matrix has dependent columns."
    },
    {
      "heading": "Numerical computation",
      "text": "In exact arithmetic, pivot columns determine a basis. With floating-point arithmetic, nearly dependent columns require more care: small perturbations can change the exact rank, so a numerical computation often identifies an effective column space using a tolerance.\n\nA QR decomposition, often with column pivoting, can provide an orthonormal basis for that effective space. The singular value decomposition\n\n\\[A=U\\Sigma V^*\\]\n\ngives another characterization: if \\(A\\) has exact rank \\(r\\), the left singular vectors corresponding to its \\(r\\) nonzero singular values form an orthonormal basis of \\(\\operatorname{Col}(A)\\).\n\nTreating sufficiently small singular values as zero yields an approximation to the column space rather than necessarily its exact algebraic value. The chosen tolerance depends on scale, arithmetic precision, and uncertainty in the matrix entries."
    }
  ],
  "links": [
    "linear-algebra",
    "matrix",
    "linear-combination",
    "field-mathematics",
    "linear-subspace",
    "linear-span",
    "vector-space",
    "linear-map",
    "image-linear-map",
    "dimension-vector-space",
    "matrix-rank",
    "basis-linear-algebra",
    "linear-independence",
    "inverse-matrix",
    "gaussian-elimination",
    "system-of-linear-equations",
    "null-space",
    "rank-nullity-theorem",
    "inner-product",
    "orthogonal-complement",
    "conjugate-transpose",
    "least-squares",
    "orthogonal-projection",
    "orthonormal-basis",
    "linear-regression",
    "ordinary-least-squares",
    "floating-point-arithmetic",
    "qr-decomposition",
    "singular-value-decomposition"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}