This book presents recent results on positivity and optimization of polynomials in non-commuting variables. Researchers in non-commutative algebraic geometry, control theory, system engineering, optimization, quantum physics and information science will find the unified notation and mixture of algebraic geometry and mathematical programming useful. Theoretical results are matched with algorithmic considerations; several examples and information on how to use NCSOStools open source package to obtain the results provided. Results are presented on detecting the eigenvalue and trace positivity of polynomials in non-commuting variables using Newton chip method and Newton cyclic chip method, relaxations for constrained and unconstrained optimization problems, semidefinite programming formulations of the relaxations and finite convergence of the hierarchies of these relaxations, and the practical efficiency of algorithms.