Difference between revisions of "Addition of matrices"

From Robotics
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Navigation|before=[[The transpose of a matrix]]|overview=[[Matrices]]|next=[[Multiplication of matrices]]}}
 
{{Navigation|before=[[The transpose of a matrix]]|overview=[[Matrices]]|next=[[Multiplication of matrices]]}}
 +
{{Exercise|Selftest: Addition of matrices}}
 +
 +
Requirement for the addition of two matrices is, that they have the same number of rows and the same number of colums. So both matrices have to be an m-by-n matrix. The addition is made by adding each the components:
  
Requirement for the addition of two matrices is, that they have the same number of rows and the same number of colums. So both matrices have to be an m-by-n matrix. The addition is made by adding each the components:<br/><br/>
 
 
:<math>
 
:<math>
 
\mathbf{A}+\mathbf{B}=
 
\mathbf{A}+\mathbf{B}=
Line 22: Line 24:
 
     a_{m1}+b_{m1} & \dots & &a_{mn}+b_{mn}
 
     a_{m1}+b_{m1} & \dots & &a_{mn}+b_{mn}
 
   \end{array}\right]
 
   \end{array}\right]
</math><br/><br/>
+
</math>
  
 
{{Example
 
{{Example
Line 51: Line 53:
 
</math>
 
</math>
 
}}
 
}}
 +
 +
[[Category:Article]]
 +
[[Category:Matrices]]

Latest revision as of 18:05, 13 November 2015

← Back: The transpose of a matrix Overview: Matrices Next: Multiplication of matrices

Review.png

There are exercises as selftest for this article.


Requirement for the addition of two matrices is, that they have the same number of rows and the same number of colums. So both matrices have to be an m-by-n matrix. The addition is made by adding each the components:


\mathbf{A}+\mathbf{B}=
  \left[\begin{array}{cccc}
    a_{11} & a_{12} & \dots &a_{1n} \\
    a_{21} &\ddots & &\vdots\\
    \vdots & & & \\
    a_{m1} & \dots & & a_{mn}
  \end{array}\right]+
  \left[\begin{array}{cccc}
    b_{11} & b_{12} & \dots &b_{1n} \\
    b_{21} &\ddots & &\vdots\\
    \vdots & & & \\
    b_{m1} & \dots & &b_{mn}
  \end{array}\right]=
  \left[\begin{array}{cccc}
    a_{11}+b_{11} & a_{12}+b_{12} & \dots &a_{1n}+b_{1n} \\
    a_{21}+b_{21} &\ddots & &\vdots\\
    \vdots & & & \\
    a_{m1}+b_{m1} & \dots & &a_{mn}+b_{mn}
  \end{array}\right]
Example: Addition of two 3-by-3 matrices



\mathbf{A}_e+\mathbf{B}_e=
  \left[\begin{array}{ccc}
    1 & 3 & -2\\
    0 & -1 & 3\\
    2 & 4 & 2
  \end{array}\right]+
  \left[\begin{array}{ccc}
    -3 & 2 & -1\\
    2 & 4 & -3\\
    0 & -2 & 1
  \end{array}\right]=
  \left[\begin{array}{ccc}
    1-3 & 3+2 & -2-1\\
    0+2 & -1+4 & 3-3\\
    2+0 & 4-2 & 2-1
  \end{array}\right]=
  \left[\begin{array}{ccc}
    -2 & 5 & -3\\
    2 & 3 & 0\\
    2 & 2 & 1
  \end{array}\right]