To write a python program to find a solution to a system of linear equations.
- Hardware – PCs
- Anaconda – Python 3.7 Installation / Moodle-Code Runner
Import the numpy module to use the built-in functions for calculation
Prepare the lists from each linear equations and assign in np.array()
Using the np.linalg.solve(), we can find the solutions.
End the program
Developed By : KISHORE S
Register Number : 22008388
import numpy as np
A = np.array([[1,-3],[3,1]])
B=np.array)([0,10])
c=np.linalg.solve(A,B)
print(c)
Thus the solutions for the linear equations are successfully solved using python program