Are you sure about your math? Given the ratio touch_area_width / total_width, you're saying that if the touch area is smaller than the total width, the scaling factor will be less than 1, and thus make the result even smaller yet. On my device, the ratio total_width/touch_area_width is the right value to use for c0. Similar comment for the height/c2 value.
If you're in there, you might mention that all values are normalized WRT 1.0 before being multiplied by this matrix. It's easier to see the point of c1 and c3's equations if you have that fact in mind. Also, for cases where the touchscreen area is a subset of the screen area, these coefficients need to be negative.