Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 1.38 KB

File metadata and controls

19 lines (14 loc) · 1.38 KB

Matrix-Operations-Python

The code provides a collection of functions for matrix operations, including transposing, finding the rank, inverting, multiplying.

About

  • transpose_matrix - this function takes a matrix as input and returns its transpose, where the rows of the original matrix become columns in the transposed matrix, and vice versa
  • rank_of_matrix - this function calculates and returns the rank of a matrix, which is the maximum number of linearly independent rows or columns in the matrix
  • inverse_matrix - this function computes and returns the inverse of a square matrix. It checks if the matrix is invertible, and if so, it performs Gaussian elimination to find the inverse
  • multiply_matrix - this function multiplies each element of a matrix by an integer n and returns the resulting matrix
  • exponentiate_matrix - this function raises a square matrix to the power of an integer n. It performs repeated matrix multiplication of the matrix with itself n times and returns the resulting matrix
  • read_matrix_from_file - reads matrix from a txt file, matrix should look like in an example file
You can utilize this code to perform various operations. Additionally, you have the flexibility to add your own custom methods as needed.

Developers