পোস্টগুলি

LINEAR ALGEBRA (Part-6) - Norms

ছবি
LINEAR ALGEBRA (Part-6) Norms Norms Norm is used to measure the size/length/magnitude/distance of a vector. Like for example we know the Normal distance between two points x 1 =2 and x 2 =4 is x 2 -x 1 =4-2=2 Another example is the Euclidean distance between two points x 1 =2 and x 2 =4 is √(4-2) 2 =2 In general Norm is written by L P norm = ||x|| p = (∑|x i | p ) 1/p Where p = 1 or 2 L 1 Norm The L 1 norm is calculated as the sum of the absolute vector values. Let's put 1 in the above general norm equation. Here p=1 as L 1 Norm. ||x|| p = (∑|x i | p ) 1/p ||x|| 1 = (∑|x i | 1 ) 1/1 ||x|| 1 = ∑|x i | So it is just the sum of the absolute vector values. consider vector v = [1 -2 6] ||v|| 1 = |1| + |-2| + |6| = 1+2+6 = 9 L 2 Norm It is also called Euclidean norm. The L 2 norm is calculated as root over of the sum of the squared vector values. Let's put 2 in the above general norm equation.

LINEAR ALGEBRA (Part-5) - Linear Dependence

ছবি
LINEAR ALGEBRA (Part-5) Linear Dependence Coefficient It is a scalar number used to multiply a variable. Like 6z means 6 times z, and "z" is a variable, so 6 is a coefficient. Linear Combination If we take a set of matrices then multiply each of them by a scalar/coefficient and add all of them together then the resultant matrix is a linear combination of the set of matrices. Note that all the matrices involved in a linear combination need to have the same dimension (otherwise matrix addition would not be possible). Let's consider n number of matrices A 1 ,A 2 ,......,A n . all has same dimensions. Lets also consider n scalars/coefficients α 1 ,α 2 ,......,α n So, linear combination B will be B = α 1 A 1 + α 2 A 2 + ...... + α n A n Let's see few ways of calculation linear Combination / coefficients. Way 1 Holding the equation, B = α 1 A 1 + α 2 A 2 + ...... + α n A n . We consider n=2, α 1 =2, α 2 =-1 and

LINEAR ALGEBRA (Part-4) - Identity and Inverse Matrices

ছবি
LINEAR ALGEBRA (Part-4) Identity and Inverse Matrices Identity Matrix It is a square matrix that do not change any matrix or vector when multiplied with. Means If a matrix A 2,2 is multiplied by identity matrix I 2,2 then the result will be A 2,2 . So, A 2,2 ❌ I 2,2 = A 2,2 A 2,2 = [           I 2,2 = [           A 2,2 = [             A 2,2 = [         2 3   ❌       1 0   =       2❌1 ➕ 3❌0   2❌0 ➕ 3❌1   =       2 3     5 4           0 1           5❌1 ➕ 4❌0   5❌0 ➕ 4❌1           5 4   ]             ]             ]               ]       Identity matrix looks like above I 2,2 . Where diagonally all values are 1 and rest are 0. Identity matrix is a square matrix so its row and column are always same. Like I 2,2 , I 4,4 , I 6,6 , I 3,3 etc. Matrix Inverse Matrix inverse is a bit complex. Don't worry we will not use this a lot. But we need it to verify some property. We will not go deep into inverse matrix. You can learn that in source (

LINEAR ALGEBRA (Part-3) - Useful Properties

ছবি
LINEAR ALGEBRA (Part-3) Useful Properties Information Below, we will see some properties of Matrix. Remember there are many more then listed. Property 1 A(B + C) = AB + AC Property 2 A(BC) = (AB)C Property 3 A(BC) = (AB)C Property 4 AB ≠ BA For some cases AB = BA is true. But not for all. Property 5 A T B = B T A Property 6 (AB) T = B T A T Property 7 A T B = (A T B) T = B T A Property 8 A ❌ b = c The multiplication of a matrix and a vector results in a vector. Let's consider 3X2 matrix A and 2X1 vector b. So A ❌ b will result in 3X1 vector c. see below A 3,2 =  [           b 2,1 = [         c 3,1 = [         c 3,1 = [       1  3            4           1❌4 ➕ 3❌5           19     2  1    .       5   =       2❌4 ➕ 1❌5   =       13     3  2          ]             3❌4 ➕ 2❌5           22    ]                         ]           ]   Remember the reverse will also hold. means consider 1X2 vector b and

LINEAR ALGEBRA (Part-2) - Multiplying Matrices

ছবি
LINEAR ALGEBRA (Part-2) Multiplying Matrices Standard Calculation We can add, subtract, divide or multiply a matrix with a scalar value. These operations will be element wise. Let's consider a 3✖2 Matrix A 3,2 . See below. A 3,2 = [                                     1 2                                     2 3                                     3 1                                     ]                                     Let's add a scalar value 5 with it. A 3,2 = [ A 3,2 = [  A 3,2 = [ 1 2 5✚1  5✚2  6 7 5 ✚ 2 3 =  5✚2 5✚3  = 7 8 3 1 5✚3  5✚1  8 6 ] ]  ] Let's subtract a scalar value 5 with it. A 3,2 = [ A 3,2 = [  A 3,2 = [ 1 2 5➖1  5➖2  4 3 5 ➖ 2 3 =  5➖2 5➖3  = 3 2 3 1 5➖3  5➖1  2 4 ] ]  ] Let's multiply a scalar value 5 with it. A 3,2 = [ A 3,2 = [  A 3,2 = [ 1 2 5❌1  5❌2  5 10 5 ❌ 2 3 = 5❌2 5❌3  = 10 15 3 1 5❌3  5❌1  15 5 ] ]  ] Let's divide a scalar value 5 with it. A 3,2 = [ A 3,2

LINEAR ALGEBRA (Part-1) - Scalars, Vectors, Matrices and Tensors

ছবি
LINEAR ALGEBRA (Part-1) Scalars, Vectors, Matrices and Tensors Scalars Scalars are a single number. like 5 or 8 or 9 etc. you can say age=23 here 23 is a scalar value. Vectors Vectors are a series/array of elements. They are represented between a square bracket with spaces. Like below. ages = [    23    25    33    54 ] Here, [    23    25    33    54 ] is a Column Vector of ages. The Row Vector of ages will look like ages = [23 25 33 54] each element of a vector can be represented by a subscript number like ages 1 =23 or ages 3 =33 etc. the numbers of a vector do not have to be of same thing like. box = [    2    4    8    "wood" ] here the box vector represents, box 1 = height = 2 inch box 2 = width = 4 inch box 3 = weight = 8 gram box 4 = made of = wood Matrix Matrix is a 2D array of elements. Like below. box = [    2    3    2    4    4    4    5    2    8    12    5

What Is derivative? (Part - 1)

ছবি
What Is derivative? (Part - 1) Derivative is a simple thing. It’s just the difference of a variable. But how? Think of time, let a person started a journey towards bus stand at time t1 = 3 and reached at t2 = 7. In this case the derivative dt = t2-t1 = 7-3 = 4. Easy! But in real life things are not that easy. Because we have do derive the difference of a variable with respect to another variable unlike our time example where there was only one variable. For example we can see the equation y = x. Here we have to find the difference in y with respect to the change in variable x. In other word we have to find the derivative of y with respect to x which is dy/dx. Fortunately for us this is very easy. Pretty easy right. But we are going to prove it so that we can use the same theory to prove more complex derivatives. So we are going to plot this function into graph. Let’s find some value of x and values of y for the respective value of x below.