PHP code example of mykola-ivashchuk-gl / matrix

1. Go to this page and download the library: Download mykola-ivashchuk-gl/matrix library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mykola-ivashchuk-gl / matrix example snippets


$matrix1 = new Matrix([
    [2, 7, 6],
    [9, 5, 1],
    [4, 3, 8],
]);
$matrix2 = new Matrix([
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9],
]);

echo $matrix1->multiply($matrix2);