The known properties of equivalence between four-dimensional variational (4D-Var) data assimilation and the Kalman filter as well as the fixed-interval Kalman smoother point to particular optimal properties of 4D-Var. In the linear context, the 4D-Var solution is optimal, not only with respect to the model trajectory segment over the assimilation time interval, but also with respect to any model state at a single observation time level; in the batch processing (cycling 4D-Var) method, the information in 4D-Var is fully transferred from one batch to the next by the background term; 4D-Var allows the processing of observations in subsets, while the final solution is optimal as all observations are processed simultaneously. These properties hold even for models that are imperfect, as well as not invertible. Various properties of equivalence of 4D-Var to the Kalman filter and smoother result from these optimality properties of 4D-Var. Further, we show that the fixed-lag Kalman smoother may also be constructed in an optimal way using a multiple batch-processing 4D-Var approach. While error covariances are crucial for the equivalence, practical techniques for evaluating error covariances in the framework of cycling 4D-Var are discussed.