An identity matrix is a square matrix with ones on the main diagonal and zeros elsewhere, serving as the multiplicative identity in matrix algebra. This means that when any matrix is multiplied by an identity matrix of compatible dimensions, the original matrix is unchanged, analogous to multiplying a number by one in arithmetic.