# Arrays

It should be noted that in numerical methods arrays are the daily bread, they will always be present. Remember that an array is an arrangement of the form:

\left[ \begin{array}{c c c c c} a_{1,1} & a_{1,2} & a_{1,3} & \dots & a_{1,n} \\ a_{2,1} & a_{2,2} & a_{2,3} & \dots & a_{2,n} \\ a_{3,1} & a_{3,2} & a_{3,3} & \dots & a_{3,n} \\ \dots & \dots & \dots & \dots & \dots \\ a_{m,1} & a_{m,2} & a_{m,3} & \dots & a_{m,n} \\ \end{array} \right]

It is very important that we see the arrays a little because they serve us in many other subjects of numerical methods. This is why before we see some characteristics of the arrays, first we are going to see how arryas are multiplied:

M\cdot N = \left[ \begin{array}{c c c} A & B & C \\ D & E & F \\ G & H & I \end{array} \right] \left[ \begin{array}{c c c} a & b & c \\ d & e & f \\ g & h & i \end{array} \right]

The multiplication of matrix M with matrix N is represented as follows:

M\cdot N = \left[ \begin{array}{c c c c c} Aa+Bd+Cg & \ & Ab+Be+Ch & \ & Ac+Bf+Ci \\ Da+Ed+Fg & & Db+Ee+Fh & & Dc+Ef+Fi \\ Ga+Hd+Ig & & Gb+He+Ih & & Gc+Hf+Ii \end{array} \right]

### Characteristic 1 of the arrays

For every square matrix A, where the number of rows and columns is the same, whose determinant is different from zero, there is a matrix denoted A^{-1} that satisfies the following relation:

AA^{-1} = A^{-1}A = I

Where I is an identity matrix, which identity matrices are:

I_{2\times 2} = \left[ \begin{array}{c c} 1 & 0 \\ 0 & 1 \end{array} \right]
I_{3\times 3} = \left( \begin{array}{c c c} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right)
I_{n\times m} = \left( \begin{array}{c c c} 1_{1,1} & \dots & 0_{1,m} \\ \vdots & \ddots & \vdots \\ 0_{n,1} & \dots & 1_{n,m} \end{array} \right)

They are all those that on their diagonal have the number 1 and all the other numbers are null.

### Characteristic 2 of the matrices. Elementary row transformations

Any matrix can be transformed into another by applying the 3 points that are usually called the elementary row transformations:

1. Multiply a row by a non-zero scalar
2. Add a multiple of another row to one row
3. Row exchange

I recommend that you carefully read the following:

Applying an elementary row transformation to a matrix A is the same as applying that transformation to a matrix I and multiplying it by A.

Let’s see an example for each of the 3 elementary row transformations. Let’s use the A array:

A = \left[ \begin{array}{c c c} a_{1,1} & a_{1,2} & a_{1,3} \\ a_{2,1} & a_{2,2} & a_{2,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{array} \right]

#### Transformation 1 of the matrices. Multiply a row by a non-zero scalar

Applying the first transformation we have the following:

B = \left[ \begin{array}{c c c} ka_{1,1} & ka_{1,2} & ka_{1,3} \\ a_{2,1} & a_{2,2} & a_{2,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{array} \right]

We have the modification made in the I array, which is the E_{1} array:

E_{1} = \left[ \begin{array}{c c c} k & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right]

Multiply E_{1} by the matrix A:

E_{1}\cdot A = \left[ \begin{array}{c c c} k & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right] \left[ \begin{array}{c c c} a_{1,1} & a_{1,2} & a_{1,3} \\ a_{2,1} & a_{2,2} & a_{2,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{array} \right]

At the end we get the B array:

E_{1}\cdot A = B = \left[ \begin{array}{c c c} ka_{1,1} & ka_{1,2} & ka_{1,3} \\ a_{2,1} & a_{2,2} & a_{2,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{array} \right]

#### Transformation 2 of the matrices. Add to a row a multiple of another row.

Applying the second transformation we have the following:

C = \left[ \begin{array}{c c c} a_{1,1} + ka_{3,1} & a_{1,2} + ka_{3,2} & a_{1,3} + ka_{3,3} \\ a_{2,1} & a_{2,2} & a_{2,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{array} \right]

It is equivalent to doing the following to our identity matrix:

E_{2} = \left[ \begin{array}{c c c} 1 & 0 & k \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right]

We multiply E_{2} by the matrix A to obtain the matrix C:

\left[ \begin{array}{c c c} 1 & 0 & k \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right] \left[ \begin{array}{c c c} a_{1,1} & a_{1,2} & a_{1,3} \\ a_{2,1} & a_{2,2} & a_{2,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{array} \right]
E_{2}\cdot A = C = \left[ \begin{array}{c c c} a_{1,1} + ka_{3,1} & a_{1,2} + ka_{3,2} & a_{1,3} + ka_{3,3} \\ a_{2,1} & a_{2,2} & a_{2,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{array} \right]

#### Transformation 3 of the matrices. Swap two rows

As its name indicates in this transformation, we will swap two rows of the A array to get what is displayed in the D array:

D = \left[ \begin{array}{c c c} a_{2,1} & a_{2,2} & a_{2,3} \\ a_{1,1} & a_{1,2} & a_{1,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{array} \right]

It is equivalent to making our identity matrix the following modification:

E_{3} = \left[ \begin{array}{c c c} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{array} \right]

We multiply E_{3} by A so we get D:

E_{3} = \left[ \begin{array}{c c c} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{array} \right] \left[ \begin{array}{c c c} a_{1,1} & a_{1,2} & a_{1,3} \\ a_{2,1} & a_{2,2} & a_{2,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{array} \right]
E_{3} \cdot A = \left[ \begin{array}{c c c} a_{2,1} & a_{2,2} & a_{2,3} \\ a_{1,1} & a_{1,2} & a_{1,3} \\ a_{3,1} & a_{3,2} & a_{3,3} \end{array} \right]

Note:

Finally, given a non-singular A matrix of order n , it is always possible to find so many matrices of the form E such that when applied to A they convert it into an identity matrix:

E_{1}, E_{2}, \dots E_{r} \cdot A = I

Thank you for being at this moment with us : )