Numpy Import

import numpy as np

Initialize matrix A and B

A = [[1, 2], [4,5]]
B = [[1,1], [0, 2]]

Show Matrix A

A
[[1, 2], [4, 5]]

Show Matrix B

B
[[1, 1], [0, 2]]

Convert Matrix A from List to Numpy Array

A_np = np.array(A)
A_np
array([[1, 2],
       [4, 5]])

Convert Matrix B from List to Numpy Array

B_np = np.array(B)
B_np
array([[1, 1],
       [0, 2]])

Initialize a 2 by 2 identity matrix

I = np.eye(2)

Show Matrix I

I
array([[1., 0.],
       [0., 1.]])

What happens when we multiply I*A ?

IA_np = I @ A_np
IA_np
array([[1., 2.],
       [4., 5.]])

What happens when we multiply A * I ?

A_npI = A_np @ I
A_npI
array([[1., 2.],
       [4., 5.]])