#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 24 14:52:27 2024

@author: sam
"""

import numpy as np
from scipy import linalg as la

A = np.array([[-1,-3,2],[3,-6,2],[0,2,-1]]) # creates 3x3 matrix A
b = np.array([[4],[3],[2]]) # creates 3x1 vector b

c = la.inv(A) @ b # solution matrix product of A^-1 x b 

for i in range(len(b)):
    print('F'+str(i+1),'=',int(c[i][0])) # prints solutions