# Mathematical Operations on Matrices | Class 12 Maths

A matrix is a rectangular arrangement of numbers, symbols, or expressions, organized in rows and columns. A matrix can be with ‘m’ number of rows and ‘n’ number of columns then it is called m×n matrix.

Matrices are written in box brackets where horizontal lines are called rows, for example in the above matrix – a_{11}, a_{12}, a_{13}.

Vertical lines are called columns, for example – a_{11}, a_{21}, a_{31}. Matrix size is decided by the number of rows and columns.

**Equality of Matrices**

Two matrices ‘A’ and ‘B’ are said to be equal if they satisfy the following three conditions;

- If the number of rows in matrix ‘A’ and matrix ‘B’ are same.
- If the number of columns in matrix ‘A’ and matrix ‘B’ are same.
- Corresponding elements in matrix ‘A’ and matrix ‘B’ are at the same position.

Here matrices ‘A’ and ‘B’ are equal as they satisfy all the above three conditions.

**Problem: Find the value of ‘x’ and ‘y’ if the following matrices are equal?**

**Solution:**

On equating the corresponding elements we can the value of ‘x’ and ‘y’

- x + 5 = 6

x = 6 – 5

x = 1- 7 = y – 2

7 + 2 = y

y = 9

**Addition of Matrices**

In matrix, the addition of matrices is the functioning of the addition of the two matrices by adding the corresponding elements together.

Condition for the addition of two matrices is:

The two matrices should be of the same order or size, that is the number of rows must be equal to the number of columns.

**Example:**

- Here matrices ‘A’ and ‘B’ can be added as they both are in 2×2 order,

- Further ‘A’ + ‘C’ cannot be added as they are not in the same order, matrix ‘A’ is of order 2×2 and matrix ‘C’ is of order 2×3.

**Subtraction of Matrices**

In matrix, the subtraction of matrices is the functioning of subtraction of the two matrices by subtracting the corresponding elements together.

Condition for the subtraction of two matrices is:

The two matrices should be of the same order or size, that is the number of rows must be equal to the number of columns.

**Example:**

Here the order on matrix ‘A’ and ‘B’ 2×2,

Subtracting corresponding elements

**Multiplying matrices by scalars**

In the scalar multiplication, each element of a matrix is multiplied by a scalar. Here we are referring scalar to the real numbers.

**Properties of multiplying matrices by scalars**

**Dimension Property**

If we multiply a matrix with a scalar the dimension of the matrix doesn’t change it remains the same as it is explained in the following example,

In the above example when we have multiplied the matrix of dimension 2×2 with the scalar 2, then the resultant matrix is also of dimension 2×2.

**Commutative Property**

Changing the order of the matrix to be multiplied does not change the result. While multiplying a matrix with the scalar, the order in which the factors are arranged in the multiplication does not make any difference in the result.

For example: let ‘a’ be the scalar and ‘A’ be the matrix

By this property, we understand that

**a.A = A.a**

**Example:**

**3.A = A.3**

**Associative Property**

Multiplication of a matrix is associative that is on multiplying a matrix with two scalars, the order of multiplication of the scalars and matrix will not change to result. Let ‘a’ and ‘b’ be the scalar and ‘X’ is the matrix then,

**(a.X).b = a.(X.b)**

**Example: a = 2, b = 7. and X be any 2×2 matrix**

**(a.X).b = a.(X.b)**

**Distributive property**

The distributive property of the matrices states that when the scalar in multiplied with matrices ‘A’ and ‘B’ and inclusion to multiplication other arithmetic operations are also applied such as addition or subtraction. We use the distributive property to clarify problems in which one of the factors in the scalar matrix multiplication is an addition or a subtraction.

**Example 1: **Let ‘a’ be the scalar and ‘A’ and ‘B’ be the matrices.

a.(A + B) = a.A + a.B

**a.(A+B) = a.A + a.B**

**Example 2: **If one of the operation in multiplication is addition of scalars, then the distributive property is given by

Let ‘a’ and ‘b’ be scalar and ‘A’ be the matrix.**(a+b).A = a.A +b.A**

Attention reader! Don’t stop learning now. Join the **First-Step-to-DSA Course for Class 9 to 12 students ****, **specifically designed to introduce data structures and algorithms to the class 9 to 12 students