This paper reviews the application of chemometric techniques to optimise capillary electrophoresis separations. The optimization of the electrophoretic conditions should not be understood merely as an independent study of the influence of each variable on the resolution. In many cases, simultaneous optimization of several experimental variables may be required. Furthermore other important aspects such as analysis time, precision, and detection limits should also be considered as responses for a proper optimization. Other important chemometric tasks dealing with data analysis are reviewed in Part B (see S. Sentellas and J. Saurina, Chemometrics in capillary electrophoresis. Part B: Methods for data analysis).