A set of vectors in a vector space V is called a basis, or a set of basis vectors, if the vectors are linearly independent and every other vector in the vector space is linearly dependent on these vectors.[1] In more general terms, a basis is a linearly independent spanning set.

Given a basis of a vector space V, every element of V can be expressed uniquely as a linear combination of basis vectors, whose coefficients are referred to as vector coordinates or components. A vector space can have several distinct sets of basis vectors; however each such set has the same number of elements, with this number being the dimension of the vector space.

This picture illustrates the standard basis in R2. The blue and orange vectors are the elements of the basis; the green vector can be given in terms of the basis vectors, and so is linearly dependent upon them.

In more detail, suppose that B = { v1, …, vn } is a finite subset of a vector space V over a fieldF (such as the real or complex numbersR or C). Then B is a basis if it satisfies the following conditions:

for every x in V it is possible to choose a1, …, an ∈ F such that x = a1v1 + … + anvn.

The numbers ai are called the coordinates of the vector x with respect to the basis B, and by the first property they are uniquely determined.

A vector space that has a finite basis is called finite-dimensional. To deal with infinite-dimensional spaces, we must generalize the above definition to include infinite basis sets. We therefore say that a set (finite or infinite) B ⊂ V is a basis, if

for every x in V it is possible to choose a1, …, an ∈ F and v1, …, vn ∈ B such that x = a1v1 + … + anvn.

The sums in the above definition are all finite because without additional structure the axioms of a vector space do not permit us to meaningfully speak about an infinite sum of vectors. Settings that permit infinite linear combinations allow alternative definitions of the basis concept: see Related notions below.

Basis defined by Euler angles - The xyz (fixed) system is shown in blue, the XYZ (rotated) system is shown in red. The line of nodes, labeled N, is shown in green.

There are several ways to describe a basis for the space. Some are made ad hoc for a specific dimension. For example, there are several ways to give a basis in dim 3, like Euler angles.

The general case is to give a matrix with the components of the new basis vectors in columns. This is also the more general method because it can express any possible set of vectors even if it is not a basis. This matrix can be seen as three things:

Basis Matrix: Is a matrix that represents the basis, because its columns are the components of vectors of the basis. This matrix represents any vector of the new basis as linear combination of the current basis.

Rotation operator: When orthonormal bases are used, any other orthonormal basis can be defined by a rotation matrix. This matrix represents the rotation operator that rotates the vectors of the basis to the new one. It is exactly the same matrix as before because the rotation matrix multiplied by the identity matrix I has to be the new basis matrix.

Change of basis matrix: This matrix can be used to change different objects of the space to the new basis. Therefore is called "change of basis" matrix. It is important to note that some objects change their components with this matrix and some others, like vectors, with its inverse.

Again, B denotes a subset of a vector space V. Then, B is a basis if and only if any of the following equivalent conditions are met:

B is a minimal generating set of V, i.e., it is a generating set and no proper subset of B is also a generating set.

B is a maximal set of linearly independent vectors, i.e., it is a linearly independent set but no other linearly independent set contains it as a proper subset.

Every vector in V can be expressed as a linear combination of vectors in B in a unique way. If the basis is ordered (see Ordered bases and coordinates below) then the coefficients in this linear combination provide coordinates of the vector relative to the basis.

Also many vector sets can be attributed a standard basis which comprises both spanning and linearly independent vectors.

Standard bases for example:

In Rn {E1,...,En} where En is the n-th column of the identity matrix which consists of all ones in the main diagonal and zeros everywhere else. This is because the columns of the identity matrix are linearly independent can always span a vector set by expressing it as a linear combination.

In P2 where P2 is the set of all polynomials of degree at most 2 {1,x,x2} is the standard basis.

In M22 {M1,1,M1,2,M2,1,M2,2} where M22 is the set of all 2×2 matrices. and Mm,n is the 2×2 matrix with a 1 in the m,n position and zeros everywhere else. This again is a standard basis since it is linearly independent and spanning.

Consider R2, the vector space of all coordinates (a, b) where both a and b are real numbers. Then a very natural and simple basis is simply the vectors e1 = (1,0) and e2 = (0,1): suppose that v = (a, b) is a vector in R2, then v = a (1,0) + b (0,1). But any two linearly independent vectors, like (1,1) and (−1,2), will also form a basis of R2.

More generally, the vectors e1, e2, ..., en are linearly independent and generate Rn. Therefore, they form a basis for Rn and the dimension of Rn is n. This basis is called the standard basis.

Let V be the real vector space generated by the functions et and e2t. These two functions are linearly independent, so they form a basis for V.

Let R[x] denote the vector space of real polynomials; then (1, x, x2, ...) is a basis of R[x]. The dimension of R[x] is therefore equal to aleph-0.

Let S be a subset of a vector space V. To extend S to a basis means to find a basis B that contains S as a subset. This can be done if and only if S is linearly independent. Almost always, there is more than one such B, except in rather special circumstances (i.e. S is already a basis, or S is empty and V has two elements).

A similar question is when does a subset S contain a basis. This occurs if and only if S spans V. In this case, S will usually contain several different bases.

Since (−1,2) is clearly not a multiple of (1,1) and since (1,1) is not the zero vector, these two vectors are linearly independent. Since the dimension of R2 is 2, the two vectors already form a basis of R2 without needing any extension.

A basis is just a linearly independent set of vectors with or without a given ordering. For many purposes it is convenient to work with an ordered basis. For example, when working with a coordinate representation of a vector it is customary to speak of the "first" or "second" coordinate, which makes sense only if an ordering is specified for the basis. For finite-dimensional vector spaces one typically indexes a basis {vi} by the first n integers. An ordered basis is also called a frame.

The maps sending a vector v to the components aj(v) are linear maps from V to F, because of φ−1 is linear. Hence they are linear functionals. They form a basis for the dual space of V, called the dual basis.

In the context of infinite-dimensional vector spaces over the real or complex numbers, the term Hamel basis (named after Georg Hamel) or algebraic basis can be used to refer to a basis as defined in this article. This is to make a distinction with other notions of "basis" that exist when infinite-dimensional vector spaces are endowed with extra structure. The most important alternatives are orthogonal bases on Hilbert spaces, Schauder bases and Markushevich bases on normed linear spaces. The term Hamel basis is also commonly used to mean a basis for the real numbers R as a vector space over the field Q of rational numbers. (In this case, the dimension of R over Q is uncountable, specifically the continuum, the cardinal number 2ℵ0.)

The common feature of the other notions is that they permit the taking of infinite linear combinations of the basic vectors in order to generate the space. This, of course, requires that infinite sums are meaningfully defined on these spaces, as is the case for topological vector spaces – a large class of vector spaces including e.g. Hilbert spaces, Banach spaces or Fréchet spaces.

The preference of other types of bases for infinite-dimensional spaces is justified by the fact that the Hamel basis becomes "too big" in Banach spaces: If X is an infinite-dimensional normed vector space which is complete (i.e. X is a Banach space), then any Hamel basis of X is necessarily uncountable. This is a consequence of the Baire category theorem. The completeness as well as infinite dimension are crucial assumptions in the previous claim. Indeed, finite-dimensional spaces have by definition finite bases and there are infinite-dimensional (non-complete) normed spaces which have countable Hamel bases. Consider , the space of the sequences of real numbers which have only finitely many non-zero elements, with the norm Its standard basis, consisting of the sequences having only one non-zero element, which is equal to 1, is a countable Hamel basis.

In the study of Fourier series, one learns that the functions {1} ∪ { sin(nx), cos(nx) : n = 1, 2, 3, ... } are an "orthogonal basis" of the (real or complex) vector space of all (real or complex valued) functions on the interval [0, 2π] that are square-integrable on this interval, i.e., functions f satisfying

The functions {1} ∪ { sin(nx), cos(nx) : n = 1, 2, 3, ... } are linearly independent, and every function f that is square-integrable on [0, 2π] is an "infinite linear combination" of them, in the sense that

for suitable (real or complex) coefficients ak, bk. But most square-integrable functions cannot be represented as finite linear combinations of these basis functions, which therefore do not comprise a Hamel basis. Every Hamel basis of this space is much bigger than this merely countably infinite set of functions. Hamel bases of spaces of this kind are typically not useful, whereas orthonormal bases of these spaces are essential in Fourier analysis.

Let V be any vector space over some field F. Every vector space must contain at least one element: the zero vector 0.

Note that if V = {0}, then the empty set is a basis for V. Now we consider the case where V contains at least one nonzero element, say v.

Define the set X as all linear independent subsets of V. Note that since V contains the nonzero element v, the singleton subset L = {v} of V is necessarily linearly independent.

Hence the set X contains at least the subset L = {v}, and so X is nonempty.

We let X be partially ordered by inclusion: If L1 and L2 belong to X, we say that L1 ≤ L2 when L1 ⊂ L2. It is easy to check that (X, ≤) satisfies the definition of a partially ordered set.

We now note that if Y is a subset of X that is totally ordered by ≤, then the union LY of all the elements of Y (which are themselves certain subsets of V) is an upper bound for Y. To show this, it is necessary to verify both that a) LY belongs to X, and that b) every element L of Y satisfies L ≤ LY. Both a) and b) are easy to check.

Now we apply Zorn's lemma, which asserts that because X is nonempty, and every totally ordered subset of the partially ordered set (X, ≤) has an upper bound, it follows that X has a maximal element. (In other words, there exists some element Lmax of X satisfying the condition that whenever Lmax ≤ L for some element L of X, then L = Lmax.)

Finally we claim that Lmax is a basis for V. Since Lmax belongs to X, we already know that Lmax is a linearly independent subset of V.

Now suppose Lmax does not span V. Then there exists some vector w of V that cannot be expressed as a linearly combination of elements of Lmax (with coefficients in the field F). Note that such a vector w cannot be an element of Lmax.

Now consider the subset Lw of V defined by Lw = Lmax ∪ {w}. It is easy to see that a) Lmax ≤ Lw (since Lmax is a subset of Lw), and that b) Lmax ≠ Lw (because Lw contains the vector w that is not contained in Lmax).

But the combination of a) and b) above contradict the fact that Lmax is a maximal element of X, which we have already proved. This contradiction shows that the assumption that Lmax does not span V was not true.

Hence Lmaxdoes span V. Since we also know that Lmax is linearly independent over the field F, this verifies that Lmax is a basis for V. Which proves that the arbitrary vector space V has a basis.

Note: This proof relies on Zorn's lemma, which is logically equivalent to the Axiom of Choice. It turns out that, conversely, the assumption that every vector space has a basis can be used to prove the Axiom of Choice. Thus the two assertions are logically equivalent.