Here you can find the source of matrixMultiply(double[][] A, double[][] B, int n)
private static double[][] matrixMultiply(double[][] A, double[][] B, int n)
//package com.java2s; //License from project: Apache License public class Main { private static double[][] matrixMultiply(double[][] A, double[][] B, int n) { double nMatrix[][] = new double[n][n]; int t = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { t = 0;/*from ww w.j av a 2 s. c om*/ for (int k = 0; k < n; k++) { t += A[i][k] * B[k][j]; } nMatrix[i][j] = t; } } return nMatrix; } }