<jupyter_start><jupyter_text><jupyter_code>import numpy as np
from scipy.linalg import solve
A = np.array([[20,10],[17,22]]) #Creation of 2x2 Matrix
B = np.array([[350],[500]]) #Creation of Matrix

#to print
print(A)
print()
print(B)
print()

X= np.linalg.solve(A,B) #way to solve 
print(X)

X= solve(A,B) #solving using scipy library
print()
print(X)
inv_A = np.linalg.inv(A) #To inverse A
print(inv_A)

X = np.linalg.inv(A).dot(B) #dot product of Inv of A and B
print(X)
X = np.dot(inv_A,B) #Checking
X<jupyter_output><empty_output><jupyter_text>Solving for three linear equations with unknown variables of x, y, and z<jupyter_code>#4x+3y+2z=25
#-2x-2y+3z=-10
# 3x-5y+2z=-4

A= np.array([[4,3,2],[-2,2,3],[3,-5,2]]) #Creation of 3x3 Matrix
B= np.array([[25],[-10],[-4]]) #Creation of Matrix

#To Print
print(A)
print(B)
X= solve(A,B) #Solving using scipy
print("The Solution is:")
print(X)<jupyter_output>[[ 4  3  2]
 [-2  2  3]
 [ 3 -5  2]]
[[ 25]
 [-10]
 [ -4]]
The Solution is:
[[ 5.]
 [ 3.]
 [-2.]]
{'fraction_non_alphanumeric': 0.20119521912350596, 'fraction_numerical': 0.06274900398406374, 'mean_word_length': 4.742857142857143, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '274703', 'license': 'Apache-2.0', 'n_tokens_mistral': 492, 'n_tokens_neox': 468, 'n_words': 116, 'path': 'Application.ipynb', 'repo_name': 'adriyennKB/Linear-Algebra-58019', 'size': '1004'}