This code draws a certain plot:
\documentclass{minimal}
\usepackage{tikz}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}[x=2cm/2]
\newcommand\phiprim{60}
\newcommand\x0{0.5}
\newcommand\y0{0.5}
\pgfplothandlerlineto
\pgfplotfunction{\r}{0, 0.01, ..., 1}
{\pgfpointxy{\r*(cos(\phiprim)*\x0 + sin(\phiprim)*\y0)}
{\r*(-sin(\phiprim)*\x0 + cos(\phiprim)*\y0}} %this line could be redefined with matrix multiplication
\pgfusepath{stroke}
\end{tikzpicture}
\end{document}
I could make my code nicer if I could define in tikz matrices
and perform operations with them
How matrices can be defined and how can one perform matrix operations in tikz.
Here I am interested in matrices only as mathematical objects with no intention to display them.


tikzcoordinates? There is a\pgftransformcm{a}{b}{c}{d }{point}that do that. See the tikz manual, pag. 1047 in my copy, section 102.2.2 "commands for relative coordinates transformation": – Rmano Nov 03 '17 at 21:13\def\x0{0.5}doesn't do what you suspect.\y0is not a valid TeX macro name. – Rmano Nov 03 '17 at 21:19\xand\yar both0, and\x0is the string00. Try to put this into thetikzpicture:\newcommand\x0{0.5}\newcommand\y0{0.5} \node {\x0,\y0};(To be exact, in the pathletoperation, where\xis a kind-of a command that takes an argument...) – Rmano Nov 04 '17 at 10:51