i am actually writing a code to actually perform matrix multiplication on a n×m matrix the closest that i got is the following
X = [[15,2,9],
[1 ,3,4],
[7 ,2,9]]
Y = [[5,8,1,2],
[6,7,3,0],
[4,5,9,1]]
result = [[0,0,0,0],
[0,0,0,0],
[0,0,0,0]]
for i in range(len(X)):
for j in range(len(Y[0])):
for k in range(len(Y)):
result[i][j] += X[i][k] * Y[k][j]
for numbs in result:
print(numbs)
However i cannot seem to find a way to actually perform a n×m multiplication and its limited to the size of my lists,
how can i allow the user to decide what is the dimension and allow him to input the matrix that is as big as he wants with one condition that the two matrices are n×m m×n