All projects

Coursework · Sep 2023 to Oct 2023

Chuakz: Matrix Calculator

My first Informatics group project, where regression, determinants, and image scaling taught us Java along the way.

My contribution

Regression, determinants, integration, and I/O, team of 3

Chuakz: Matrix Calculator screenshot 1
1 / 3

Our first group assignment in Informatics

This was my first group assignment after officially entering the Informatics major at ITB. Our team called itself Chuakz, simply because the word was trending at the time.

That ordinary name ended up attached to a very important project for me. It was our introduction to the pace, collaboration, and technical expectations of Informatics coursework after two semesters of general engineering.

None of us had used Java before. We were learning a new language and programming style while also implementing linear-system solvers, determinants, inverses, interpolation, regression, bicubic splines, and file-based input and output.

The mathematics was already substantial, but the unfamiliar language made every feature more challenging. This was not a small exercise completed after learning Java. Learning Java was part of completing the exercise.

The parts I wanted to connect

My main contributions were multiple linear regression, Cramer’s rule, cofactor determinants, input validation, file output, and integration work across the application.

I naturally enjoyed integration because it gave me a reason to understand what my teammates had built. Connecting the features into one usable program meant learning their assumptions, data formats, and mathematical logic instead of treating their modules as black boxes.

Multiple linear regression was my favorite part. I already found it fascinating that simple linear regression could be calculated by hand. This project generalized the same idea so a computer could work with several variables and a much larger system.

Understanding the normal-equation transformation was a little difficult, but I enjoyed mathematics at the time, so the difficulty felt rewarding. Seeing the program predict nitrous oxide concentration from humidity, pressure, and temperature made the abstraction feel complete.

β=(X⊤X)−1X⊤y\beta = \left(X^{\top} X\right)^{-1} X^{\top} y
The normal equation expresses the regression coefficients as a linear algebra problem.

The beautiful recursive method that would not finish

Implementing determinant expansion through cofactors made recursion feel concrete. The definition translated naturally into code: choose an element, construct its smaller submatrix, and recursively calculate the next determinant.

It was elegant, but testing larger matrices took a painfully long time. The recursive tree grew rapidly, turning a mathematically beautiful implementation into an early lesson about computational cost.

I never liked solving matrices through row reduction by hand. The row swaps and elimination steps were tedious and easy to get wrong. Yet the same method that felt unpleasant on paper was fast and efficient for a computer, even if developing it correctly was harder.

Cramer’s rule created the opposite impression. It was elegant to describe, but repeatedly calculating determinants made it expensive. Seeing those approaches beside each other was eye-opening: two correct algorithms for the same problem can have dramatically different running times.

det⁡(A)=∑j(−1)1+j a1jdet⁡ ⁣(M1j)\det(A) = \sum_{j} (-1)^{1+j}\, a_{1j} \det\!\left(M_{1j}\right)
Cofactor expansion is concise mathematically, but recursively repeats many smaller determinant calculations.

The difficult cases mattered most

Parametric solutions were probably the hardest case because we had only recently learned how they worked. The program had to return relationships between variables instead of a neat list of final numbers.

Hilbert matrices were another difficult test because floating-point precision made seemingly simple calculations fragile. They reminded us that translating mathematics into software also means confronting the limits of numerical representation.

The bonus applied bicubic spline interpolation to image scaling. Seeing the same matrix operations produce a visibly resized image was phenomenal. It turned the project from a collection of terminal calculations into something we could immediately see.

Submitting everything was the most satisfying moment. We earned a score above 100 because we completed the bonus. More importantly, we had survived our first Informatics group project while still learning how quickly assignments moved and how early a team needed to manage its time.

This project taught me that mathematical notation does not become reliable software automatically. Every formula needs control flow, numerical decisions, validation, and careful handling of cases that look simple on paper.

Turning mathematics into code was hard, but satisfying when the output finally matched. That feeling became one of my first reference points for what engineering in Informatics could be.

What stayed with me

  • An elegant formula can still be painfully slow.
  • What is tedious by hand can be efficient for a computer.
  • Integration is one way to learn everyone else’s work.
  • First projects teach pace as much as they teach code.

Run it locally

Clone the source repository or download the project ZIP, then run these commands from the project folder.

Explore the complete project

Download the source, assets, and included documentation as a ZIP archive.

Download project ZIP
bash

Build and run

$ cd src
$ javac -d ../bin Aplikasi/*.java Utils/*.java matrix/*.java Main.java
$ cd ../bin
$ java Main

Use it

# pick an operation, then 1 File, then a filename from test/input
# (paths are resolved relative to test/input, so pass just determinan2.txt).
# A stray newline is consumed after the menu choice, so the first path prompt
# may come back empty — enter the filename again.