? Linear Algebra Toolkit ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Linear Algebra Toolkit

Submitted
Updated
Author
Simeon
Public Key
QD44J3
Min. Compat.
All
Version
1.0
Size
94.4KB
Rating
4 votes
Description Solve linear systems of equations and compute inverses, while also showing your work. This is an upgrade of the famous http://www.math.odu.edu/~bogacki/cgi-bin/lat.cgi?c=rref It also contains some other extra programs, that I thought could be uploaded too as a bonus. So, enjoy. This update uses artificial modulus and divide functions so that the overflow error doesn't happen, it now supports arbitrarily large dataset operations, as well as some other new features such as computing the determinant. Instructions Use the circle pad, and other buttons including L and R to navigate. Use the touch screen for everything else. Say you want to solve: 1x + 3y - 2z = 5 3x + 5y + 6z = 7 2x + 4y + 3z = 8 You can use substitution and elimination like highschool teachers teach... or more elegantly input them into a matrix: 1 3 -2 5 3 5 6 7 2 4 3 8 And convert it to Reduced Row Echelon Form (RREF): 1 0 0 -15 0 1 0 8 0 0 1 2 And now you can see that: x = -15 y = 8 z = 2 Let's test that these values are correct by plugging them in: 1(-15) + 3(8) - 2(2) = 5 True 3(-15) + 5(8) + 6(2) = 7 True 2(-15) + 4(8) + 3(2) = 8 True Similarly, we can compute the inverse by concatenating an identity matrix to the end: 1 3 -2 1 0 0 3 5 6 0 1 0 2 4 3 0 0 1 Convert to RREF: 1 0 0 9/4 17/4 -7 0 1 0 -3/4 -7/4 3 0 0 1 -1/2 -1/2 1 And now the inverse is on the right side. Multiplying the original array by it's inverse will return an identity matrix, i.e. 1 0 0 0 1 0 0 0 1 Multiplying the inverse by the three output values: 5, 7, 8, will return the answers: -15, 8, 2. If you need any homework help, comment below, and I may or may not help you :)
Categories
Keywords
  • math
2 Comment(s) spaceturtles spaceturtles Video Games I like to play video games! Hobbies Avatar Block I didn't change my avatar for 30 days. Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Nice, something I can use for my math tests! Super_Defaultio Super_Defaultio Video Games I like to play video games! Hobbies Day Person I like the warm sunshine and wake up early! Express Yourself Zelda Is Awesome! I love The Legend Of Zelda! Express Yourself Wow, this is pretty neat! It's like, some sort of advanced calculator for Linear Algebra or something!