There is a difference between grave matter and a mortal sin. To commit a mortal sin means that we are fully culpable for an act that is gravely wrong. Someone could commit an act that is objectively gravely wrong but lack true culpability for the action.
In order to commit a mortal sin, 3 conditions must be fulfilled:
the act must be gravely wrong (i.e. grave matter)
the person must know (or should know) that it is gravely wrong
the person must freely commit the act
You may have committed an action that is gravely wrong but either did not truly understand that it was gravely wrong or perhaps had diminished freedom of choice for a particular reason. In such a case, it would not be mortally (deadly) sinful to your soul. It would still be something of great concern given the objective gravity of the action, but you would not be mortally/gravely culpable.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.