Matrix arithmetic

Example

To multiply and divide by a scalar

You can use the arithmetic functions (+, –, ×, / ) with matrix arguments. Division left–multiplies by the inverse of the divisor. You can enter the matrices themselves or enter the names of stored matrix variables. The matrices can be real or complex.

For the next four examples, store [[1,2],[3,4]] into M1 and [[5,6],[7,8]] into M2.

1.Create the first matrix.

>6+,)7@MATRIX 1(:_￿2._

1 >(17(5@ 2￿>(17(5@￿*e,

3 >(17(5@ 4￿>(17(5@

2.Create the second matrix.

>6+,)7@MATRIX *e, 1(:_￿

2._ 5 >(17(5@ 6￿>(17(5@￿ *e, 7 >(17(5@ 8 >(17(5@

3.Add the matrices that you created.

>+20(@>$/3+$@M1 >￿@ >$/3+$@M2 >(17(5@

For division by a scalar, enter the matrix first, then the operator, then the scalar. For multiplication, the order of the operands does not matter. The matrix and the scalar can be real or complex. For example, to divide the result of the previous example by 2, use the following key presses:

>j@ 2 >(17(5@

12-6

Matrices