The stack trace provided says that you cannot touch the imageMatrix, So you should create a deep copy of the existing matrix and do the scale & translate operations on the new one replace last three lines of your code with the code below:
Matrix newMatrix = new Matrix();
newMatrix.set(imageMatrix);
newMatrix.preTranslate(-(imageWidth/2), -(imageHeight/2));
newMatrix.preScale(scaleWidth, scaleHeight);
newMatrix.postTranslate((imageWidth/2), (imageHeight/2));