Fixed matrix transpose and inverse