Creating a matrix class in Java Part 2-About matrices (linear algebra)-

In Part 2, we will review, summarize, and explain the basics of matrices.

According to G. Strang's "Linear Algebra and Its Applications", the application of matrices is, after all, to find the solution of linear equations by "Gaussian elimination".

Thinking about its application rather than the practice of matrix calculations, "Square Matrix times Column Vector equals to Column Vector", Square matrix x column vector is equal to column vector, but I think it is an important application form.

To give a concrete example

x + y = 3\\
x - y = 1

When displayed in a matrix,

\begin{pmatrix}
1 & 1 \\
1 & -1
\end{pmatrix}

\times

\begin{pmatrix}
x \\
y 
\end{pmatrix}
=
\begin{pmatrix}
3 \\
1 
\end{pmatrix}

It will be. This is important. There are two unknowns and two equations, which is the basis of the field of matrix application that can be obtained by "Gaussian elimination".

The matrix on the left is the coefficient matrix. Next to it is an unknown column vector. The last is a constant column vector.

Despite linear algebra, there are some interesting things. First of all, what I find interesting is the area where the nature of algebra and the solving of calculations on a computer are in contact.

What is the algebraic nature? The algebraic property I would like to mention here is that it is "cohesive." Algebra is "Algebra" in English, but it was originally the word "aljabr". It seems to be Arabic, but I remember that it has the meaning of "combine into one." Symbolize an unknown and use them to create an equation. The feeling that the equation is organized is aljabr. I think the word Compound in English fits nicely with programmers. There is a concept of "Compound Procedure", but it is a very important idea.

Then, considering what the matrix format looks like, one is the abbreviation notation. A matrix can be a coefficient or an unknown column vector. A column vector is an m x 1 matrix, isn't it? Solving simultaneous equations by mechanically repeating algebraic operations using this matrix notation is the basis of linear algebra.

The row is "row" in English and the column is "column" in English. Column means a stone pillar monument. Vertical depth x horizontal length, row x column. However, vector notation is easy to get confused with. If it is an n-dimensional row vector, it is a 1 × n matrix, If it is an m-dimensional column vector, it is a matrix of m × 1.

The amount is small, but it's important, so that's the end of Part 2.

Continue to next time.

Recommended Posts

Creating a matrix class in Java Part 2-About matrices (linear algebra)-
Creating a matrix class in Java Part 1
[Creating] A memorandum about coding in Java
A quick review of Java learned in class part4
A quick review of Java learned in class part3
A quick review of Java learned in class part2
Creating lexical analysis in Java 8 (Part 2)
Creating lexical analysis in Java 8 (Part 1)
About returning a reference in a Java Getter
What is a class in Java language (3 /?)
What is a class in Java language (1 /?)
About Java class
GetInstance () from a @Singleton class in Groovy from Java
A story about the JDK in the Java 11 era
A quick review of Java learned in class
About class division (Java)
About Java StringBuilder class
Write a class that can be ordered in Java
[Java] About Singleton Class
Write a class in Kotlin and call it in Java
About Java String class
About java abstract class
[MQTT / Java] Implemented a class that does MQTT Pub / Sub in Java
A note about Java GC
About Java class loader types
Find a subset in Java
About Java class variables class methods
About abstract classes in java
I can't create a Java class with a specific name in IntelliJ
Handle business logic for a set of Entity in Java class
About what I did when creating a .clj file in Clojure
How to think about class design (division) in a business system (1)
I created a PDF in Java.
StringBuffer and StringBuilder Class in Java
A simple sample callback in Java
A murmur about the utility class
About file copy processing in Java
Get stuck in a Java primer
Creating a project (and GitHub repository) using Java and Gradle in IntelliJ IDEA
A story about a Spring Boot project written in Java that supports Kotlin
Let's think about what declarative programming is in Java and Elm (Part 1)
[Java] Implement a function that uses a class implemented in the Builder pattern