title: How simplifying fractions in matrices with sympy?
body: <p>I'm using <code>sympy</code> to find a matrix's inverse. I've the next problem. When I compute the inverse of matrix <code>A</code> and I want prove it, I got a matrix with fractions; I mean</p>
  
  <pre><code>&gt;&gt; import sympy
  &gt;&gt; from sympy import pprint
  &gt;&gt; from sympy.abc import *
  &gt;&gt; import sys
  &gt;&gt; sys.displayhook = pprint
  &gt;&gt; from sympy.matrices import *
  &gt;&gt; A = Matrix([[a, b],[c, d]])
  &gt;&gt; B = A.inv()
  &gt;&gt; B
  &gt;&gt; [1       b*c           -b     ]
  &gt;&gt; [- + ------------  -----------]
  &gt;&gt; [a    2 /    b*c\    /    b*c\]
  &gt;&gt; [    a *|d - ---|  a*|d - ---|]
  &gt;&gt; [       \     a /    \     a /]
  &gt;&gt; [                             ]
  &gt;&gt; [      -c               1     ]
  &gt;&gt; [  -----------       -------  ]
  &gt;&gt; [    /    b*c\           b*c  ]
  &gt;&gt; [  a*|d - ---|       d - ---  ]
  &gt;&gt; [    \     a /            a   ]
  &gt;&gt; B*A
  &gt;&gt; [  /1       b*c     \       b*c        /1       b*c     \       b*d    ]
  &gt;&gt; [a*|- + ------------| - -----------  b*|- + ------------| - -----------]
  &gt;&gt; [  |a    2 /    b*c\|     /    b*c\    |a    2 /    b*c\|     /    b*c\]
  &gt;&gt; [  |    a *|d - ---||   a*|d - ---|    |    a *|d - ---||   a*|d - ---|]
  &gt;&gt; [  \       \     a //     \     a /    \       \     a //     \     a /]
  &gt;&gt; [                                                                      ]
  &gt;&gt; [                                             d          b*c           ]
  &gt;&gt; [                0                         ------- - -----------       ]
  &gt;&gt; [                                              b*c     /    b*c\       ]
  &gt;&gt; [                                          d - ---   a*|d - ---|       ]
  &gt;&gt; [                                               a      \     a /       ]
  </code></pre>
  
  <p>And I wanna get the next matrix</p>
  
  <pre><code>&gt;&gt; I = Matrix([
  &gt;&gt; [1, 0],
  &gt;&gt; [0, 1]])
  </code></pre>
  
  <p>My problem is the matrix <code>A*B</code> or <code>B*A</code>. Really I want to simplify the matrix <code>A*B</code> to get <code>I</code>. I tried <code>simplify()</code> but doesn't work.</p>