Hello. Welcome to the forum. There is a section about alignment in math mode: Math – Typst Documentation.
$
K times A times N & -> & G \
(k, a, n) & |-> & k a n
$
But if you need the “cell” center alignment, I think mat()
is your best bet. But you can simplify your example with a substitution:
// matrix align
#let malign = math.mat.with(delim: none)
$
malign(
K times A times N, ->, G;
(k, a, n), |->, k a n;
)
$