Statistical inference for large matrices