https://github.com/developermindset123/linear-algebra-discord-bot
Discord Bot to solve linear algebra problems.
https://github.com/developermindset123/linear-algebra-discord-bot
discordjs-bot javascript linear-algebra mathematics nodejs
Last synced: about 1 month ago
JSON representation
Discord Bot to solve linear algebra problems.
- Host: GitHub
- URL: https://github.com/developermindset123/linear-algebra-discord-bot
- Owner: DeveloperMindset123
- Created: 2024-06-28T15:54:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-21T17:33:20.000Z (over 1 year ago)
- Last Synced: 2025-06-13T04:05:46.898Z (12 months ago)
- Topics: discordjs-bot, javascript, linear-algebra, mathematics, nodejs
- Language: JavaScript
- Homepage: https://discord.com/oauth2/authorize?client_id=1256271496955822112
- Size: 283 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Linear Algebra Discord Bot
A discord bot capable of performing calculations ranging from Matrix arithemtics to Singular Value Decomposition. Topics covered are the topics that a student would see taking Linear Algebra as an undergraduate course. Although majority of the calculations was implemented using MathJs's API to simplify the mathematical implementation, some commands required direct mathematical logic from scaratch. Additionally implemented explanations and reference links upon both success/failure of command execution as well as logic for how to properly handle unsuccessful command execution.
Check It Out
Following Are Links for Contact, to report Bugs and if you would like a new feature:
Email: Dasa60196@gmail.com
Discord: the1sand0s
### Built With
* 
* 
* 
* 
* 
* 
* 
## Getting Started
If you would like to locally run the project, please follow the instructions below
### Prerequisites
Ensure that npm's version is up to date (NOTE : Your not limited to npm only).
* npm
```sh
npm install npm@latest -g
```
### Installation
1. Setup your bot and retrieve it's token following the guide and add the server to a server for testing [Setup Instructions](https://discordjs.guide/preparations/setting-up-a-bot-application.html)
2. Clone the repo
```sh
git clone https://github.com/DeveloperMindset123/Linear-Algebra-Discord-Bot.git
```
3. Install the packages
```sh
npm install || yarn install || pnpm install || bun install
```
4. Enter your API in `config.json`
```json
{
"token" : "YOUR_DISCORD_BOT_TOKEN",
"testServer" : "ID_OF_THE_SERVER_WHERE_YOU_ADDED_THE_BOT",
"clientID" : "DISOCRD_CLIENT_ID",
"guildId" : "SAME_AS_TEST_SERVER",
"devs" : ["YOUR_PROFILE_ID", "ADDITIONAL_CONTRIBUTORS_ID", "..."]
}
```
5. Change git remote url to avoid accidental pushes to base project
```sh
git remote set-url origin github_username/repo_name
git remote -v # confirm the changes
```
## Example Of How To Use Commands
HINT: Matrix should be represented using 2D arrays for the input (such as [[8-4,7],[4,6,9],[3,-2,-8]], and vectors should be represented using 1d arrays, such as [2,1,-2]). Each vectors should be represented within the 2D array as a 1D array when speciyfing the matrix, apologies for the inconvenience as that is the most straightforward way I could think of for user inputs to execute the commands as needed.
HINT:
If command fails to execute, there's also a link to the original reference, I have also provided instruction on the embeddings for what to do in the instance that command were to fail.
## Roadmap
- [x] Matrix Addition/Subtraction
- [x] Scalar and Matrix Multiplication
- [x] Determining the determinant of a matrix
- [x] Determining the inverse of a matrix
- [x] Determining the eigenvalues and eigenvectors of a given matrix
- [x] Gaussian Elimination
- [x] Determining Linear Independence and Dependence
- [x] Determining coordinates of a x-vector given the basis matrix B
- [x] Determining the x-vector given the coordinates of the vector and the basis Matrix B
- [x] Orthogonal Projection, Orthonormal Bases and Gram-Schmidt
- [x] Singular values and Diagonalization of Matrix
- [x] Angle Between Two Vectors
- [x] QR Decomposition and SVD Decomposition
- [x] Deployed on Google Cloud's VM instance for 24/7 Access on-demand
## Future Integrations
- [ ] Write tests for all commands to handle all unforseen edge cases using Jest
- [ ] Floating/Double/Decimal variables converted to equal fraction counterparts.
Below are demos of few of the commands to get a general idea of how they can be used:
https://github.com/user-attachments/assets/8f071d4c-c317-4fc4-817c-4bfe81780523
https://github.com/user-attachments/assets/112144a6-d62b-4fd9-a991-309879497e7f
https://github.com/user-attachments/assets/936685e2-5cb1-4d41-8915-514358e92f82
https://github.com/user-attachments/assets/b5e74948-1a0a-4912-8b4a-21ca0a0174b1
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License
Distributed under the MIT License.
[contributors-shield]: https://img.shields.io/github/contributors/github_username/repo_name.svg?style=for-the-badge
[contributors-url]: https://github.com/github_username/repo_name/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/github_username/repo_name.svg?style=for-the-badge
[forks-url]: https://github.com/github_username/repo_name/network/members
[stars-shield]: https://img.shields.io/github/stars/github_username/repo_name.svg?style=for-the-badge
[stars-url]: https://github.com/github_username/repo_name/stargazers
[issues-shield]: https://img.shields.io/github/issues/github_username/repo_name.svg?style=for-the-badge
[issues-url]: https://github.com/github_username/repo_name/issues
[license-shield]: https://img.shields.io/github/license/github_username/repo_name.svg?style=for-the-badge
[license-url]: https://github.com/github_username/repo_name/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/linkedin_username
[product-screenshot]: images/screenshot.png
[Next.js]: https://img.shields.io/badge/next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white
[Next-url]: https://nextjs.org/
[React.js]: https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB
[React-url]: https://reactjs.org/
[Vue.js]: https://img.shields.io/badge/Vue.js-35495E?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D
[Vue-url]: https://vuejs.org/
[Angular.io]: https://img.shields.io/badge/Angular-DD0031?style=for-the-badge&logo=angular&logoColor=white
[Angular-url]: https://angular.io/
[Svelte.dev]: https://img.shields.io/badge/Svelte-4A4A55?style=for-the-badge&logo=svelte&logoColor=FF3E00
[Svelte-url]: https://svelte.dev/
[Laravel.com]: https://img.shields.io/badge/Laravel-FF2D20?style=for-the-badge&logo=laravel&logoColor=white
[Laravel-url]: https://laravel.com
[Bootstrap.com]: https://img.shields.io/badge/Bootstrap-563D7C?style=for-the-badge&logo=bootstrap&logoColor=white
[Bootstrap-url]: https://getbootstrap.com
[JQuery.com]: https://img.shields.io/badge/jQuery-0769AD?style=for-the-badge&logo=jquery&logoColor=white
[JQuery-url]: https://jquery.com