This example only use typescript and javascript.
For test the result you can open the index.html.
Important !This is only for square matrices
In this case we use the next matrix:
[
[1, 2, 3, 4],
[4, 5, 6, 7],
[8, 9, 1, 5],
[8, 5, 3, 1]
]