Example 3: Multiplying Matrices

a.) Write a command to multiply the matrices G and H together.  This is a good chance to learn the functions: Array and Dimensions

$Post:=If[MatrixQ[#],MatrixForm[#],#]& 
G={{1,2,3},{4,5,6}}
H={{9,8,7,6},{5,4,3,2},{1,3,5,9}}
G.H

Find the number of columns in matrix G

n=Dimensions[G][[2]];

Write a function that gives the (((i,j))^th) element in the product

matrixmultiply[i_,j_]:=(∑_(k=1)^n)G[[i,k]]*H[[k,j]]

Check to make sure the it works for the (2,3) component

matrixmultiply[2,3]

Multiply using your new function and the Array command

Array[matrixmultiply,{2,4}]