W2_A1_Normalizing the matrix to scale down the features

In normalize_rows(), you can try to print the shapes of x_norm and x, and then rerun the assessment. You’ll find out that they have different shapes. This is normal given that x_norm takes the norm of each row of x. So x_norm has the same number of rows but only 1 column. So how did it work when you divided x by x_norm? This is called broadcasting and we’ll talk about it now!

In this we have read that the matrix (x_norm is 2 X 1) gets extended for division(2 X 3) which will eventually gives the results

Hello, Kunal.

Why are we using the normalize process here? Just to minimize the sensitivity of the model to the scale the features & transform features to be on a similar scale. Scaling the values, make them arrange in a range of rows and columns(0-1).
We first apply normalization to the rows then columns and then rows again until they converge for the required minimum.

In matrix normalization, we pick a determinant of the matrix and divide each element by the determinant of the matrix, for instance,

x = (x - xmin)/(xmax-xmin) for a 3x3 matrix.

What happens here? It normalizes the array and rescale it to (0 to 1).

The earlier process of reshaping has already been discussed in 1.3 of the instructions on how you do reshaping of the matrix.