<aside> <img src="/icons/list_gray.svg" alt="/icons/list_gray.svg" width="40px" />

목차

</aside>

Equal(=)


This is a simple and basic property of matrices.

$$

A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}

$$

$$

B = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}

$$

$$

A =B

$$

Practice with Python

A = np.array([[1,2,3],
              [4,5,6],
              [7,8,9]])
B = A

print(A)
print(B)

When executed, this code will output like that.

# A
[[1 2 3]
 [4 5 6]
 [7 8 9]]
 
# B
[[1 2 3]
 [4 5 6]
 [7 8 9]]

Add(+)


The Addition of two matrices $A$, $B$ is performed by adding corresponding elements.

$$ A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}

$$

$$ B = \begin{bmatrix} b_{11} & b_{12} & b_{13} \\ b_{21} & b_{22} & b_{23} \\ b_{31} & b_{32} & b_{33} \end{bmatrix}

$$

$$ A + B = \begin{bmatrix} a_{11} + b_{11} & a_{12} + b_{12} & a_{13} + b_{13} \\ a_{21} + b_{21} & a_{22} + b_{22} & a_{23} + b_{23} \\ a_{31} + b_{31} & a_{32} + b_{32} & a_{33} + b_{33} \end{bmatrix} $$

Practice with Python

A = np.array([[1,2,3],
              [4,5,6],
              [7,8,9]])
              
B = np.array([[4,2,3],
              [6,1,2], 
              [8,3,2]])

print(A+B)

When executed, this code will output like that.

# A + B
[[ 5  4  6]
 [10  6  8]
 [15 11 11]]

Subtrat(-)


Similar the addition, The subtration of two matrices $A$, $B$ is performed by subtracting corresponding elements.

$$ A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}

$$

$$ B = \begin{bmatrix} b_{11} & b_{12} & b_{13} \\ b_{21} & b_{22} & b_{23} \\ b_{31} & b_{32} & b_{33} \end{bmatrix}

$$

$$ A - B = \begin{bmatrix} a_{11} - b_{11} & a_{12} - b_{12} & a_{13} - b_{13} \\ a_{21} - b_{21} & a_{22} - b_{22} & a_{23} - b_{23} \\ a_{31} - b_{31} & a_{32} - b_{32} & a_{33} - b_{33} \end{bmatrix} $$

Practice with Python

A = np.array([[1,2,3],
              [4,5,6],
              [7,8,9]])

B = np.array([[4,2,3],
              [6,1,2],
              [8,3,2]])

print(A-B)

When executed, this code will output like that.

# A - B
[[-3  0  0]
 [-2  4  4]
 [-1  5  7]]

Scalar Multiply(*)


The multiplication of a scalar $c$ and matrix $A$ is performed by multiplying each elements of the matrix by the scalar $c$.

$$ A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}

$$

$$ c \cdot A = \begin{bmatrix} c \cdot a_{11} & c \cdot a_{12} & c \cdot a_{13} \\ c \cdot a_{21} & c \cdot a_{22} & c \cdot a_{23} \\ c \cdot a_{31} & c \cdot a_{32} & c \cdot a_{33} \end{bmatrix} $$

Practice with Python

A = np.array([[1,2,3],
              [4,5,6],
              [7,8,9]])

print(c*A)

When executed, this code will output like that.

[[10 20 30]
 [40 50 60]
 [70 80 90]]