const A = new Matrix([
[1, 2, 3],
[4, 5, 6],
]);
const r = A.rows();
// r is 2
const c = A.cols();
// c is 3
const A = new Matrix([
[1, 2, 3],
[4, 5, 6],
]);
const dimension = A.dim();
// dimension is [2, 3]
const A = new Matrix([
[1, 2, 3],
[4, 5, 6],
]);
const B = A.transpose();
// B is [[1, 4], [2, 5], [3, 6]]