<html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/9.3.2/math.js"></script>
<body>
<h1>JavaScript</h1>
<p>Multiplying matrices with math.js</p>
<div id="demo"></div>
<script>
const mA = math.matrix([1, 2, 3]);
const mB = math.matrix([[1, 4, 7], [2, 5, 8], [3, 6, 9]]);
// Matrix Multiplication
const matrixMult = math.multiply(mA, mB);
// Result [14, 32, 50]
document.getElementById("demo").innerHTML = matrixMult;
</script>
</body>
</html>