Step 1: Definition of an identity matrix.
An identity matrix \( A = [a_{ij}] \) is a square matrix where diagonal elements are \( 1 \) and off-diagonal elements are \( 0 \). Mathematically:
\[ a_{ij} = \begin{cases} 1, & \text{if } i = j, \\ 0, & \text{if } i eq j. \end{cases} \]
Step 2: Evaluate each option.
(A) \( a_{ij} = 0 \) if \( i = j \) and \( a_{ij} = 1 \) if \( i eq j \): This definition is incorrect as it is the inverse of the identity matrix definition.
(B) \( a_{ij} = 1, \forall i, j \): This is incorrect; an identity matrix must have \( 0 \) for off-diagonal elements.
(C) \( a_{ij} = 0, \forall i, j \): This represents a zero matrix, not an identity matrix.
(D) \( a_{ij} = 0 \) if \( i eq j \) and \( a_{ij} = 1 \) if \( i = j \): This is the correct definition of an identity matrix.
Final Answer: \( \boxed{(D)} \)