Legged locomotion, including walking and running has good adaptability for natural environment, therefore, many researchers have studied on legged robots and animals. Interaction between the robots/animals' body, their controller, and environment realizes the legged locomotion. Legged robots walk in different ways therefore we think that there are not only one kind of the interaction. In addition, researchers consider that the interaction is important to substantialize robot walking. However, there are not active discussion on it because there is not a defined scale about it. We focus on gaits that show well-ordered walking and hypothesize that we can classify the interaction in gait generation. In this research, we aim to quantify a transient state of walking. We propose a gait representation from a viewpoint of finite state machine. A binary matrix represents a gait. Its element has two states, that is swing state and stance state. The matrix comes from a gait diagram. We divide it by one step of a certain leg to discretize the transient state of walking. Furthermore, we convert the matrix into a vector to understand a gait easily. We call the vector “gait vector”. Our method enables us to distinguish any gaits in walking because walking continuously divides into “gait vectors” by our method. We can recognize emergence of steady gait immediately by numbering gait vectors. In this paper, we show an effect of our proposal by simulation with a six-legged robot walking. In addition, we propose a calculation method of similarity between gait vectors to classify a gait vector in a gait class numerically. Using an order and elements of gait vector, we can calculate the similarity between gait vectors. We show similarities of quadrupedal gaits. Our proposal may be an index of gait classification with “gait vector” because of its result.