This screenshot is from the Gradient Checking assignment from Week 1:

The plus sign in the denominator should be a minus, right?

This screenshot is from the Gradient Checking assignment from Week 1:

The plus sign in the denominator should be a minus, right?

Hey @Teodora_Petkova,

Welcome to the community. The plus sign in the denominator is correct in the formula. For finding the relative difference between any 2 vectors, we take the **L2 norm of their difference over the sum of L2 norms of the individual vectors**.

In fact we can easily see why the **minus** sign in the denominator would be incorrect. Consider 2 equal vectors, A and B, i.e., they have the same magnitude and direction. Trivially, the relative difference between them should be 0, but if we consider **minus** sign in the denominator, then the relative difference would be of the form (0 / 0). I hope this helps.

Regards,

Elemento