# Matrix Spaces

There are two kinds of matrix spaces: one is defined by a set of matrices of special type (considered in section), and another is associated with every matrix. This section is devoted to the latter case.

We know from previous discussions that every real or complex *n*-dimensional vector space is isomorphic to ℝ^{n} or ℂ^{n}. This gives us the ground to consider linear transformations from one Euclidean Vector Space ℝ^{n} (or ℂ^{n}) into another one ℝ^{m} (or ℂ^{m}) instead of general finite dimensional vector spaces. Every linear transformation *T*: *V* ↦ *W* from one *n*-dimensional vectors space *V* into another *m*-dimensional vector space *W* is equivalent to a corresponding matrix transformation **x** ↦ **Ax** for some *m*×*n* matrix **A** for appropriate chosen bases. The inverse statement is obviously true because multiplication by a matrix defines a linear transformation.

Let **A** be an *m*-by-*n* matrix that maps \( \mathbb{R}^n \) into
\( \mathbb{R}^m . \) So for every (colomn) vector
\( {\bf x} = \left[ x_1 , x_2 , \ldots , x_n \right]^{\mathrm{T}} \)
corresponds a vector \( {\bf A}\,{\bf x} \in \mathbb{R}^m . \)

Let *V* and *U* be vector spaces and
\( T:\,U \to V \) be linear transformation. Then the set of all vectors
of the form \( {\bf y} = {\bf A}\,{\bf x} \in V \)
is called the **range** (or image) of *T*.

**Theorem:** Let *V* and *U* be vector spaces and
\( T:\,U \to V \) be linear transformation. Then the range of
*T* is a subspace of *V*.

**0**

_{U}and

**0**

_{V}to denote the zero vectors of

*U*and

*V*, respectively. We also denote by

*R(T)*the range of linear transformation

*T*.

Because \( T\left( **0**_{U} \right) = **0**_{V}, \)
we have that \( **0**_{V} \in R(T) . \) Now let us choose two vectors
\( {\bf x}, \, {\bf y} \in R(T) \) from the range and a scalar *k*.
Then there exist two vectors **u** and **v** such that
\( T({\bf u}) = {\bf x} \) and \( T({\bf v}) = {\bf y} . \)
Hence, \( T({\bf u} + {\bf v}) = T({\bf u}) + T({\bf v}) = {\bf x} + {\bf y} \) and
\( T(k{\bf u}) = k\, T({\bf u}) = k\, {\bf x} . \) Thus,
\( T({\bf u} + {\bf v}) = T({\bf u}) + T({\bf v}) = {\bf x} + {\bf y} \in R(T) \) and \( T(k\,{\bf u}) = k \, T({\bf x}) = k\,{\bf x} \in R(T) , \) so *R(T)* is a subspace of *V*.

Recall that a set of vectors β is said to generate or span a vector space *V* if every element from
*V* can be represented as a linear combination of vectors from β.

*n*-dimensional real space, and it is called the

**standard basis**. Its dimension is

*n*.

*i*-th row and

*j*-th column. Then the set \( {\bf M}_{i,j} \ : \ 1 \le i \le m , \ 1 \le j \le n \) is a basis for the set of all such real matrices. Its dimension is

*mn*.

*n*. It has dimension

*n*+1. ■

Theorem: Let *V* be a vector space and
\( \beta = \left\{ {\bf u}_1 , {\bf u}_2 , \ldots , {\bf u}_n \right\} \) be a subset of
*V*. Then β is a basis for *V* if and only if each vector *v* in *V* can be uniquely
decomposed into a linear combination of vectors in β, that is, can be uniquely expressed in the form

If the vectors \( \left\{ {\bf u}_1 , {\bf u}_2 , \ldots , {\bf u}_n \right\} \)
form a basis for a vector space *V*, then every vector in *V* can be uniquely expressed in the form

**v**determines a unqiue

*n*-tuple of scalars \( \left[ \alpha_1 , \alpha_2 , \ldots , \alpha_n \right] \) and, conversely, each

*n*-tuple of scalars determines a unique vector \( {\bf v} \in V \) by using the entries of the

*n*-tuple as the coefficients of a linear combination of \( {\bf u}_1 , {\bf u}_2 , \ldots , {\bf u}_n . \) This fact suggests that

*V*is like the

*n*-dimensional vector space \( \mathbb{R}^n , \) where

*n*is the number of vectors in the basis for

*V*.

Theorem: Let *S* be a linearly independent subset of a vector space *V*,
and let **v** be an element of *V* that is not in *S*. Then
\( S \cup \{ {\bf v} \} \) is linearly dependent if and only if **v**
belongs to the span of the set *S*.

Theorem: If a vector space *V* is generated by a finite set *S*, then
some subset of *S* is a basis for *V* ■

A vector space is called **finite-dimensional** if it has a basis consisting of a finite

number of elements. The unique number of elements in each basis for *V* is called

the **dimension** of *V* and is denoted by dim(*V*). A vector space that is not finite-

dimensional is called
**infinite-dimensional**.

The next example demonstrates how *Mathematica* can determine the basis or set of linearly independent
vectors from the given set. Note that basis is not unique and even changing the order of vectors, a software can provide
you another set of linearly independent vectors.

```
MatrixRank[m =
{{1, 2, 0, -3, 1, 0},
{1, 2, 2, -3, 1, 2},
{1, 2, 1, -3, 1, 1},
{3, 6, 1, -9, 4, 3}}]
```

Then each of the following scripts determine a subset of linearly independent vectors:

```
m[[ Flatten[ Position[#, Except[0, _?NumericQ], 1, 1]& /@
```

Last @ QRDecomposition @ Transpose @ m ] ]]

or, using subroutine

```
MinimalSublist[x_List] :=
```

Module[{tm, ntm, ytm, mm = x}, {tm = RowReduce[mm] // Transpose,

ntm = MapIndexed[{#1, #2, Total[#1]} &, tm, {1}],

ytm = Cases[ntm, {___, ___, d_ /; d == 1}]};

Cases[ytm, {b_, {a_}, c_} :> mm[[All, a]]] // Transpose]

we apply it to our set of vectors.
```
m1 = {{1, 2, 0, -3, 1, 0}, {1, 2, 1, -3, 1, 2}, {1, 2, 0, -3, 2,
1}, {3, 6, 1, -9, 4, 3}};
```

MinimalSublist[m1]

`{{1, 1, 1, 3}, {0, 1, 0, 1}, {1, 1, 2, 4}}`

One can use also the standard *Mathematica*command:

**IndependenceTest**. ■