  The Tur\'an type extremal problem asks to maximize the number of edges over
all graphs which do not contain fixed subgraphs. Similarly, the spectral
Tur\'an type extremal problem asks to maximize spectral radius of all graphs
which do not contain fixed subgraphs.
  In this paper, we determine the maximum spectral radius of all graphs without
containing a linear forest as a subgraph and characterize all corresponding
extremal graphs. In addition, the maximum number of edges and spectral radius
of all bipartite graphs without containing $k\cdot P_3$ as a subgraph are
obtained and all extremal graphs are also characterized. Moreover, some
relations between Tu\'an type extremal problems and spectral Tur\'an type
extremal problems are discussed.
