---
# System prepended metadata

title: LA Ch.1
tags: [必修, Linear Algebra, NTNU, CSIE]

---

---
title: LA Ch.1
---
# Linear Algebra <br> Ch.1 Matrices, Vectors and Systems of Linear Equations
NTNU 線性代數

##### [Back to Note Overview](https://reurl.cc/XXeYaE)
##### [Back to Elementary Linear Algebra](https://hackmd.io/@NTNUCSIE112/SytJZchNw)
{%hackmd @NTNUCSIE112/LA_mark %}
###### tags: `NTNU` `CSIE` `必修`  `Linear Algebra`

## PPT

<iframe src="https://drive.google.com/file/d/1weLVDvjgFfZs7O2DhqGxCHdBFWtbFsnx/preview" width="640" height="480"></iframe>


<!-- 這行到底是哪來的 -->
$R^{m + n}$ : R, m, n for real numbers, number of rows, number of columns, respectively
## Outline
- Gaussian elimination 高斯消去
- Generating sets and linear independence　
    - Information about the **existence（存在性）** and **uniqueness（獨立性）** of solutions of a system of linear equations

## 1.1 Matrices and Vectors
### Matrices
#### Definition
- 矩陣：是由一些係數組合排列而成的長方形陣列
- $M_{m\times n}$： $m\times n$ 大小的矩陣
- The scalar（純量） in the $i-th$ row and $j-th$ column is called the $(i,j)\text{ - entry}$ 
    第i列(直的)第j行(橫的)
- $A^T$：$(i,j)\text{ - entry}$ is the $(j,i)\text{ - entry}$ of $A$
- If $A,B \in M_{m\times n}$ , then $A=B$($A$ and $B$ are equal)$\leftrightarrow a_{ij}=b_{ij} ,\forall i=1,...,m , j=1,...,n$
#### submatrix(子矩陣)
A submatrix is obtained by deleting from a matrix entire rows and /or columns.
![](https://i.imgur.com/SabloRC.png)


### Vector

#### Definition
- vector：泛指下列兩種 vector
    - row vector：只有一個 row 的 matrix.
    e.g. \begin{bmatrix}1&2&3&4\end{bmatrix}

    - column vector：只有一個 column 的 matrix
    e.g. \begin{bmatrix}1\\2\\3\\4\end{bmatrix} or $\begin{bmatrix}1&2&3&4\end{bmatrix}^T$
- components：vector 裡面的元素
- $R^n$：利用 n 個實數來構成一個向量（$R^n = M_{n\times 1}$）<!-- the set of all column vector with n components -->
- arithmetic operation
    - vector addition
    - scalar multiplication

## 1.2 Linear combinations, Matrix-vector products, and special matrices
### Linear combinations
#### Definition
- Linear combinations: $c_1u_1 + c_2u_2 + ... +c_ku_k$ (vectors $u_1, u_2, ... , u_k$, scalars $c_1, c_2, ... , c_k$)
- Standard vectors of $R^n$: $$
    e_1 =   \begin{bmatrix}
                1 \\
                0 \\
                \vdots \\
                0
            \end{bmatrix}, 
    e_2 =   \begin{bmatrix}
               0 \\
               1 \\
               \vdots \\
               0
            \end{bmatrix}, 
    \dots,  
    e_n =   \begin{bmatrix}
               0 \\
               0 \\
               \vdots \\
               1
            \end{bmatrix}$$$$\rightarrow R^n \text{可以被 standard vectors 唯一表示}$$

> 如果向量 $u, v$ 是不平行的 $R^2$, 那麼任何 $R^2$ 是 $u,v$ 的一個 linear combination. **unique linear combination**
![](https://i.imgur.com/q6Xpzvd.png)

### Matrix-vector Product
#### Definition
- Let $A = Metrix_{m\times n}$ and $\text{v} = Vector_{n\times 1} \implies$ Matrix-vector Product: $A\text{v} = v_1a_1 + v_2a_2 + \dots + v_na_n$

### Special Matrixs
-  **Identity Matrix** ( 單位矩陣 ) [ $I_n \in M_{n\times n}$ ]
    $$\text{E.g. }I_3 = 
    \begin{bmatrix}
        1 & 0 & 0 \\
        0 & 1 & 0 \\
        0 & 0 & 1 
    \end{bmatrix}$$
- **Stochastic Matrix** [ $A \in M_{n\times n}$ 且每個 column 的總和是 unity ]
    $$
    \text{E.g.1 probability matrix: }A = 
    \begin{bmatrix}
        0.85 & 0.03 \\
        0.15 & 0.97 
    \end{bmatrix}\\
\\
    \text{E.g.2 rotation matrix: } A_{\theta} =
    \begin{bmatrix}
        cos\theta & -sin\theta \\
        sin\theta & cos\theta 
    \end{bmatrix}$$ 
    

## 1.3 Systems of Linear Equations
### Elementary row operations

- **Two systems of linear equations** that have exactly the **same solution set** are called ==等價 (equivalent)==
- A system of linear equations can be expressed as the matrix equation $Ax = b$ 
    - $A$ is called the 係數矩陣 (coefficients matrix or the matrix of coefficients)
    - $x$ is called the 變數矩陣 (variable matrix)
    - The matrix (of size $m\times (n+1)$) is called 增廣矩陣(augmented matrix).
    $\begin{bmatrix} A|b\end{bmatrix} = 
    \begin{bmatrix}a_{11} & a_{12} & \cdots & a_{1n} & b_1
     \\a_{21} & a_{22} & \cdots & a_{2n} & b_2
     \\\vdots & \vdots & \ddots & \vdots 
     \\ a_{m1} & a_{m2} & \cdots & a_{mn} & b_m\end{bmatrix}$
- A system of linear equations that has one or more solutions is called **consistent 有解**; otherwise, it is called **inconsistent 無解**.

#### Define
Any one of the following three operations performed on a matrix is called an elementary row operation:
1. Interchange: 交換兩個 matix 的 row
2. Scaling: 對某些 row 的元素乘上相同係數(非零)
3. Row addition: 將一條 row 乘上某係數後加到另一條 row 上
  
### Reduced Row Echelon Form 簡化成階梯形矩陣
簡單來說就是把它變成這樣
<!-- 下面這種好像不用加$$ 加了反而會爛掉 -->
\begin{bmatrix}
    1 & * & 0 & 0 & * \\
    0 & 0 & 1 & 0 & * \\
    0 & 0 & 0 & 1 & * \\
    0 & 0 & 0 & 0 & 0 \\
\end{bmatrix}

## 1.4 Gaussian Elimination 高斯消除
### Definition
1. pivot column: the leftmost nonzero column
2. pivot position: the 1st row of pivot column
#### The rank and nullity of a matrix
- Rank: The rank of an $m\times n$ matrix $A$, denoted by rank $A$, is defined to be **the number of nonzero rows** in the **reduced row echelon form** of $A$. 
    - The rank of a matrix equals the number of pivot columns in the matrix 
    - rank$A$ = the number of basic variables / the number of "useful" equation
- Nullity: The nullity of $A$ , denoted by nullity $A$, is defined to be $n$-rank $A$.
    - The nullity of a matrix equals the number of non-pivot columns in the matrix.($n$ - rank$A$)
    - Nullity$A$ = the number of free variables

@Eoleedi 求翻譯

## 1.5 The language of set
- Q: Is $R^2$ a subset of $R^3$?
- Ans: **No**
![](https://i.imgur.com/JyFynK9.png)

## 1.6 The span of a set of vectors

### Example
> Let $S_1 = \{
\begin{bmatrix}
    1 \\
    -1 \\
\end{bmatrix}
\}$, what is Span $S_1$?
>
>$\rightarrow$ Span $S_1$ = \{$c_1\begin{bmatrix}
    1 \\
    -1 \\
\end{bmatrix} | c_1 \in R$\}
### Theorem 1.6
The following statements about an $m \times n$ matrix $A$ are equivalent:
(a) The span of the columns of $A$ is $R^m$
(b) The equation $Ax = b$ has at least one solution(that is, $Ax = b$ is consistent) for each $b$ in $R^m$
(c\) The rank of $A$ is $m$, the number of rows of $A$
(d) The reduced row echelon form of $A$ has no zero rows
(e) There is a pivot position in each row of $A$


> Proof. (See in p.70-71)
(a) and (b) are equivalent(by Theorem 1.5)
(c\), (d), (e) are equivalent

### Theorem 1.7
扣除掉 vector $v$ 之後 Span $\{u_1, u_2, u_3, \dots, u_k, v\}$ = Span $\{u_1, u_2, u_3, \dots, u_k \}$
#### Proof that 
- $v \in SpanS$
- $v \notin SpanS$
## 1.7 Linear dependence and linear independence(L.D. & L.I.)


<!-- This is the end of the note -->

*[coefficients]:係數
*[constant term]:常數項