MATRIX

What is a matrix? Well a matrix is a thing where you can store and modify data efficaciously. To define a matrix you need to define how many rows and columns it has. This is done by first taking the rows number, lets say 2 and then the columns number lets say 3. This we would call a 2x3 matrix, and it would look like this:
x x x
x x x

ADDITION AND SUBTRACION WITH MATRICES
We'll start with an example:
company A's total profit one quarter is;
first quarter: 100, second quarter 200, third quarter 300, and fourth quarter 400.
And company B's total profit one quarter is;
first quarter: 400, second quarter 300, third quarter 200, and fourth quarter 100.
This you can write as: profit quarter: 1 2 3 4 company A 100 200 300 400 company B 400 300 200 100
Or just:
100  200  300  400
400  300  200  100
Lets say that their profit change to the double the next quarter then we get the total profit for those two quarters is:
100  200  300  400   200  400  600  800   300  600  900  1200
400  300  200  100 + 800  600  400  200 = 1200  900  600  300
This isn't very hard it's just to take the number in the number in the first row, first column, first matrix and use addition to add it to the first row, first column, second matrix. And then continue with the number in the first row, second column, first matrix and use addition to add it to the first row, second column, second matrix and so on. This also applies to subtraction with matrices.
(Note that you can only use subtraction and addition on matrices that has the same size)


MULTIPLICATION WITH MATRICES
Matrix multiplication is a bit more difficult, but not much.
Instead of multiplying number by number as in addition of subtraction you multiply the rows of the matrix on the left side of the equation by the columns in the matrix on the right side of the equation.

If we have the two matrices:
A B and C D
a b     c d
Then we start of by taking the first row in the first matrix:
A B * C D
a b   c d
And multiply it to the second matrix first column
A B * C D
a b   c d
To make the multiplication easier you take the columns of the second matrix and turn them so that the highest number becomes the number on the left side. And the lowest number becomes the number on the right side:
C -> (C c)
c
Now you can just multiply them usually number by number:
(A B) * (C c) = (AC Bc)

And in matrix multiplication, when you take these rows times the columns you add the factors together:
(A B) * (C c) = (AC+Bc)

Then you still have the second row in the first matrix and the second column in the second matrice left. But don't touch the first matrix second row just yet!. Each row in the first matrix has to get multiplied, in the same fashion as above, by each column in the second matrix(it might sound confusing). So first we take the same row as before in the first matrix:
A B * C D
a b   c d  
And multiply it to the second matrix second column:
A B * C D
a b   c d  
Which if we use the same method as above becomes:
(a b) * (D d) = (aD+bd)


Now we no longer have any columns left in the second matrix. So
therefore we should start over with the first matrix second row.
But first, since the multiplications we preformed above,
was to the same row in the first matrix, we have to combine them
into the same row in the final matrix that we get after multiplication:

(AC+Bc) and (AD+Bd) = (AC+Bc aD+bd)
And then we can start over with the second row in the first matrix. And multiply it first to the first column in the second matrix and then moving on the second column:
A B * C D
a b   c d  
(a b) * (C c) = (aC+bc)
A B * C D
a b   c d  
(a b) * (D d) = (aD+bd)

And then combine the two results:

(aC+bc) and (aD+bd) = (aC+bc aD+bd)

Then we put the results underneath each other. The Row that came from multiplying the first row in the first matrix gets to be on top. And then the others follow:
(AC+Bc aD+bd) = AC+aB aD+bd
(aC+bc aD+bd) aC+bc aD+bd
And that is the result of the multiplication.
In multiplication with matrices you don't have to use matrixes of the same size, as in addition and subtraction. e.g:
A a * D E
B b   d e
C c
Works just as fine. But the amount of numbers in the first matrix rows has to be the same as in the second matrix columns. Or else you can't multiply them. e.g:
A a * (D E F)
B b
Wont work since, if we just talke the first matrix first row and try to multiply it to the second matrix first column you'll see that:
(A a) * (D) = (AD a)

Which means that there simply isn't enough numbers in the second matrix columns. (It could also be the other way around, it would have to many numbers)

And also, unlike with normal numbers, you can't multiply a matrix in any order you want. If you have two matrices A and B. Then A*B and B*A give two different results.

EXAMPLE
Lets say like this; a company makes a round sum of three million$ per year and a round sum of 800000$ per quarter and a round sum of 25000$ per month. So we can write it like this:
(1000000 800000 25000)

And then if we would like to know the total amount the company makes on lets say two years two quarters and three months we could do like this:
                            2
                              
(1000000   800000   250000) 2
                             
                            3
See if you can get that right(you punk).The answer is right below, but it's written in white colour so you'll have to mark it using the mouse in order to see it:
4100000




Hosting provided by: Optics.net
Astronomy Awards
Electronics
All material is available under the terms of the GNU Free Documentation License