# Vector and matrix multiplication

I have a question: Given a vector $$v=(1,0)$$ and a matrix $$A(φ)= \begin{pmatrix} cos(φ)&-sin(φ)\\ sin(φ)&\phantom{-}cos(φ)\\ \end{pmatrix}$$

I have to write a manipulate command for the value of the inner product $$⟨v,A(φ)v⟩$$, where $$φ$$ is in the interval $$[0,2π]$$. Than I have to plot a graph of $$⟨v,A(φ)v⟩$$. How can I make this? I have already tried using the Manipulate[] command, but how can I plot this? I have tried Plot[{v,v.A(φ).v},{φ,0,2Pi}] but it plots only the vector $$v$$. Thank you.

• Welcome to Mathematica.SE! Note that this is not a service where we will write all the code you need! Please give an idea of where you're stuck in this problem. If you are a Mathematica beginner and don't know how to make matrices and vectors, then this will be helpful. Inner products are done by using Dot. Finally, for plotting, check out this tutorial page. – march Apr 10 '19 at 18:11
• You may define A by A = t \[Function] {{Cos[t],-Sin[t]},{Sin[t],Cos[t]}}. – Henrik Schumacher Apr 10 '19 at 18:17

Using Henrik's function definition:

A = ϕ \[Function] {{Cos[ϕ], -Sin[ϕ]}, {Sin[ϕ], Cos[ϕ]}};

v = {1,0};

Manipulate[
Show[Plot[v.A[ϕ].v, {ϕ, 0, 2 π}],
ListPlot[{{ϕ, v.A[ϕ].v}},
PlotStyle -> {Red, PointSize -> Large}]], {ϕ, 0, 2 π}] 