It's impossible in general, or at least it wouldn't always yield what you expect. Assume a transform mirrors an image with respect to an axis (reflection). What would half the transform be?
What you can do, is extract affine transforms like translation, rotation and scale, interpolate them, and recompose them to a new transform matrix. An alternative way is to apply the matrix power, but then you need a linear algebra library.