summation of two matrices using c programme . number(10 and20)
Answers
for the soccer teams, we can use a matrix, which is a rectangular array of numbers. A row in a matrix is a set of numbers that are aligned horizontally. A column in a matrix is a set of numbers that are aligned vertically. Each number is an entry, sometimes called an element, of the matrix. Matrices (plural) are enclosed in [ ] or ( ), and are usually named with capital letters. For example, three matrices named \displaystyle A,B,\text{}A,B, and \displaystyle CC are shown below.
\displaystyle A=\left[\begin{array}{cc}1& 2\\ 3& 4\end{array}\right],B=\left[\begin{array}{ccc}1& 2& 7\\ 0& -5& 6\\ 7& 8& 2\end{array}\right],C=\left[\begin{array}{c}-1\\ 0\\ 3\end{array}\begin{array}{c}3\\ 2\\ 1\end{array}\right]A=[
1
3
2
4
],B=
⎣
⎡
1
0
7
2
−5
8
7
6
2
⎦
⎤
,C=
⎣
⎡
−1
0
3
3
2
1
⎦
⎤
Describing Matrices
A matrix is often referred to by its size or dimensions: \displaystyle \text{ }m\text{ }\times \text{ }n\text{ } m × n indicating \displaystyle mm rows and \displaystyle nn columns. Matrix entries are defined first by row and then by column. For example, to locate the entry in matrix \displaystyle AA identified as \displaystyle {a}_{ij},\text{}a
ij
, we look for the entry in row \displaystyle i,\text{}i, column \displaystyle jj. In matrix
A
,
shown below, the entry in row 2, column 3 is \displaystyle {a}_{23}a
23
.
\displaystyle A=\left[\begin{array}{ccc}{a}_{11}& {a}_{12}& {a}_{13}\\ {a}_{21}& {a}_{22}& {a}_{23}\\ {a}_{31}& {a}_{32}& {a}_{33}\end{array}\right]A=
⎣
⎡
a
11
a
21
a
31
a
12
a
22
a
32
a
13
a
23
a
33
⎦
⎤
A square matrix is a matrix with dimensions \displaystyle \text{ }n\text{ }\times \text{ }n,\text{} n × n, meaning that it has the same number of rows as columns. The \displaystyle 3\times 33×3 matrix above is an example of a square matrix.
A row matrix is a matrix consisting of one row with dimensions \displaystyle 1\text{ }\times \text{ }n1 × n.
\displaystyle \left[\begin{array}{ccc}{a}_{11}& {a}_{12}& {a}_{13}\end{array}\right][
a
11
a
12
a
13
]
A column matrix is a matrix consisting of one column with dimensions \displaystyle m\text{ }\times \text{ }1m × 1.
\displaystyle \left[\begin{array}{c}{a}_{11}\\ {a}_{21}\\ {a}_{31}\end{array}\right]
⎣
⎡
a
11
a
21
a
31
⎦
⎤
A matrix may be used to represent a system of equations. In these cases, the numbers represent the coefficients of the variables in the system. Matrices oft