Physics 385 midterm one
Here is the matrix for the first assignment.
hodge:bland% /u5/idl/bin/idl
IDL. Version 3.6.1a (sunos sparc).
Copyright 1989-1994, Research Systems, Inc.
All rights reserved.  Unauthorized reproduction prohibited.
Installation number: 2387-3.
Licensed for use by: UC Berkeley Center for Astrophysics
 
IDL> a=[[1,2,1,3,4],[2,1,9,4,3],[3,2,9,7,3],[1,0,2,0,1],[2,0,0,1,1]]
IDL> print, a
       1       2       1       3       4
       2       1       9       4       3
       3       2       9       7       3
       1       0       2       0       1
       2       0       0       1       1
IDL> c=[[2],[1],[7],[9],[3]] 
IDL> print,c
       2
       1
       7
       9
       3
IDL> d=c#a
IDL> print,d
          50
         113
         143
          19
          16
IDL> at = transpose (a)
IDL> print,at
       1       2       3       1       2
       2       1       2       0       0
       1       9       9       2       0
       3       4       7       0       1
       4       3       3       1       1
IDL> ct = transpose (c)
IDL> print,c
       2
       1
       7
       9
       3
IDL> at = transpose (a)
IDL> print,at
       1       2       3       1       2
       2       1       2       0       0
       1       9       9       2       0
       3       4       7       0       1
       4       3       3       1       1
IDL> ct = transpose (c)
IDL> print,c
       2
       1
       7
       9
       3
IDL> e=ct#at
IDL> print,e
          40
          19
          92
          62
          44
IDL> adot=a*c   $<3>
IDL> cdot=c*a   $<3>
IDL> atdot=at*ct$<3>
IDL> ctdot=ct*at$<3>
IDL> print,adot 
       2
       2
       7
      27
      12
IDL> print,cdot
       2
       2
       7
      27
      12
IDL> print,atdot
       2       2      21       9       6
IDL> print,ctdot
       2       2      21       9       6
IDL> print,ct
       2       1       7       9       3
IDL> ia=invert(a) 
IDL> print,ia
    -0.102041    -0.734694     0.469388      1.24490   -0.0408162
     0.163265     -2.22449      1.44898      3.40816     -1.73469
   -0.0612245   -0.0408163    0.0816327     0.346939    -0.224490
   -0.0204082     0.653061    -0.306122     -1.55102     0.591837
     0.224490     0.816326    -0.632653    -0.938775     0.489796