"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

August 13, 2015

Matrix and Determinants (Basics)

Back to School and basics. These posts are for my on-line references.

Matrix
  • Rectangular Array of Numbers in rows and columns
  • Example - [5,2,-3]
  • Order of Matrix is represented as Rows X Columns
Types of Matrices
  • Row matrix (1 Row, any number of columns)
  • Column matrix (1 Column, Multiple Rows)
  • Diagonal matrix (Square matrix, Except diagonal elements every other elements are 0)
  • Scalar matrix (Square matrix & Diagonal matrix in which all diagonal elements are same)
  • Identity matrix - Denoted by I - Diagonal Elements are 1 (Square & Diagonal Matrix)
  • Transpose of matrix - Matrix where rows and columns are interchanged
        [ 1, 1, 1 ]
A  = [ 2, 2, 2 ]
        [ 3, 3, 3 ]

Transpose is

A' =   [ 1, 2, 3 ]
          [ 1, 2, 3 ]
         [ 1, 2, 3 ]

Addition of Matrices
  • They should be of same order
  • Add Corresponding elements

A =   [2,3,5]
         [5,7,-2]
        [5,3,0]

B =    [7,-1,5]
          [0,2,3]
         [7,5,2]

Result ( Add Corresponding elements in same positions)

A + B =     [9,2,10]
         [5,9,1]
               [12,8,2]

Subtraction (similar to addition)
  • Order needs to match
A = [7,-2]
       [0,3]

B = [0,2]
[3,5]

A - B = [7,-4]
          [-3,-2]

Scalar Multiplication
  • Multiplying constant with a Matrix
  • Every Element of Matrix Multipled
c = [3,5]
[-2,-10]

-2c =  [-6,-10]
  [4,20]

Matrix Multiplication
  • A (m x n)
  • B (n x p)
  • Columns in a (n) = Number of Rows in B (n)
A = [3,5]
[7,2]
[2,3]

B = [-2,5]
[3,7]

AB = Operate First Row (Operate) Multiple with First Coulmn

A = [3,5] --->
[7,2]
[2,3]

Select Column 
B = [-2,5] 
[3,7]  

  = [ 3 X -2 + 5 X 3,  3 X 5 + 5 X 7 ]
[ 7 X -2 + 2 X 3,  7 X 5 + 2 X 7 ]
[ 2 X -2 + 3 X 3,  2 X 5 + 3 X 7 ]

 = [9,50]
[-8,49]
[5,31]

Matrix Multiplication is not commutative

Determinant of Square Matrix
+  -
A = [5,6]
[3,-4]

|A| = [Multiply Principal Diagonal Elements ] - [Subtract the Next Diagonal Elements]
= (5 X -4) - (3 X 6)
      = -20 - 18
      = -38

Determinant of 3 X 3 Matrix
        +,-,+
A =  [3,-2,1]
       [2,3,4]
       [2,5,4]

= +3 X [3,4] - (-2) X [2,4] + 1 X [2,3]
                  [5,4]               [2,4]           [2,5]

= 3(12-20) + 2 (8-8) + 1(10-6)
       = -24 + 0 + 4
       = -20

References - Link

Happy Learning!!!

No comments: