# Section 4.6 $\quad$ Basis and Dimension (continued)

## Definition of Dimension

>The **dimension** of a nonzero vector space $V$ is <br /><br /><br /><br />

### Example 1

What is the dimension of the following vector spaces
- $P_2$<br /><br /><br /><br />
- $M_{23}$<br /><br /><br /><br />
- $M_{mn}$<br /><br /><br /><br />
- V = span $\left\{\left[\begin{array}{c} 1 \\ 0 \\ 1 \\ \end{array} \right], \left[\begin{array}{c} 0 \\ 1 \\ 1 \\ \end{array} \right], \left[\begin{array}{c} 2 \\ 1 \\ 3 \\ \end{array} \right]\right\}$ <br /><br /><br /><br />
- the subspace of $M_{33}$ consisting of all diagonal matrices<br /><br /><br /><br />

## Maximal Independent Subset and Minimal Spanning Set

Let $S$ be a set of vectors in $V$. A subset $T$ of $S$ is called a **maximal independent subset** of $S$ if<br /><br /><br /><br />

If $W$ is a set of vectors spanning $V$, then $W$ is called a **minimal spanning set** for $V$ if<br /><br /><br /><br />

### Example 2

Let $S = \{\mathbf{v}_1, \mathbf{v}_2, \mathbf{v}_3, \mathbf{v}_4\}$, where
\begin{equation*}
  \mathbf{v}_1 = \left[\begin{array}{c} 1 \\ 0 \\ 0 \\ \end{array} \right],~~~
  \mathbf{v}_2 = \left[\begin{array}{c} 0 \\ 1 \\ 0 \\ \end{array} \right],~~~
  \mathbf{v}_3 = \left[\begin{array}{c} 0 \\ 0 \\ 1 \\ \end{array} \right],~~~
  \mathbf{v}_4 = \left[\begin{array}{c} 1 \\ 1 \\ 1 \\ \end{array} \right],~~~
\end{equation*}
Find the maximal independent subsets of $S$


```python
from sympy import *

A = Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]);
B = Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1], [1, 1, 1]]);

A.rank(), B.rank()
```




    (3, 3)



### Example 3

Let $V$ be a vector space has dimension $n$.
- a maximal independent subset of $V$ contains $\underline{\hspace{1in}}$ vectors.
- a minimal spanning set for $V$ contains $\underline{\hspace{1in}}$ vectors.
- any subset of $m>n$ vectors must be $\underline{\hspace{2in}}$.
- any subset of $m<n$ vectors cannot $\underline{\hspace{2in}}$.

>**Theorem** If $S$ is linearly independent set of vectors in $V$, then<br /><br /><br /><br />

### Example 4

Find a basis for $\mathbb{R}^4$ that contains the vectors
\begin{equation*}
  \mathbf{v}_1 = [1~~ 0~~1~~0],~~~~~~  \mathbf{v}_2 = [-1~~ 1~~-1~~0]
\end{equation*}


```python
from sympy import *

A = Matrix([[1, 0, 1, 0], [-1, 1, -1, 0], [1, 0, 0, 0], [0, 0, 0, 1]]);

A.rank()
```




    4



>**Theorem** Let $V$ be an n-dimensional vector space.
- <br /><br />
- <br /><br />

b38b6344caf29e62add4fe89a0d461ebeaad6218
ipynb
Jupyter Notebook
Jupyter_Notes/Lecture21_Sec4-6_BasisDimensionPart2.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Jupyter_Notes/Lecture21_Sec4-6_BasisDimensionPart2.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Jupyter_Notes/Lecture21_Sec4-6_BasisDimensionPart2.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Qwen/Qwen-72B
1. YES
2. YES