We use supersonic shear wave imaging (SSI) technique to measure not only the linear but also the nonlinear elastic properties of brain matter. Here, we tested six porcine brains ex vivo and measured the velocities of the plane shear waves induced by acoustic radiation force at different states of pre-deformation when the ultrasonic probe is pushed into the soft tissue. We relied on an inverse method based on the theory governing the propagation of small-amplitude acoustic waves in deformed solids to interpret the experimental data. We found that, depending on the subjects, the resulting initial shear modulus varies from 1.8 to 3.2 kPa, the stiffening parameter of the hyperelastic Demiray-Fung model from 0.13 to 0.73, and the third- and fourth-order constants of weakly nonlinear elasticity from 1.3 to 20.6 kPa and from 3.1 to 8.7 kPa, respectively. Paired test performed on the experimental results of the left and right lobes of the brain shows no significant difference. These values are in line with those reported in the literature on brain tissue, indicating that the SSI method, combined to the inverse analysis, is an efficient and powerful tool for the mechanical characterization of brain tissue, which is of great importance for computer simulation of traumatic brain injury and virtual neurosurgery.