Updating the Embedding Matrix

Jeremy mentioned in Lesson 3 of Collaborative Filtering that a dot product is performed between a vector of user weights and a vector of item weights. Then gradient descent is performed to minimize the loss. I want to know the the gradient descent updates the user weights or items weights bcz in sgd example of A@x: only the A tensor was updated x was an independent variable here it is User@Item so which is one is updated and why. Both are embedding matrics shouldnt both be updated if so then why?