Simply put, I'm trying to find a transformation matrix capable of emulating the regular layer transform properties, hence its inverse can be used to cancel out any parent layer's transformation. So far, I've not been able to figure out the right operations and concatenation order for position. I think this matrix would be really useful in cases where a layer must follow certain transformations from another layer, without the hassle of assigning the leader layer by complex dynamic coding and just parenting instead.
Scale and rotation are easy enough to inverse by using something like the code above, but position is a totally different story since parent's position, anchorPoint, scale and rotation come together into play.
These expressions work regardless of the layers hierarchy, which is nice. Hopefully I made myself clear.
//Reverse parent's scale
var x = length( toCompVec( [1, 0 ] ) );
var y = length( toCompVec( [0, 1 ] ) );
[ x * value, y * value ]
//Reverse parent's rotation
var c = toCompVec( [1, 0] );
-radiansToDegrees( Math.atan2( c, c ) )