In this study, optimal design of the transversely vibrating Euler-Bernoulli beams segmented in the longitudinal direction is explored. Mathematical formulation of the beams in bending vibration is obtained using transfer matrix method, which is later coupled with an eigenvalue routine using the ''fmincon solver'' provided in Matlab Optimization Toolbox. Characteristic equations, namely frequency equations, for determining natural frequencies of the segmented beams for all end conditions are obtained and for each case, square of this equation is selected as a fitness function together with constraints. Due to the explicitly unavailable objective functions for the natural frequencies as a function of segment length and volume fraction of the materials, especially for the beams made of a large number of segments, initially, prescribed value is assumed for the natural frequency and then the variables minimizing objective function and satisfying the constraints are searched. Clamped-free, clamped-clamped, clamped-pinned and pinned-pinned boundary conditions are considered. Among the end conditions, maximum increment in the fundamental natural frequency is more pronounced for the case of clamped-clamped end condition and for this case, maximum increment up to 17.3274% is attained. Finally, the beam configurations maximizing fundamental natural frequencies will be presented. adhana(0123456789().,-volV)FT3 ](0123456789().,-volV)