matrix
This script defines two functions, they can be used to solve a
- linear system of 2 equations with 2 variables
- linear system of 3 equations with 3 variables
of the form
A.x = b
The functions are:
solve_system_2(A, b)
solve_system_3(A, b) A is 2x2 or 3x3 matrix containing the coefficients
b is a 2 or 3 element vector containing the constants
The matrix and vector are processed as Python lists
example:
A=[[6, -5],
[-7, 2]]
b=[2, -3]