def getTetragridTimesOther(firstTetragrid, otherTetragrid):
 tetragridTimesOther = []
 for row in xrange(4):
  matrixRow = firstTetragrid[row]
  tetragridTimesOtherRow = []
  tetragridTimesOther.append(tetragridTimesOtherRow)
  for column in xrange(4):
   dotProduct = 0
   for elementIndex in xrange(4):
    dotProduct += (matrixRow[elementIndex] * otherTetragrid[elementIndex][column])
   tetragridTimesOtherRow.append(dotProduct)
 return tetragridTimesOther

def getTetragridTimesOther ( firstTetragrid , otherTetragrid ) : tetragridTimesOther = [ ] for row in xrange ( 4 ) : matrixRow = firstTetragrid [ row ] tetragridTimesOtherRow = [ ] tetragridTimesOther . append ( tetragridTimesOtherRow ) for column in xrange ( 4 ) : dotProduct = 0 for elementIndex in xrange ( 4 ) : dotProduct += ( matrixRow [ elementIndex ] * otherTetragrid [ elementIndex ] [ column ] ) tetragridTimesOtherRow . append ( dotProduct ) return tetragridTimesOther
get this matrix multiplied by the other matrix .