I was wondering how to create a matrix and compute its inverse using SymPy in Python?
For example, for this symbolic matrix:
If your question was: How to compute the inverse of a matrix M in sympy then:
M_inverse = M.inv()
As for how to create a matrix:
M = Matrix(2,3, [1,2,3,4,5,6])
will give you the following 2X3 matrix:
1 2 3
4 5 6
See: http://docs.sympy.org/0.7.2/modules/matrices/matrices.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With