Matrix Arithmetic
iThink and STELLA support a variety of matrix operations. In this post, I will explain the following common operations and how to perform them:
- Addition and Subtraction
- Transposition
- Extracting the Diagonal of a Square Matrix
- Multiplying and Dividing by a Scalar
- Multiplying a Square Matrix by a Vector
- Multiplying a Non-Square Matrix by a Vector
- Multiplying Two Matrices
In the examples provided, I use five different arrays of varying dimensions. They are all defined using the subscript name Dim3, which is size 3.
a: 3×3
b: 3×3
c: 3×3
d: 3×1 [one-dimensional]
e: 3×1 [one-dimensional]
I also use two arrays based on Dim3, as well as the subscript name Dim2, which is size 2.
s: 2×3
t: 3×2