Matrix Mechanics DUE 23 Feb
(1) Write a subroutine MATMULT(N1,N2,N3,A,B)

that multiplies matrix A by B: A(N1,N2) x B(N2,N3)

(2) Write a subroutine MATVEC(N,M,A,C)

that multiplies a matrix A(N,M) by the vector C(M)

(3) For examples that involve small matrices, check that this

works by writing a main program to call these subroutines, and

check the answers by hand.

(4)

(a) Successive random numbers can be generated using the built-in routine RAND

iseed = 123547

dum = rand(123547)

do i=1,10000

print*,rand(0)

end do

Use this approach to generate 10000 pairs of numbers X,Y randomly.

Plot these out to check they are uniformly distributed

(b)

Generate a 6x6 random matrix, invert it using the subroutine

MATINV and use matrix multiplication to confirm your

program is working.

(5) For a matrix A(N,N), write a program to determine the

transpose of the matrix, AT(N,N). Evaluate the product AT x A

and A x AT