{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

WI08Session 2inverses -Jan16

WI08Session 2inverses -Jan16 - mma2 Mathematica Session 2...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
mma2.txt Mathematica Session 2 Math 1b January 16, 2009 On the next page, we calculate the inverse of a "random" 5 by 5 matrix. On the following pages, we try to find a nonnegative solution to a system of linear equations Ax = b . We fail. But by carrying along an identity matrix in our computations, we produce a vector y so that yA >= 0 but yb < 0 . Page 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
rand @ m _ , n _ D : = Table @ RandomInteger @ 10 D , 8 i, m < , 8 j, n <D AA = A = rand @ 5, 5 D ; MatrixForm @ A D 8 10 8 4 5 8 1 6 4 7 3 10 6 4 9 10 1 3 8 2 2 0 5 5 4 Do @ AA @@ i DD = Join @ AA @@ i DD , IdentityMatrix @ 5 [email protected]@ i DD D , 8 i, 5 <D ; MatrixForm @ AA D 8 10 8 4 5 1 0 0 0 0 8 1 6 4 7 0 1 0 0 0 3 10 6 4 9 0 0 1 0 0 10 1 3 8 2 0 0 0 1 0 2 0 5 5 4 0 0 0 0 1 AA = RowReduce @ AA D ; MatrixForm @ AA D 1 0 0 0 0 389 16 115 1538 16 115 611 16 115 62 1465 2144 16 115 0 1 0 0 0 711 16 115 1373 16 115 996 16 115 38 1465 936 16 115 0 0 1 0 0 2631 16 115 87 16 115 2434 16 115 187 1465 3064 16 115 0 0 0 1 0 201 3223 455 3223 208 3223 35 293 387 3223 0 0 0 0 1 2227 16 115 1966 16 115 2048 16 115 16 1465 1148 16 115 B = AA @@ 8 1, 2, 3, 4, 5 < , 8 6, 7, 8, 9, 10 <DD ; MatrixForm @ B D 389 16 115 1538 16 115 611 16 115 62 1465 2144 16 115 711 16 115 1373 16 115 996 16 115 38 1465 936 16 115 2631 16 115 87 16 115 2434 16 115 187 1465 3064 16 115 201 3223 455 3223 208 3223 35 293 387 3223
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}