A=rand(1:3,4,6)
B=rand(1:3,7,8)
A*B # matmul only works if A is m x n and B is n x p
B=rand(1:3,6,8)
A*B
A[3,:]
B[:,4]
A[3,:]*B[:,4]
[A*B[:,1] A*B[:,2] A*B[:,3] A*B[:,4] A*B[:,5] A*B[:,6] A*B[:,7] A*B[:,8]]
A*B # Every column of A*B is some linear combination of columns of A
[ A[1,:]*B; A[2,:]*B; A[3,:]*B; A[4,:]*B]
A[1,:] % 3 x first row of B + 3 * 2nd row + 1* 3rd row + etc.
v=rand(5,1); w=rand(1,5)
v*w;w*v
[1:12]*[1:12]' # Outer Products (recognize the 3rd grade mult table)
A*B
A[:,1]*B[1,:] + A[:,2]*B[2,:] + A[:,3]*B[3,:] + A[:,4]*B[4,:]+A[:,5]*B[5,:]+A[:,6]*B[6,:]
A*B
A
B
A[1:2,1:2]*B[1:2,1:2] + A[1:2,3:4]*B[3:4,1:2]+ A[1:2,5:6]*B[5:6,1:2]
A*B
A[3:4,1:2]*B[1:2,1:2] + A[3:4,3:4]*B[3:4,1:2]+ A[3:4,5:6]*B[5:6,1:2]
A[3:4,1:2]*B[1:2,5:6] + A[3:4,3:4]*B[3:4,5:6]+ A[3:4,5:6]*B[5:6,5:6
]
A= rand(3,4)
eye(4)
A=rand(1:3,3,3)
inv(A)
B=ans
A*B
B*A
2.0^(-52)