It also compares the number of iterations required for each method and plots the results.
The function takes a coefficient matrix and a right-hand side vector as inputs and returns the solution vector of the linear system.
This Python code provides a function that solves a two-dimensional Poisson equation using the Jacobi, Gauss-Seidel, and Over-Relaxation methods.