Added support for matrix transformations.