Matrices II

  • Addition and Subtraction of 2 Matrices

2 matrices A and B can be added to or subtracted from each other ONLY WHEN THEIR ORDER IS SAME. These operations are performed element-wise. e.g.

{A = \begin {bmatrix} 1 & 2 & 3 \\ 9 & 6 & 4 \end {bmatrix}, B = \begin {bmatrix} 5 & 3 & 4 \\ 0 & 0 & 2 \end {bmatrix}}

Then,

{A+B = \begin {bmatrix} 1+5 & 2+3 & 3+4 \\ 9+0 & 6+0 & 4+2 \end {bmatrix} = \begin {bmatrix} 6 & 5 & 7 \\ 9 & 6 & 6 \end {bmatrix}}

{A-B = \begin {bmatrix} 1-5 & 2-3 & 3-4 \\ 9-0 & 6-0 & 4-2 \end {bmatrix} =\begin {bmatrix} -4 & -1 & -1 \\ 9 & 6 & 2 \end {bmatrix}}

A+B is always equal to B+A, but A-B may not always be equal to B-A. We say matrix addition is commutative, but matrix subtraction is not commutative.

  • Multiplication of 2 Matrices

The multiplication operation is unique to the matrices in the way it is defined. It has immense applications in various fields. Please note how it is performed:

When B is to be postmultiplied with A, i.e. A \times B, the number of columns in A must be equal to the number of rows in B.

Let {A_{2 \times 3} = \begin {bmatrix} 1 & 2 & 3 \\ 9 & 6 & 4 \end {bmatrix}} and {B_{3 \times 4} = \begin {bmatrix} 2 & 5 & -3 & 0 \\ 1 & 7 & -3 & 2 \\ -5 & 6 & 2 & 0 \end {bmatrix}}.

Number of rows in A = number of columns in B. Hence, A \times B is possible and is given by:

{A \times B = \begin {bmatrix} 1(2)+ 2(1)+ 3(-5)& 1(5)+2(7)+3(6) & 1(-3)+2(-3)+3(2) & 1(0)+2(2)+3(0)\\ 9(2)+ 6(1)+ 4(-5)& 9(5)+6(7)+4(6) & 9(-3)+6(-3)+4(2) & 9(0)+6(2)+4(0) \end {bmatrix}}

{A \times B = \begin {bmatrix} -11 & 37 & -3 & 4 \\ 4 & 111 & -37 & 18 \end {bmatrix}}

Note that number of rows in A \times B is equal to the number of rows in A and number of columns in A \times B is equal to the number of columns in B.

It is not possible to premultiply A by B, i.e. B \times A, because number of columns in B is NOT equal to number of rows in A.

  • Elementary Transformations of a Matrix

A transformation transforms a matrix to another. There are 2 types of elementary transformations viz.

  • Row Transformations

Consider {A = \begin {bmatrix} 1 & 2 & 3 \\ 9 & 6 & 4 \end {bmatrix}}.

1) {R_{i}+ c{R_j}}

Take ith row. To each element of R_i, add the number c \times R_j, such that both elements belong to same column. For example, R_2 + 2 R_1 would give,

{\begin {bmatrix} 1 & 2 & 3 \\ 9+2(1) & 6+2(2) & 4+2(3) \end {bmatrix} = \begin {bmatrix} 1 & 2 & 3 \\ 11 & 10 & 10 \end {bmatrix}}

Call this matrix D.

2) {c R_i}

Take ith row. Multiply each element of R_i by a constant c. For example, the matrix D will get transformed to another matrix under \frac 1 2 R_1.

{\begin {bmatrix} \frac 1 2 & \frac 2 2 & \frac 3 2 \\ 11 & 10 & 10 \end {bmatrix} = \begin {bmatrix} 0.5 & 1 & 1.5 \\ 11 & 10 & 10 \end {bmatrix}}

  • Column Transformations

Again consider {A = \begin {bmatrix} 1 & 2 & 3 \\ 9 & 6 & 4 \end {bmatrix}}.

1) {C_{i}+ c{C_j}}

Take ith column. To each element of C_i, add the number c \times C_j, such that both elements belong to same row. For example, C_2 + 2 C_1 would give,

{\begin {bmatrix} 1 & 2+2(1) & 3 \\ 9 & 6+2(9) & 4 \end {bmatrix}= \begin {bmatrix} 1 & 4 & 3 \\ 9 & 24 & 4 \end {bmatrix}}

Call this matrix E.

2) {c C_i}

Take ith column. Multiply each element of C_i by a constant c. For example, the matrix E will get transformed to another matrix under \frac 1 4 C_3.

{\begin {bmatrix} 1 & 4& \frac 3 4 \\ 9 & 24 & \frac 4 4 \end {bmatrix} = \begin {bmatrix} 1 & 4 & 0.75 \\ 9 & 24 & 1 \end {bmatrix}}

NOTE: The transformations are a very useful tool in obtaining inverse of a matrix.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s