Loading...
Solve a system of linear equations Ax = b.
A linear system Ax = b can be solved using:
Example: 2x + y = 5, x + 3y = 7 Matrix form: [[2,1],[1,3]] @ [x,y] = [5,7]
Write a function solve_system(A, b) that solves the linear system.
Return a dictionary with:
A = [[2, 1], [1, 3]], b = [5, 7]
{'solution': [1.6, 1.8], 'verification': [5.0, 7.0], 'is_correct': True}2(1.6) + 1(1.8) = 5, 1(1.6) + 3(1.8) = 7