# Subspaces and the basis for a subspace

$$
\begin{aligned}
\text{Subspace }\mathbf{V} = span&\left(\vec{v\_1}, \vec{v\_2}, \cdots \vec{v\_n} \right)\\
&\begin{Bmatrix} \vec{v\_1}, \vec{v\_2}, \cdots \vec{v\_n} \end{Bmatrix} \text{ is linear independence} \\\\

\text{then}\\\\

\mathbf{S} &= \begin{Bmatrix} \vec{v\_1}, \vec{v\_2}, \cdots \vec{v\_n} \end{Bmatrix} \\
\mathbf{S} &\text{ is a } \bold{Basis}  \text{ for }\mathbf{V}
\end{aligned}
$$

* 若利用 **Minimum set of vectors** 來 span 該 subspace V
* 也就是 span subspace V 的向量都是 linear independence 時
* 這些向量的集合稱為該 Subspace 的 **Basis**

我們舉個例子 T

$$
\mathbf{T} = \begin{Bmatrix} \begin{bmatrix}1\0\end{bmatrix}, \begin{bmatrix}0\1\end{bmatrix} \end{Bmatrix}
$$

首先他可以 span R2 子空間

$$
\begin{aligned}
c\_1\begin{bmatrix} 1\0\end{bmatrix} + c\_2\begin{bmatrix} 0\1\end{bmatrix} &= \begin{bmatrix} x\_1\x\_2\end{bmatrix} \\

c\_1 + 0 = x\_1, c\_1 &= x\_1\\
0 + c\_2 = x\_2, c\_2 &= x\_2\\
\end{aligned}
$$

並且他為 linear independence

$$
\begin{aligned}
c\_1\begin{bmatrix} 1\0\end{bmatrix} + c\_2\begin{bmatrix} 0\1\end{bmatrix} &= \begin{bmatrix} 0\0\end{bmatrix} \\

c\_1 + 0 = 0, c\_1 &= 0\\
0 + c\_2 = 0, c\_2 &= 0\\
\end{aligned}
$$

所以 T 為 R2 的 basis (而且是 ***standard basis***)

而這些 vectors 所生成的任一個向量在 Subspace 中都是獨一無二的 :

$$
\begin{aligned}
\vec{a} &\in \mathbf{V}, \\
\vec{a} &= c\_1\vec{v\_1} + c\_2\vec{v\_2} + \cdots + c\_n\vec{v\_n} \\
\vec{a} &= d\_1\vec{v\_1} + d\_2\vec{v\_2} + \cdots + d\_n\vec{v\_n} \text{ (subtract)} \\

\vec{0} &= (c\_1-d\_1)\vec{v\_1}  + (c\_2-d\_2)\vec{v\_1}  + \cdots + (c\_n-d\_n)\vec{v\_n}
\end{aligned}
$$

因為相減還是在 subspace 裡面，並且滿足 basis (linear independent)，所以 :

$$
\begin{aligned}
c\_1 - d\_1 &= 0 \\
c\_2 - d\_2 &= 0 \\
c\_n - d\_n &= 0 \\
c\_n &= d\_n
\end{aligned}
$$

證明了生成的向量為唯一


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sejkai.gitbook.io/academic/linear-algebra/vectors-and-spaces/subspaces-and-basis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
