<jupyter_start><jupyter_text>Final Exam<jupyter_code>import numpy as np
# Problem 1. Student A, Student B, and Student C have a total of Php 89 cash in their banks. Student A has 6 less than Student C. 
# Student B has 3 times what Student C has. How much does each student have? (30 points)
# A + B + C = 89
# A = C - 6
# B = 3C

A = np.array([[1,1,1],[1,0,4],[0,0,5]])
B = np.array([[89],[89],[95]])
x = np.linalg.inv(A).dot(B)
print("Student's money as follow (A,B,C): \n", x)

A = np.array([[3,-1,1],[9,-3,3],[-12,4,-4]])
print (A, "\n")
B = np.array([[5],[15],[-20]])
print (B, "\n")

#NOTE: If the determinant of a matrix is zero, then the linear system of equations it represents has no solution

#CHECKING OF THE GIVEN MATRIX IF SINGULAR OR NON SINGULAR
if (np.linalg.det(A)):
    print("Non Singular matrix")
    print ("determinant: ", np.linalg.det(A))
else:
    print("Singular Matrix")
    print ("determinant: ", np.linalg.det(A))
#Problem 3. Consider the matrix, (40 points) Find the eigenvalue/s Find the eigenvectors
A = np.array([[8,5,-6],[-12,-9,12],[-3,-3,5]])
print(A)

w,v = np.linalg.eig(A)
print("\nThe eigenvalues are:",w)
print("The eigenvectors are:",v)

x = v.round(2)
print("\n Eigenvectors round off: \n", x)<jupyter_output>[[  8   5  -6]
 [-12  -9  12]
 [ -3  -3   5]]

The eigenvalues are: [-1.  3.  2.]
The eigenvectors are: [[ 3.01511345e-01 -7.07106781e-01  7.07106781e-01]
 [-9.04534034e-01  7.07106781e-01  1.53837015e-15]
 [-3.01511345e-01 -2.26120075e-15  7.07106781e-01]]

 Eigenvectors round off: 
 [[ 0.3  -0.71  0.71]
 [-0.9   0.71  0.  ]
 [-0.3  -0.    0.71]]
{'fraction_non_alphanumeric': 0.1933873986275733, 'fraction_numerical': 0.11790393013100436, 'mean_word_length': 3.4065934065934065, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '583504', 'license': 'Apache-2.0', 'n_tokens_mistral': 783, 'n_tokens_neox': 679, 'n_words': 196, 'path': 'FinalExam.ipynb', 'repo_name': 'ryanmaullon/Linear-Algebra-58020', 'size': '1603'}