Course: CSCI 1900

Matrix

  • A matrix is rectangular array of numbers
  • 𝑚 rows by 𝑛 columns → 𝑚×𝑛 matrix
    • ðī=[142536]→2×3

Reading a Matrix

  • ðĩ=[387513]
  • Elements are identified as ðĩrow,column
    • ðĩ2,2→5

Matrix Laws

Adding/Subtracting Matrices

  • Must have the same dimensions
  • [1324]+[5768]=[1+53+72+64+8]→[610812]

Dot Product of Vectors

  • The sum of the element-wise multiplication
  • [1234]⋅[[[5678]]]=1×5+2×6+3×7+4×8→70

Multiplying a Matrix and Vector

  • Numbers of columns in the matrix must be the number of rows in the vector
  • [142536]×[789]=[1×7+2×8+3×94×7+5×8+6×9]→[50122]

Multiplying Two Matrices

  • Rows of ðī must equal columns of ðĩ
  • (ðī×ðĩ)𝑖,𝑗=∑𝑛𝑘=1ðī𝑖,𝑘×ðĩ𝑘,𝑗
  • [142536]×[791181012]=[1×7+2×9+3×114×7+5×9+6×111×8+2×10+3×124×8+5×10+6×12]→[5813964154]

Identity Matrix

  • Identity matrix 𝐞 acts as 1 in multiplication
  • Anything times 𝐞 is itself

Transposition/Rotating

  • Swap rows and columns
  • [135246]𝑇=[123456]