From the course: Mathematica 14 Essential Training

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Add, subtract, and multiply matrices

Add, subtract, and multiply matrices - Mathematica Tutorial

From the course: Mathematica 14 Essential Training

Add, subtract, and multiply matrices

Just as with other mathematical objects, you can add, subtract, and multiply matrices and vectors. In this movie, I will show you how to perform those operations, focusing on the differences between addition and subtraction versus multiplication. To add matrices or vectors, they need to be exactly the same shape. So, here I have two two by three matrices and I have added them together. And when you look at the result you see that the addition was done element by element. So, first row, first item from each matrix was added together. Second item from the first row in each one added together, continuing on throughout the rest of the matrix. And it is the same for subtraction. Here, I have the same two matrices to start, except this time, I am subtracting all ones from the 1, 2, 3, 4, 5, 6 matrix on the side. So, I have 1 minus 1 is 0 2 minus 1 is 1, continuing on. And just as with addition, subtraction requires matrices of the same dimensions. Multiplication is very different, and it…

Contents