and matrices respectively, with entries in let be the linear transformations corresponding to and respectively, i.e. and
are defined by for all and for all
claim. where means "dimension of the kernel".
proof. define by for all note that is well-defined because if , then and thus
it's obvious that is linear and therefore, by the rank-nulity theorem, we have
now solving your problem is easy: applying the above claim and the rank-nulity theorem we have: