The relationships among autonomous systems (ASes) on the Internet are categorized into two major types: transit and peering. We propose a method for quantifying AS' network size called magnitude by recursively analyzing the AS adjacency matrix converted from a spanning subgraph of the AS-level Internet topology. We estimate the relationships of inter-AS links by comparing differences in magnitude of two neighboring ASes, while showing differences in the magnitude, representing AS relationships appropriately through three evaluations. We also discuss the applicability of this method to AS relationships-aware application-layer traffic optimization.