Amazon interview question

How to do a matrix transformation