# Free and Basic Variables of a Matrix - Examples with Solutions

## Free and Basic Variables of a Matrix Representing a System of Equations

__Definition__For a system of equations in row echelon form , which of course may be represented by the augmented matrix, a variable whose coefficient is a leading 1 ( pivot ) is called a basic variable and a varibale without pivot is called a free variable. Let us consider the following system of equations in row echelon form

\( \quad \quad \begin{align*} x_1 + 2x_2 - x_3 + x_4 - 3 x_5 = 0 \\ x_3 - 2 x_5 = 0 \\ x_4 - x_5 = 0 \end{align*} \)

The augmented matrix in row echelon of the above system is as follows

\(\quad \quad \begin{bmatrix} \color{red}{1} & 2 & - 1 & 1 & -3 & 0\\ 0 & 0 & \color{red}{1} & 0 & -2 & 0\\ 0 & 0 & 0 & \color{red}{1} & -1 & 0 \end{bmatrix} \)

According fo the above definition

\( \quad \quad x_1, x_3 \) and \( x_4 \) are the basic variables and \( x_2 \) and \(x_5 \) are the free variables.

When we solve the above system, we express the basic variables in terms of the free variables

The third equation in the system gives

\( \quad \quad x_4 = x_5 \)

The second equation gives

\( \quad \quad x_3 = 2 x_5 \)

The first equation gives

\( \quad \quad x_1 = - 2 x_2 + x_3 - x_4 + 3 x_5 \)

Substitute the basic variables on the right

\( \quad \quad x_1 = - 2 x_2 + 2 x_5 - x_5 + 3 x_5 \)

Simplify

\( \quad \quad x_1 = - 2 x_2 + 4 x_5 \)

The solution is written as

\( \quad \quad x_1 = - 2 x_2 + 4 x_5 \)

\( \quad \quad x_3 = 2 x_5 \)

\( \quad \quad x_4 = x_5 \)

where \( x_2 \) and \( x_5 \) can be any real numbers hence their names as "free variables".

__Definition__The use of free variables helps us to write an explicit formula for the solutions of our system.

## Questions with Solution

For each of the following__augmented__matrices in row echelon form, which are basic variables and which are free variables?

- \(\begin{bmatrix} 1 & 4 & 3 & 0 & 0\\ 0 & 0 & 1 & -3 & 1\\ 0 & 0 & 0 & 0 & 0 \\ \end{bmatrix} \)
- \(\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ \end{bmatrix} \)
- \(\begin{bmatrix} 1 & 2 & 0 & -1 & -2 & 0\\ 0 & 1 & 1 & 0 & 3 & 0\\ 0 & 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \end{bmatrix} \)
- \(\begin{bmatrix} 1 & 2 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0\\ \end{bmatrix} \)

__Solutions to the Above Questions__

Being augmented matrices, the number of variables is equal to the number of columns of the given matrix -1.

For examples, for a matrix of 5 columns, the number of variables is 5 - 1 = 4, named as \( x_1 \), \( x_2 \), \( x_3 \) and \( x_4 \).

- Matrix 1 is has two pivots and 4 variables.

The first pivot at row 1 column 1; hence \(x_1\) is a basic variable.

The second pivot is at row 2 column 3; hence \( x_3 \) is also a basic variable.

The remaining variables: \( x_2 \) and \(x_4\) are free variables.

- Matrix 2 is has two Pivots and 2 variables.

The first pivot is at row 1 column 1; hence hence \(x_1\) is a basic variable.

The second pivot is at row 2 column 2; hence \(x_2\) is a basic variable.

There are no free variables.

- Matrix 3 has 3 pivots and 5 variables.

The first pivot at row 1 column 1; hence \(x_1\) is a basic variable.

The second pivot is at row 2 column 2; hence \( x_2 \) is a basic variable.

The third pivot is at row 3 column 4; hence \( x_4 \) is a basic variable.

The remaining variables: \( x_3 \) and \(x_5\) are free variables.

- Matrix 4 has two Pivots and 3 variables.

The first pivot is at row 1 column 1; hence hence \(x_1\) is a basic variable.

The second pivot is at row 2 column 3; hence \(x_3\) is a basic variable.

The remaining variables: \( x_2\) is a free variables.