35. Matrices

𝑚×𝑛 matrix 𝑨

𝑨=[𝑎11𝑎12𝑎1𝑛𝑎21𝑎22𝑎2𝑛𝑎𝑚1𝑎𝑚2𝑎𝑚𝑛]

35.1. Matrix-Vector Products

𝑨=[𝑎11𝑎12𝑎1𝑛𝑎21𝑎22𝑎2𝑛𝑎𝑚1𝑎𝑚2𝑎𝑚𝑛]𝐱=[𝑥1𝑥2𝑥𝑛]𝑨𝐱=[𝑎11𝑥1+𝑎12𝑥2++𝑎1𝑛𝑥𝑛𝑎21𝑥1+𝑎22𝑥2++𝑎2𝑛𝑥𝑛𝑎𝑚1𝑥1+𝑎𝑚2𝑥2++𝑎𝑚𝑛𝑥𝑛]=[𝑏1𝑏2𝑏𝑛]

For the dot product to be defined, the number of columns in the matrix 𝑨 (which is 𝑛) must match the number of elements in the vector 𝑥 (also 𝑛).

The result of multiplying matrix 𝑨 and vector 𝑥 will be a column vector with dimensions 𝑚×1, where 𝑚 is the number of rows in the matrix 𝑨

(𝑚×𝑛)(𝑛×1)=𝑚×1
  1. As Row vectors
𝐚=[𝑎1𝑎2𝑎𝑛]𝐛=[𝑏1𝑏2𝑏𝑛]𝐚𝑇=[𝑎1,𝑎2,,𝑎𝑛]𝐛𝑇=[𝑏1,𝑏2,,𝑏𝑛]𝑨=[[𝑎1,𝑎2,,𝑎𝑛][𝑏1,𝑏2,,𝑏𝑛]]𝑨=[𝐚𝐛]𝐱=[𝑥1𝑥2𝑥𝑛][𝐚𝑇𝐛𝑇]𝐱=[𝐚𝐱𝐛𝐱]
  1. As Column Vectors
𝑎=[𝑎1𝑎2𝑎𝑛]𝑏=[𝑏1𝑏2𝑏𝑛]𝑨=[[𝑎1𝑎2𝑎𝑛][𝑏1𝑏2𝑏𝑛]]𝑨=[𝑎𝑏]𝑥=[𝑥1𝑥2]𝑨𝑥=𝑥1𝑎+𝑥2𝑏