If the networks are different, this is, in general, a hard problem (i.e. hard in the computational complexity sense) --- depending on what you want the comparison to measure. As you state, the adjacency matrix is simply a representation of the underlying network, and what you want to do here seems akin to network alignment. If you have labels for all the nodes --- that is, if you know for each node in the underlying network, the node in the other network to which it should correspond, then you can simply permute one of the matrices to match the other (i.e. to put the nodes into correspondence), and then compare the values in the rows / columns directly. However, if you have no mapping (or a highly incomplete one), which is the general case, then you must first find a good alignment / correspondence between these networks. For that, there is a vast wealth of literature depending on the particular variant of the problem you want to solve, but you can start out by looking at "biological network alignment", and seeing some of the references you're able to track down.