Shawn's blog Shawn's blog
About Me
  • Category
  • Tag
  • Archive
GitHub (opens new window)

Shawn Jin

I am not a creator of knowledge, I am just a porter of knowledge.
About Me
  • Category
  • Tag
  • Archive
GitHub (opens new window)
  • linear-algebra

    • Foundation of Matrix
      • Matrix
        • Adding
        • Multiplying
        • Identity Matrix
      • Inverse of a Matrix
      • Orthogonal Matrix
      • Transposing
      • References
  • statistic

  • data-mining

  • machine-learning

  • Data Science or Information Science
  • Data-Science
  • linear-algebra
Shawn Jin
2021-09-13

Foundation of Matrix

# Matrix

A matrix is an array of numbers. This below is a 3x2 matrix.

A=[a1a2a3a4a5a6]A= \left[ \begin{matrix} a_1 & a_2 \\ a_3 & a_4 \\ a_5 & a_6 \end{matrix} \right] A=⎣⎡​a1​a3​a5​​a2​a4​a6​​⎦⎤​

notes

A vector is a n*1 matrix.

# Adding

[a1a2a3a4a5a6]+[b1b2b3b4b5b6]=[a1+b1a2+b2a3+b3a4+b4a5+b5a6+b6]\left[ \begin{matrix} a_1 & a_2 \\ a_3 & a_4 \\ a_5 & a_6 \end{matrix} \right] + \left[ \begin{matrix} b_1 & b_2 \\ b_3 & b_4 \\ b_5 & b_6 \end{matrix} \right] = \left[ \begin{matrix} a_1+b_1 & a_2+b_2 \\ a_3+b_3 & a_4+b_4 \\ a_5+b_5 & a_6+b_6 \end{matrix} \right] ⎣⎡​a1​a3​a5​​a2​a4​a6​​⎦⎤​+⎣⎡​b1​b3​b5​​b2​b4​b6​​⎦⎤​=⎣⎡​a1​+b1​a3​+b3​a5​+b5​​a2​+b2​a4​+b4​a6​+b6​​⎦⎤​

::: notes note

The two matrices must be the same size

:::

# Multiplying

# To multiplying a single number

matrix multiplying

# To multiplying another matrix (dot product)

# Identity Matrix

Identity matrix is always "Square". It has 1s on the main diagonal and 0s everywhere else. Its symbol is the capital letter III.

Example: 3x3 identity matrix.

I=[100010001]I=\left[ \begin{matrix} 1 & 0 &0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{matrix} \right] I=⎣⎡​100​010​001​⎦⎤​

For matrix AAA and Identity matrix III.

A∗I=AI∗A=AA * I = A \\ I * A = A A∗I=AI∗A=A

Note

For matrix AAA and BBB.

AB≠BAAB \neq BA AB=BA

# Inverse of a Matrix

Just like a number has a reciprocal.

8→18A→A−18 \rightarrow \frac{1}{8} \\ A \rightarrow A^{-1} 8→81​A→A−1

We write A−1A^{-1}A−1 instead of 1A\frac{1}{A}A1​ because we don't divide by a matrix! The inverse of AAA is A−1A^{-1}A−1 only when:

AA−1=I=A−1AAA^{-1}=I=A^{-1}A AA−1=I=A−1A

# Orthogonal Matrix

Orthogonal Matrix is a real square matrix (opens new window) whose columns and rows are orthonormal (opens new window) vectors (opens new window). One way to express this is:

AA⊤=I=A⊤AAA^{\top}=I=A^{\top}A AA⊤=I=A⊤A

# Transposing

To "transpose" a matrix, swap the rows and columns.

We put a "T" in the top right-hand corner to mean transpose:

[a1a2a3a4a5a6]⊤=[a1a3a5a2a4a6]\left[ \begin{matrix} a_1 & a_2 \\ a_3 & a_4 \\ a_5 & a_6 \end{matrix} \right] ^\top = \left[ \begin{matrix} a_1 & a_3 & a_5 \\ a_2 & a_4 & a_6 \end{matrix} \right] ⎣⎡​a1​a3​a5​​a2​a4​a6​​⎦⎤​⊤=[a1​a2​​a3​a4​​a5​a6​​]

# References

Matrix Multiplying (opens new window)

Matrix (opens new window)

Inverse of a Matrix (opens new window)

深度学习和机器学习的线性代数入门 | 雷锋网 (leiphone.com) (opens new window)

#Linear Algebra
Updated: 2021/09/13, 23:29:33
Data Visualization

Data Visualization→

最近更新
01
Python import files from different directories
12-31
02
Classmethod in Python
09-15
03
Single/Double Star (/*) Parameters in Python
09-15
更多文章>
Theme by Vdoing | Copyright © 2019-2021 Shawn Jin | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式