<jupyter_start><jupyter_text>Activity 1Prove and implement the remaining 6 matrix multiplication properties. You may create your own matrices in which their shapes should not be lower than  (3,3) . In your methodology, create individual flowcharts for each property and discuss the property you would then present your proofs or validity of your implementation in the results section by comparing your result to present functions from NumPy.<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

A = np.array([
    [-1,3,0,13],
    [2,4,-5,7],
    [5,3,10,1],
    [1,5,0,9]
])
B = np.array([
    [-9,11,21,2],
    [1,6,-2,8],
    [9,18,-9,0],
    [2,6,1,0]
])
C = np.array([
    [1,0,0,2],
    [4,1,9,8],
    [17,3,1,-4],
    [3,7,2,1]
])
print( A.shape)
print( B.shape)
print( C.shape)<jupyter_output>(4, 4)
(4, 4)
(4, 4)<jupyter_text>First Property: $A \cdot B \neq B \cdot A$<jupyter_code>np.dot(A,B)
np.dot(B,A)
np.array_equal(A,B)
np.array_equiv(A,B)<jupyter_output><empty_output><jupyter_text>Second Property: $A \cdot (B \cdot C) = (A \cdot B) \cdot C$<jupyter_code>D = A @ (B @ C)
D
E = (A @ B) @ C
E
np.array_equal(D,E)
np.array_equiv(D,E)<jupyter_output><empty_output><jupyter_text>Third Property: $A\cdot(B+C) = A\cdot B + A\cdot C$<jupyter_code>F = A @ (B+C)
F
G = (A @ B) + (A @ C)
G
np.array_equal(F,G)
np.array_equiv(F,G)<jupyter_output><empty_output><jupyter_text>Fourth Property: $(B+C)\cdot A = B\cdot A + C\cdot A$<jupyter_code>H = (B + C) @ A
H
J = (B @ A) + (C @ A)
J
np.array_equal(H,J)
np.array_equiv(H,J)<jupyter_output><empty_output><jupyter_text>Fifth Property: $A\cdot I = A$<jupyter_code>I = np.array([
    [1,0,0,0],
    [0,1,0,0],
    [0,0,1,0],
    [0,0,0,1]
])
np.dot(A,I)
np.dot(B,I)
np.dot(C,I)
np.array_equal(A,I)
np.array_equal(B,I)
np.array_equal(C,I)
np.array_equiv(A,I)
np.array_equiv(B,I)
np.array_equiv(C,I)<jupyter_output><empty_output><jupyter_text>Sixth Property: $A\cdot \emptyset = \emptyset$<jupyter_code>O = np.array([
    [0,0,0,0],
    [0,0,0,0],
    [0,0,0,0],
    [0,0,0,0]
])
np.dot(A,O)
np.dot(B,O)
np.dot(C,O)
np.array_equal(A,O)
np.array_equal(B,O )
np.array_equal(C,O)
np.array_equiv(A,O)
np.array_equiv(B,O)
np.array_equiv(C,O)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1933184855233853, 'fraction_numerical': 0.042761692650334075, 'mean_word_length': 4.773778920308484, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '480882', 'license': 'Apache-2.0', 'n_tokens_mistral': 1091, 'n_tokens_neox': 1060, 'n_words': 206, 'path': 'Assignment6_Besanes.ipynb', 'repo_name': 'bmraffa/Linear-Algebra-1', 'size': '2245'}