For an unknown n × n matrix A having non-negative entries, the inner product ( IP ) oracle takes as inputs a specified row (or a column) of A and a vector v ∈ R n with non-negative entries, and returns their inner product. Given two input vectors x and y in R n with non-negative entries, and an unknown matrix A with non-negative entries with IP oracle access, we design almost optimal sublinear time algorithms for the following two fundamental matrix problems: Find an estimate X for the bilinear form x T A y such that X ≈ x T A y . Designing a sampler Z for the entries of the matrix A such that P ( Z = ( i, j )) ≈ x i A ij y j / (cid:0) x T A y (cid:1) , where x i and y j are i -th and j -th coordinate of x and y respectively. As special cases of the above results, for any submatrix of an unknown matrix with non-negative entries and IP oracle access, we can efficiently estimate the sum of the entries of any submatrix, and also sample a random entry from the submatrix with probability proportional to its weight. We will show that the above results imply that if we are given IP oracle access to the adjacency matrix of a graph, with non-negative weights on the edges, then we can design sublinear time algorithms for the following two fundamental graph problems: