This paper provides an alternative proof to the MacWilliams identity for linear block codes over GF(q). The intermediate results of our alternative proof offer some insights of the vector-space structure. Our vector-space-based methodology can be used to establish the relation between weight distributions of dual codes for other metrics.