Go to the previous, next section.

Vector Spaces for Linear Algebra

A vector_space is a set of vectors such that (1) if we add any two vectors x and y in the space, their sum x+y is also in the space, and (2) if we multiply any vector x in the space by a scalar c, then cx is still in the space. The vector_space class is built using the matrix (see section Matrices for Linear Algebra) class and the fract_vector_list class (a list of fract_vectors). The vector space is represented either by a list independent vectors, or by the column vectors of the matrix. Only one of the two representations is stored at any given time. If the other representation is needed, then it is recalculated. The class also contains an integer space that corresponds to the dimension of vector space; that is, the maximum number of dimensions that this vector space could possibly span. All basis vectors in the fract_vector_list representation must have space elements. Alternatively, the matrix in the matrix representation must have space rows.

Go to the previous, next section.