Exercise Is (a+b)⋅(a+b)=a⋅a+2(a⋅b)+b⋅b true in general? What if for matrix A and B in general?
The Euclidean norm or length of thevector a=(a1,a2,…,an) is

Note that ‖αa‖=|α|‖a‖ for all scalars and vectors.
One advantage of NumPy arrays is thatscalar multiplication and addition have very natural syntax
图片格式题目:
参考: