<dependency>
<groupId>org.jblas</groupId>
<artifactId>jblas</artifactId>
<version>1.2.4</version>
</dependency>
import org.jblas.*;
DoubleMatrix matrix = new DoubleMatrix(new double[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
DoubleMatrix vector = new DoubleMatrix(new double[]{1, 2, 3});
DoubleMatrix result1 = matrix.mmul(matrix);
double dotProduct = vector.dot(vector);
DoubleMatrix transposedMatrix = matrix.transpose();
DoubleMatrix invertedMatrix = Solve.pinv(matrix);
System.out.println("Result1:
" + result1);
System.out.println("Dot product: " + dotProduct);
System.out.println("Transposed matrix:
" + transposedMatrix);
System.out.println("Inverted matrix:
" + invertedMatrix);
System.setProperty("org.jblas.library.path", "/path/to/libraries");