Skip to main content

A simple and efficient module for matrix and vector manipulation.

Project description

matmath module

A simple and efficient module for matrix manipulation.

Downloads


Installing under Python

When installing the matmath module for python, it is recommended that you check if you have python 3.6 or above. To install matmath, goto a terminal and run:

pip install matmath

To upgrade matmath, run:

pip install --upgrade matmath

Functions and their uses

The Matrix and Vector classes support all mathematical operations like addition, subtraction, multiplication, division, matrix multiplication, etc. Apart from that, the Matrix class also supports the following functions:

Matrix related functions

Functions Description
.adjoint() Returns the adjoint of the matrix.
.adj() Alias of .adjoint()
.cofactor() Returns the cofactor of the matrix.
.copy() Returns a copy of the matrix.
.cut() Returns a smaller matrix by removing the required row and column. The default of row and column is None.
.determinant() Returns the determinant of the matrix (if mathematically possible).
.det() Alias of .determinant().
.inverse() Returns the inverse of the matrix (if mathematically possible) multiplied by the multiplication factor.
.inv() Alias of .inverse().
.is_diagonal() Tells if input is a diagonal matrix.
.is_identity() Tells if input is an identity matrix.
.is_lower_triangular() Tells if input is a lower triangular matrix.
.is_null() Tells if input is a null matrix.
.is_skew_symmetric() Tells if input is a skew symmetric matrix.
.is_square() Tells if input is a square matrix.
.is_symmetric() Tells if input is a symmetric matrix.
.is_upper_triangular() Tells if input is an upper triangular matrix.
.order() Returns the order of the matrix as a tuple of the form (rows, columns).
.rotate() Returns a matrix which is formed by rotating the given matrix, n times, in clockwise sense.
.trace() Returns the trace of the matrix, if mathematically possible.
.transpose() Returns the transpose of the matrix.
identity() Returns an identity matrix of order N x N multiplied by the multiplication factor.
zero() Returns a null matrix of order N x M. If only 1 parameter is given returns a null matrix of order N x N.

Vector related functions

Method Description
argument Returns the argument of the vector.
cross_product Cross product of the vector with respect to another vector.
dot_product Dot product of the vector with respect to another vector.
is_parellel Tells whether the two vectors are parellel or not.
is_unit Tells whether the vector is a unit vector or not.
magnify Magnifies a vector.
modulus Returns the modulus of the vector.
rotate Rotates the 2d vector in 2D space.
unit_vector Returns the unit vector in the direction of the vector.
x Returns the 1st component of the vector.
y Returns the 2nd component of the vector.
z Returns the 3rd component of the vector.

Contact

Please feel free to reach out if you have any questions:


License

MIT License

Copyright (c) 2021 Siddhesh-Agarwal

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matmath-3.2.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

matmath-3.2.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file matmath-3.2.0.tar.gz.

File metadata

  • Download URL: matmath-3.2.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.13 Windows/10

File hashes

Hashes for matmath-3.2.0.tar.gz
Algorithm Hash digest
SHA256 074b5ac6e26929fbbe2009abd0ef5a4f291cfe7309f9417bc0b6cd24c1c7898f
MD5 7f2798fbdc583b6e2b8db176e5af1c32
BLAKE2b-256 f3235d90589bfa13ff0dac860aef598d7994c9f4e72f8ad6445fd2fafdaa0942

See more details on using hashes here.

File details

Details for the file matmath-3.2.0-py3-none-any.whl.

File metadata

  • Download URL: matmath-3.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.13 Windows/10

File hashes

Hashes for matmath-3.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a63776514a6228f3c08547a2ecfdba132979c1925cae8d0e42b89b0bae70cd8e
MD5 8c8db2443f2056c194f4452f16df3bb4
BLAKE2b-256 9e1fb56a1f42e7ee58f1cd32b0daf7f932d0cfcb712b291cb1bb0b1848d71f6b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page