/numeric-matrix-processor

A Java text-based program for doing lots of operations with matrices, i.e. 2D arrays made of numbers: addition, multiplication, transposition, calculating the determinant and inversion.

Primary LanguageJava

A Java text-based project that helps you do several things with/to matrices, i.e. 2D arrays made of numbers:

  • Add two matrices? Check!

  • Multiply each cell of a matrix by an integer? Check!

  • Multiply two matrices? Check!

  • Transpose AKA flip (main diagonal of | side diagonal of | vertically | horizontally) a matrix? Check!

  • Find the determinant of a matrix with the help of recursion? Check!

  • Find the inverse of a matrix? Check!

Example of input and output:

  1. Add matrices
  2. Multiply matrix to a constant
  3. Multiply matrices
  4. Transpose matrix
  5. Calculate a determinant
  6. Inverse matrix
  7. Exit

Your choice: > 6

Enter matrix size: > 3 3

Enter matrix:

2 -1 0 0 1 2 1 1 0

The result is:

0.33 0 0.33 -0.33 0 0.66 0.16 0.5 -0.33

  1. Add matrices
  2. Multiply matrix to a constant
  3. Multiply matrices
  4. Transpose matrix
  5. Calculate a determinant
  6. Inverse matrix
  7. Exit

Your choice: > 0