There are a number of extensions of the core inverse represented by the products of known generalized inverses, like the core-EP inverse, DMP inverse, GC inverse and so on. However, none of them is an inner inverse of the matrix, and especially for an arbitrary nilpotent matrix, such inverses are always null. Our goal is to use a new technic to introduce an extension of the core inverse that preserves the interesting property of being an inner inverse of the matrix which need not necessarily be the null matrix of a nilpotent matrix. We define the extended core inverse for square complex matrices combining the sum and the difference of three known generalized inverses. Various properties and representations of the extended core inverse are developed. The extended dual core inverse is investigated too. We apply the extended core inverse to solve some systems of linear equations and one minimization problem. A significant normal equation related to least-squares solutions can be solved using the extended core inverse.