[Linear Algebra] Linear System, Identity Matrix

Jason Lee·2022년 8월 4일
0

Linear Algebra

목록 보기
4/26

Linear System : Set of Equations

  • A system of linear equations (or a linear system) is a collection of one or more linear equations involving the same variables

Linear System Example

  • Suppose we have ((Feature A, B, C), y) dataset
Feature AFeature BFeature Clabel
2216
31014
13118
  • What we have to do is just solving the linear system below

2x1+2x2+1x3=62 x_1 + 2 x_2 + 1 x_3 = 6
3x1+1x2+0x3=143 x_1 + 1 x_2 + 0 x_3 = 14
1x1+3x2+1x3=181 x_1 + 3 x_2 + 1 x_3 = 18

  • The essential information of a linear system can be written compactly using a matrix like below

Ax=bA \textbf{x} = \textbf{b}

where A=[221310131]A = \begin{bmatrix} 2 & 2 & 1 \\ 3 & 1 & 0 \\ 1 & 3 & 1 \\ \end{bmatrix}, x=[x1x2x3]\textbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix}, b=[61418]\textbf{b} = \begin{bmatrix} 6 \\ 14 \\ 18 \end{bmatrix}

From Multiple Equations to Single Matrix Equation

2x1+2x2+1x3=62 x_1 + 2 x_2 + 1 x_3 = 6
3x1+1x2+0x3=143 x_1 + 1 x_2 + 0 x_3 = 14
1x1+3x2+1x3=181 x_1 + 3 x_2 + 1 x_3 = 18

[221310131][x1x2x3]=[61418]\begin{bmatrix} 2 & 2 & 1 \\ 3 & 1 & 0 \\ 1 & 3 & 1 \\ \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 6 \\ 14 \\ 18 \end{bmatrix}

Identity Matrix

  • Definition : an identity matrix is a square matrix whose diagonal entries are all 1's, and other entries are zeros

    • e.g. I3=[100010001]I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix}
  • Identity matrix InI_n preserves any vector xRn\textbf{x} \in \mathbb{R}^{n} after multiplying x\textbf{x} by InI_n

    • xRn\forall \textbf{x} \in \mathbb{R}^{n}, Inx=xI_n \textbf{x} = \textbf{x}
profile
AI Researcher

0개의 댓글