<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([3, 4, 2]);
const mB = math.matrix([[120, 90, 60], [80, 70, 40], [60, 40, 20]]);
// Matrix Multiplication
const matrixMult = math.multiply(mA, mB);
// Result [800, 630, 380]
document.getElementById("demo").innerHTML = matrixMult;
</script>
</body>
</html>