implement tranpose_multiply for dense matrix