MathPHP\LinearAlgebra\MatrixAxiomsTest::testInverseProductIsReverseProductOfInverses PHP Method

testInverseProductIsReverseProductOfInverses() public method

(AB)⁻¹ = B⁻¹A⁻¹ The inverse of a product is the reverse product of the inverses.
    public function testInverseProductIsReverseProductOfInverses(array $A, array $B)
    {
        $A = MatrixFactory::create($A);
        $B = MatrixFactory::create($B);
        $⟮AB⟯⁻¹ = $A->multiply($B)->inverse();
        $B⁻¹ = $B->inverse();
        $A⁻¹ = $A->inverse();
        $B⁻¹A⁻¹ = $B⁻¹->multiply($A⁻¹);
        $this->assertEquals($⟮AB⟯⁻¹->getMatrix(), $B⁻¹A⁻¹->getMatrix());
    }
MatrixAxiomsTest