In this paper, Galilean orthogonal matrices in G^5 and G_1^5 are obtained with the help of unit quaternions. Moreover, Galilean orthogonal matrices in G^4 and G_1^4 are acquired. These matrices produce Galilelan motions in Galilean spaces. We investigate the invariance of the plane where shear motion is acting in Galilean and pseudo-Galilean spaces. Additionally, related examples of matrices that belong to both spaces are provided. With a similar method, dual Galilean orthogonal matrices are obtained by using unit dual quaternions. Finally, we strengthen our work with examples and draw their figures to explore visual representations.