Many algorithms have been presented to solve the traffic assignment problem. Recently, Bar-Gera introduced the concept of “last common node” into an origin-based algorithm to solve the traffic assignment problem. However, how to find the last common nodes has not been investigated in detail. In this paper, we present a matrix method for finding the last common nodes in an origin-based traffic assignment problem. In an acyclic network, the power of binary adjacency matrix ( A k ) will record the number of directed simple routes of length k . Taking this feature into consideration, S p , the total number of the simple routes related to an origin node p in the subnetwork G p , is counted by S p = ∑ k A p k = ( I − A p ) − 1 . Then, every common node for OD pair p q is picked out by comparing ( S p ) p r × ( S p ) r q and ( S p ) p q , and the last common node for OD pair p q is filtered out according to the topological order l ( r ) . Our method is implemented to find out all LCNs for all n ∗ ( n − 1 ) OD pairs, then tested on three kinds of model networks and four urban transportation networks. We find that the overall computing time T and the size of network n , has a relation like T ∼ O ( n 3 ) , which is better than the theoretical estimation O ( n 4 ) .