home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e067 / 1.ddi / MATRIX.MTH < prev    next >
Encoding:
Text File  |  1988-11-02  |  1.4 KB  |  29 lines

  1. ; A transpose of a nonnumeric matrix
  2. [[a, b], [c, d]] `
  3. ; A determinant of a nonnumeric matrix
  4. DET [[a, b], [c, d]]
  5. ; Matrix addition
  6. [[a, b], [c, d]] + [[1, 0], [c, - d]]
  7. ; Use a dot for matrix multiplication
  8. [[a, b], [c, d]] . [[x], [y]]
  9. ; Matrix inverse
  10. [[a, b], [c, d]]^(-1)
  11. ; A matrix dotted with its inverse is an identity matrix
  12. [[a, b], [c, d]] . [[a, b], [c, d]]^(-1)
  13. ; Using an inverse matrix to solve the system  a x + b y = e,  c x + d y = f
  14. [[a, b], [c, d]]^(-1) . [[e], [f]]
  15. ; Try factoring this determinant
  16. DET [[1, a, a, a], [1, x, a, a], [1, a, x, a], [1, a, a, x]]
  17. ; Try factoring this determinant
  18. DET [[x, 1, 1, 1, 1], [1, x, 1, 1, 1], [1, 1, x, 1, 1], [1, 1, 1, x, 1], [1, 1, 1, 1, x]]
  19. ; Try factoring this determinant
  20. DET [[0, 1, 1, 1, 1], [1, 0, b, b, b], [1, a, 0, b, b], [1, a, a, 0, b], [1, a, a, a, 0]]
  21. ; Try factoring this determinant
  22. DET [[1, -1, 0, 0, 0], [x, h, -1, 0, 0], [x^2, h*x, h, -1, 0], [x^3, h * x^2, h*x, h, -1], [x^4, h * x^3, h * x^2, h*x, h]]
  23. ; Try factoring this determinant
  24. DET [[a, 1, 0, 0, 0, 0], [5, a, 2, 0, 0, 0], [0, 4, a, 3, 0, 0], [0, 0, 3, a, 4, 0], [0, 0, 0, 2, a, 5], [0, 0, 0, 0, 1, a]]
  25. ; Try factoring this determinant
  26. DET [[a, 0, 0, x, 0, 0], [0, b, 0, 0, y, 0], [0, 0, c, 0, 0, z], [u, 0, 0, d, 0, 0], [0, v, 0, 0, e, 0], [0, 0, w, 0, 0, f]]
  27. ;
  28. DET [[x^2 + 1, x, 0, 0, 0], [x, x^2 + 1, x, 0, 0], [0, x, x^2 + 1, x, 0], [0, 0, x, x^2 + 1, x], [0, 0, 0, x, x^2 + 1]]
  29.