<jupyter_start><jupyter_text>Question 1. Create a Python code that displays a square matrix whose length is 5 (10 points)<jupyter_code>import numpy as np 
S = np.array ([[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5]]) 
print(S)<jupyter_output>[[1 2 3 4 5]
 [1 2 3 4 5]
 [1 2 3 4 5]
 [1 2 3 4 5]
 [1 2 3 4 5]]<jupyter_text>Question 2. Create a Python code that displays a square matrix whose elements below the principal diagonal are zero (10 points)<jupyter_code>import numpy as np
A = np.triu([[5,7,1,5,3],[1,4,2,9,4],[7,1,8,7,5],[6,8,2,4,2],[4,2,1,5,9]])
print(A)<jupyter_output>[[5 7 1 5 3]
 [0 4 2 9 4]
 [0 0 8 7 5]
 [0 0 0 4 2]
 [0 0 0 0 9]]<jupyter_text>Question 3. Create a Python code that displays a square matrix which is symmetrical (10 points)<jupyter_code>import numpy as np 
S = np.array([[1,2,3,4,5],[2,1,2,3,4],[3,2,1,2,3],[4,3,2,1,2],[5,4,3,2,1]])
print(S)<jupyter_output>[[1 2 3 4 5]
 [2 1 2 3 4]
 [3 2 1 2 3]
 [4 3 2 1 2]
 [5 4 3 2 1]]<jupyter_text>Question 4. What is the inverse of matrix C? Show your solution by python coding. (20 points)<jupyter_code>import numpy as np
C = np.array ([[1,2,3],
               [2,3,3],
               [3,4,-2]])
i = np.linalg.inv(C)
print(i)<jupyter_output>[[-3.6  3.2 -0.6]
 [ 2.6 -2.2  0.6]
 [-0.2  0.4 -0.2]]<jupyter_text>Question 5. What is the determinant of the given matrix in Question 4? Show your solution by python coding. (20 points)<jupyter_code>import numpy as np
C = np.array ([[1,2,3],
               [2,3,3],
               [3,4,-2]])
d = np.linalg.det(C)
print(int(d))
import numpy as np
eq = np.array([[5,4,1],
               [10,9,4],
               [10,13,15]])

const = np.array([[[3.4],
                   [8.8],
                   [19.2]]])
ro = np.linalg.inv(eq) @ const
print(ro)<jupyter_output>[[[0.2]
  [0.4]
  [0.8]]]
{'fraction_non_alphanumeric': 0.19449035812672177, 'fraction_numerical': 0.12617079889807162, 'mean_word_length': 3.184331797235023, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '642906', 'license': 'Apache-2.0', 'n_tokens_mistral': 913, 'n_tokens_neox': 814, 'n_words': 227, 'path': 'Mideterm_Exam.ipynb', 'repo_name': 'Matchuuuuu/Linear-Algebra-58019', 'size': '1815'}