Abstract : Meaningful computer based simulations of the electrocardiogram ( ECG), linking models of the electrical activity of the heart to ECG signals, are a necessary step towards the development of personalized cardiac models from clinical ECG data. An ECG simulator is, in addition, a valuable tool for building a virtual data base of pathological conditions, to test and train medical devices but also to improve the knowledge on the clinical signiﬁcance of some ECG signals. In the present work, we show that meaningful ECG simulations (in normal or pathological conditions) can be obtained with a coupled heart-torso mathematical model fully based on partial differential equations : a reaction diffusion system in the heart (called bidomain model) and the Laplace equation in the torso. These equations are coupled on the heart-torso interface to obtain the ECG model. Numerical simulations are exploited to investigate the impact of some model assumptions and the sensitivity to the model parameters. We show that, in particular, cell heterogeneity and tissue anisotropy are required modeling assumptions. For the considered cardiac conditions, the Mitchell-Schaeffer phenomenological ionic model is enough. Moreover, heart-torso full coupling is recommended and the mono-domain approximation does not signiﬁcantly reduces computational cost, unless a heart-torso uncoupling approximation is considered. On the other hand, prove that accurate ECG signals can be obtained with a time-marching procedure allowing a fully decoupled computation of the four unknown ﬁelds (ionic state, transmembrane potential, extracellular and torso potentials). Hence, with a computational cost equivalent to the combination of the uncoupling and the monodomain approximations. Such a decoupling is achieved via a semi-implicit treatment of the reaction term, a Gauss-Seidel (or Jacobi) like bidomain splitting and an explicit Robin-Robin treatment of the heart-torso coupling. We prove an energy based stability under mild time-step restrictions. The above described numerical investigations are complemented with an analysis of the heart-torso system mathematical well-posedness. Existence of weak solution is obtained for a class of phenomenological ionic models (including a regularized version of the Mitchell-Schaeffer ionic model), whereas uniqueness is only proved for the FitzHugh-Nagumo ionic model. In the last part of this work, we propose examples of how the developed ECG simulator can be successfully used in different contexts and applications. The ﬁrst concerns a very preliminary study (based on synthetic data) of the inverse problem of electrocardiography, in which we make use of the above mentioned sensitivity analysis. We propose a strategy to estimate the conductivity parameters of the torso. We have also coupled our ECG simulator with a gradient-free optimization tool to estimate some ionic model parameters. The results are promising and we propose to pursue our investigations in that direction. The second application concerns a problem raised by a pacemaker manufacturer (ELA Medical). How to exploit pacemaker measured heart potentials (electrograms or EGMs) in order to provide the clinician with something as close as possible to a standard ECG ? We address this problem by combining our ECG simulator with machine learning techniques (based on the kernel ridge regression method). In this framework, we use the ECG simulator to enrich the training set with new cardiac situations (that have not yet been undergone) and, on the other hand, to test the robustness of the reconstruction algorithms. At last, we present numerical simulations of the electromechanical activity of the heart (without mechano-electrical feedback) obtained with a 3D computational model, integrating our ECG simulator and a cardiac mechanics solver (developed by the MACS project-team at INRIA). We show that the cardiac activation patterns associated to physiological ECG signals allow to simulate also physiological medical indicators on the mechanical side, such as pressures and volumes, in healthy and pathological cases. Moreover, physiological values in the pathological conditions (LBBB, RBBB and ﬁbrillation) are obtained by simply recalibrating the model parameters directly affected by the pathology (initial activation). Somehow, this illustrated the predictive capabilities of the model.