A C console program for working with matrices.
Supports: creation (manual/random), file I/O, addition, subtraction, multiplication, transpose, determinant, and inverse.
Determinant:
(Singular → no inverse exists)
Determinant:
Inverse:
- Addition / Subtraction
- Multiplication
- Transpose
- Determinant & Inverse
via Gaussian elimination with partial pivoting.
- Addition/Subtraction:
$O(n^2)$ - Multiplication:
$O(n^3)$ - Determinant/Inverse:
$O(n^3)$
Compile:
gcc -std=c11 -O2 -Wall -lm -o matrix matrix.cRun:
./matrixConsole demo:
=== Matrix Toolbox ===
1) Create new matrix
2) Random matrix
...
> 2
Rows: 3
Cols: 3
Min: 0
Max: 10
Random matrix created:
1.00 2.00 3.00
4.00 5.00 6.00
7.00 8.00 9.00
Determinant = 0