The invertSelf() method of the DOMMatrix interface inverts the original matrix.
invertSelf()
MDN Reference