05/07/2014

Matrix arithmetic operators obey the rules govern by the linear algebra for matrix multiplication, division, addition, subtraction, transpose and etc.
? These operators are not followed by a dot as in array arithmetic operators.
?Addition and subtraction is same in both array arithmetic operations (dot operations) and a matrix arithmetic operation that’s why addition and subtraction are not followed by a dot in dot operations. These operators exist only without followed by a dot.
Some examples are listed below along with relevant operator.
Operators
×
(multiplication)
-           
(subtraction)
\
(right division)
/
(left    division)
(transpose)
+
(addition)

Example
a=[1 2;3 4]
b=[4 5;6 8]
result=a*b
a=1   2
  3   4
b=4   5
  6   8
result =16   21
36   47
a=[1 2;3 4]
b=[4 5;6 8]
result=a-b
a=1   2
  3   4
b=4   5
  6   8
result =-3    -3
-3    -4

a=[1 2;3 4]
b=[4 5;6 8]
result=a\b
a=1   2
  3   4
b=4   5
  6   8
result=
-2.0 -2.0
3.0  3.5

a=[1 2;3 4]
b=[4 5;6 8]
result=a\b
a=1   2
  3   4
b=4   5
  6   8
result =
-2.0  1.5
0     0.5

a=[1 2;3 4]
result=a’
a=1   2
  3   4
result=     1     3
2     4

a=[1 2;3 4]
b=[4 5;6 8]
result=a+b
a=1   2
  3   4
b=4   5
  6   8
result =
 5     7
 9    12





0 comments:

Post a Comment

Blog Archive

Popular Posts