A method for detecting an electric arc in an electrical system, comprising the following steps: a) acquiring a first signal (104; y) coming from at least one sensor detecting acoustic waves in the system; b) calculating, using an electronic processing device, a first value representative of the error between the first signal and a first projection of the first signal in a first representation space defined by a first dictionary matrix; c) calculating, using the electronic processing device, a second value representative of the error between the first signal and a second projection of the first signal in a second representation space defined by a second dictionary matrix; and d) comparing the first and second values using the electronic processing device and deducing whether an electric arc has been produced in the system, wherein the first and second dictionary matrices are determined, during a prior characterization phase, by learning from a first set of characteristic acoustic signals of shocks in the electrical system and a second set of characteristic acoustic signals of electric arcs in the electrical system, in order to: - minimize a projection error of the shock signals on the first matrix and maximize a projection error of the arc signals on the first matrix; and - minimize a projection error of the arc signals on the second matrix and maximize a projection error of the shock signals on the second matrix, wherein, in step d), the processing device determines whether or not the ratio of the second value to the first value is above a predetermined threshold, and deduces therefrom whether or not an electric arc has been produced in the system. a) acquiring a first signal (104; y) coming from at least one sensor detecting acoustic waves in the system; b) calculating, using an electronic processing device, a first value representative of the error between the first signal and a first projection of the first signal in a first representation space defined by a first dictionary matrix; c) calculating, using the electronic processing device, a second value representative of the error between the first signal and a second projection of the first signal in a second representation space defined by a second dictionary matrix; and d) comparing the first and second values using the electronic processing device and deducing whether an electric arc has been produced in the system, wherein the first and second dictionary matrices are determined, during a prior characterization phase, by learning from a first set of characteristic acoustic signals of shocks in the electrical system and a second set of characteristic acoustic signals of electric arcs in the electrical system, in order to: - minimize a projection error of the shock signals on the first matrix and maximize a projection error of the arc signals on the first matrix; and - minimize a projection error of the arc signals on the second matrix and maximize a projection error of the shock signals on the second matrix, wherein, in step d), the processing device determines whether or not the ratio of the second value to the first value is above a predetermined threshold, and deduces therefrom whether or not an electric arc has been produced in the system. - minimize a projection error of the shock signals on the first matrix and maximize a projection error of the arc signals on the first matrix; and - minimize a projection error of the arc signals on the second matrix and maximize a projection error of the shock signals on the second matrix, wherein, in step d), the processing device determines whether or not the ratio of the second value to the first value is above a predetermined threshold, and deduces therefrom whether or not an electric arc has been produced in the system.