🧮

Inverse Matrix Calculator

Python123 lines· A console program that asks for the order and elements of a square matrix, then computes and prints its inverse using minors, cofactors, and the ad…
Original project by @farisfaikar — view source on GitHub
Ready when you are
README· what to build

Inverse Matrix Calculator

A console program that asks for the order and elements of a square matrix, then computes and prints its inverse using minors, cofactors, and the adjugate.

Example

===== Inverse Matrix Calculator =====
>>> Input order of matrix
Choose matrix rows and columns: 2
Matrix A: 2x2
--------------------
>>> Input elements of matrix
A 1, 1: 4
A 1, 2: 7
A 2, 1: 2
A 2, 2: 6
--------------------
>>> Calculation Results
A:
	[ 4 7 ]
	[ 2 6 ]
A^-1:
	[ 0.6 -0.7 ]
	[ -0.2 0.4 ]
--------------------
>>> Would you like to make another calculation? (y): n
Thank you for using this program :)

How to run on localhost

python main.py

Dependencies

Standard library only.

inverse-matrix-calculator.py· Python 3.x
132 lines
Console· terminal