When i have a matrix

4 X 4 and i have to multiply it by a
4 X 3
i know that the product size has to be a 4x 3

so do i do a row times column or how ?

It's easiest to learn using the notations for tensors. For any matrix X denote the entry in the i-th row and j-th column as:

X_{i,j}

Or, put differently, if you start at the top left corner and you take i steps downward and j steps to the right, you'll arrive at X_{i,j}

If X and Y are two matrices and Z = X Y, then the components of Z are given by:

Z_{i,j} = Sum over k of X_{i,k}Y_{k,j}

If X is the 4 by 4 matrix and Y is the 4 by 3 matrix, then the summation over k runs from 1 to 4, i can take values ranging from 1 to 4 and j can take values ranging from 1 to 3. Z is thus a 4 by 3 matrix.

To perform matrix multiplication, you need to multiply each row of the first matrix by each column of the second matrix and sum the products.

In this case, you have a 4x4 matrix, let's call it matrix A, and a 4x3 matrix, let's call it matrix B.

To multiply these two matrices, follow these steps:

1. Take the first row of matrix A and multiply it by the first column of matrix B element-wise. Sum up the products.
2. This will give you the first element of the resulting matrix.
3. Repeat the process for each element of the resulting matrix.
4. Complete the first row before moving on to the next row.

To summarize, for a 4x4 matrix A and a 4x3 matrix B, the resulting matrix will be a 4x3 matrix. Multiply each row of A by each column of B element-wise and sum the products to get each element of the resulting matrix. Repeat this process for each element of the resulting matrix.

To multiply a 4x4 matrix by a 4x3 matrix, you need to perform row-by-column multiplication. Here's how you can do it step by step:

1. Start with the first row of the 4x4 matrix and the first column of the 4x3 matrix.
2. Multiply the corresponding elements of the row and column together.
3. Sum up the products obtained in step 2.
4. Write down the result in the corresponding entry of the resulting 4x3 matrix.
5. Repeat steps 2-4 for the remaining columns of the 4x3 matrix, using the same row of the 4x4 matrix.
6. Move on to the next row of the 4x4 matrix and repeat steps 2-5 until you have computed all elements of the resulting 4x3 matrix.

By following these steps, you will be able to multiply a 4x4 matrix by a 4x3 matrix and obtain a 4x3 matrix as the result.