# Math for AI Class 11 Notes

Teachers and Examiners (CBSESkillEduction) collaborated to create the Math for AI Class 11 Notes. All the important Information are taken from the NCERT Textbook Artificial Intelligence (417).

Contents

## Math for AI Class 11 Notes

### Introduction to Matrices

A matrix is a set of numbers arranged in rows and columns. or A rectangular grid of numbers organised into rows and columns is known as a matrix.  We know that computers only understand numbers (binary, hexadecimal, etc.), Matrices help to store the image pixel in the row and column wise format.

Example of AI Matrix –

The mathematics of data is frequently referred to as matrix (or linear algebra). This subject is suggested as a requirement before beginning the study of artificial intelligence because it is arguably the foundation of that field.

Terminology related to Matrices
1. Order of matrix – If a matrix has 3 rows and 4 columns, order of the matrix is 3*4 i.e. row*column
2. Square matrix – The matrix in which the number of rows is equal to the number of columns
3. Diagonal matrix – A matrix in which all the non-diagonal elements equal to 0 is called a diagonal matrix
4. Upper triangular matrix – Square matrix where all the elements below the diagonal is equal to 0
5. Lower triangular matrix – Square matrix where all the elements above the diagonal equal to 0
6. Scalar matrix – Square matrix where all the diagonal elements equal to some constant k
7. Identity matrix – Square matrix where all the diagonal elements equal to 1 and all the nondiagonal elements equal to 0
8. Column matrix – The matrix which consists of only 1 column. Sometimes, it is used to represent a vector.
9. Row matrix – A matrix consisting only of row.
10. Trace – It is the sum of all the diagonal elements of a square matrix.

Math for AI Class 11 Notes

#### How do you define a Matrix?

When we represent a set of numbers in the form of ‘M’ horizontal line (called rows) and ‘N’ vertical line (called columns), this arrangement is called m x n (m by n) matrix.

Example =

If A =

| 1 2 3 |
| 4 5 6 |
| 7 8 9 |

Math for AI Class 11 Notes

#### Types of Matrix

1. Row Matrix – Matrix with only one row.
A = [1 3 -5]

2. Column Matrix – Matrix with only one column.

3. Square Matrix: A matrix in which number of rows are equal to number of columns.

Rows = 3 and Column = 3, so this is square matrix.

4. Diagonal Matrix: A matrix with all elements zero except its leading diagonal.

5. Scalar Matrix: A matrix in which all the diagonal elements are equal and all other elements are zero.

And if all diagonal element is unity (1) and all other non-diagonal element is equal to
zero, this matrix is called Unit matrix.

Math for AI Class 11 Notes

### Matrix Operations

#### Transpose Matrix

Transpose of a matrix creates a new matrix with number of rows and columns flipped This is denoted by the superscript T next to the matrix AT

#### Determinant

Every square matrix can be expressed using a number which is known as it determinant. If A = [aif] is a square matrix of order n, then determinant of A is denoted by det A or |𝐴| .

Math for AI Class 11 Notes

### Vector and Vector Arithmetic

The foundation of linear algebra is the vector. In the description of algorithms and procedures, such as the target variable (y) when training an algorithm, vectors are widely employed in the field of machine learning.

#### What is Vector?

While the one-dimensional array expression in brackets is a column vector or just a vector, the two-dimensional array expression enclosed in brackets is a matrix.

We begin by defining a vector, a set of n numbers which we shall write in the form

Math for AI Class 11 Notes

### Vector Arithmetic

Vectors of equal length can be added to create a new vector
x = y + z
The new vector has the same length as the other two.

#### Vector Subtraction

Vector of unequal length can be subtracted from another vector of equal length to create a new third vector.
x = x − y
As with addition, the new vector has the same length as the parent vectors and each element of the new vector is calculated as the subtraction of the elements at the same indices.

#### Vector Multiplication

If we perform a scaler multiplication, there is only one type operation – multiply the scaler with a scaler and obtain a scaler result,
a x b = c
But vector has a different story, there are two different kinds of multiplication – the one in which the result of the product is scaler and the other where the result of product is vector (there is third one also which gives tensor result, but out of scope for now)
To begin, let’s represent vectors as column vectors. We’ll define the vectors A and B as the column vectors

Physical quantities are of two types:

Scaler: Which has only magnitude, no direction.
Vector: Which has both in it – magnitude and direction.

#### Matrix and Matrix Arithmetic

A and B are two matrices of order m x n, which means they each have m rows and n columns. By adding the relevant elements from A and B, they can be combined to form a matrices of order m x n.

#### Multiplication of a matrix by a scalar

Let A = [a if] be an m x n matrix and K be any number called a scalar. Then matrix obtained by
multiplying scalar K is denote by K A

#### Multiplication of Matrices

Two matrices with the same size can be multiplied together, and this is often called elementwise matrix multiplication
Two matrices A and B can be multiplied (for the product AB) if the number of columns in A (Pre- multiplier) is same as the number of rows in B (Post multiplier).

Now we use to multiply them A and B matrix as

(first row of A) X First column of B
(first Row of A) X second column of B
(second row of A) X (first column of B)
(second row of A) X (second column of B)