# Mathematica or (preferably) maxima display exanded form

1. Mar 1, 2013

### richyw

Is it possible to get either one to display the less factored form of an expression? what I am doing is multiplying matrices together for geometrical optics but my answers keep coming out really ugly. For example I have

$$d-d\left(\frac{2d}{r}-1\right)$$ I don't think a person would ever write it like that. This is not a bad example but in some cases its doing just really ugly things where the neatest form is (at least close to) the fully expanded form. I'd rather see my answer expanded and then manually make the decision on what to factor out if that makes any sense?

thanks!

2. Mar 1, 2013

### richyw

nevermind, I figured it out. I typed "expand(A)". who would have thunk?