look at your code:
int[][] matrix = new int[][][arraysize];
You are declaring
matrix
as a two dimensional array of integers, and trying to assign a three dimensional array to it. That won't work, any more that you can fit a quart into a pint pot!
You also need to specify both dimensions of the 2D array when you create the actual instance and assign the space:
int[][] matrix = new int[arraysize][arraysize];
In addition, when you use it you need to reference both dimensions:
matrix[i][somethingHere] += matrixArray[i][x];