Basis Finder for Vector Spaces over Finite Fields: Advanced Linear Algebra

Basis Finder for Vector Spaces

Basis Finder for Vector Spaces

Input a set of vectors over a finite field $Z_p$. This tool computes the dimension, finds a basis, and visualizes the span in the 2D plane.

Prime number (e.g., 2, 3, 5, 7)

Length of each vector

Format: (x,y), (a,b)…

Theory: Vector Spaces over Finite Fields

Vector Spaces are fundamental structures in linear algebra. While students typically study vector spaces over the real numbers ($\mathbb{R}$), vector spaces can be defined over any Field, including Finite Fields like $Z_p$ (integers modulo a prime $p$).

A Basis of a vector space is a set of vectors that is both Linearly Independent and Spans the entire space. The number of vectors in a basis is called the Dimension of the space.

In a finite field $Z_p$, arithmetic is performed modulo $p$. For example, in $Z_5$, $3 + 4 = 7 \equiv 2 \pmod 5$. This leads to interesting geometric properties. A vector space $Z_p^n$ contains exactly $p^n$ distinct vectors. A subspace of dimension $k$ contains $p^k$ vectors.

To find a basis from a set of spanning vectors, we construct a matrix where the rows are the given vectors. We then perform Gaussian Elimination (using modular arithmetic inverses) to reduce the matrix to Row Reduced Echelon Form (RREF). The non-zero rows of the RREF form a basis for the row space (the subspace spanned by the inputs).

Frequently Asked Questions

What is Linear Independence?
A set of vectors $\{v_1, \dots, v_k\}$ is linearly independent if the only solution to the equation $c_1v_1 + \dots + c_kv_k = 0$ is the trivial solution where all scalars $c_i = 0$. If you can write one vector as a combination of the others, they are dependent.
Why do we use Modular Inverse in Gaussian Elimination?
In standard Gaussian elimination over real numbers, we divide by the pivot element (e.g., multiply by $1/a$). In modular arithmetic ($Z_p$), “division” corresponds to multiplying by the modular multiplicative inverse. For example, in $Z_5$, the inverse of 3 is 2 because $3 \times 2 = 6 \equiv 1 \pmod 5$.
How many bases does a space have?
A vector space has infinitely many bases (over infinite fields) or many finite bases (over finite fields), but every basis has the same number of elements (the dimension).

UNDERGRADUATE