Hi,
for 3) I don’t know what the formula is for that. You should just find it and use it.
for 4), you most likely can use the torch.argmax function along with regular matrix multiplication (torch.matmul) to get this results. Note that if you need a log determinant, we have a function for that here 2.