<?xml version="1.0" encoding="US-ASCII"?>
<!--XBRL Document Created with Wdesk from Workiva-->
<!-- -->
<linkbase xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd" xmlns="http://www.xbrl.org/2003/linkbase" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingencies" xlink:href="nmih-20151231.xsd#CommitmentsAndContingencies" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:href="nmih-20151231.xsd#CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesNarrativeDetails" xlink:href="nmih-20151231.xsd#CommitmentsAndContingenciesNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommitmentsAndContingenciesTables" xlink:href="nmih-20151231.xsd#CommitmentsAndContingenciesTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommonStockOfferings" xlink:href="nmih-20151231.xsd#CommonStockOfferings" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/CommonStockOfferingsDetails" xlink:href="nmih-20151231.xsd#CommonStockOfferingsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedBalanceSheetsConsolidatedBalanceSheets" xlink:href="nmih-20151231.xsd#ConsolidatedBalanceSheetsConsolidatedBalanceSheets" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:href="nmih-20151231.xsd#ConsolidatedBalanceSheetsParenthetical" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfCashFlows" xlink:href="nmih-20151231.xsd#ConsolidatedStatementsOfCashFlows" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfComprehensiveLossConsolidatedStatementsOfComprehensiveLoss" xlink:href="nmih-20151231.xsd#ConsolidatedStatementsOfComprehensiveLossConsolidatedStatementsOfComprehensiveLoss" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfComprehensiveLossParenthetical" xlink:href="nmih-20151231.xsd#ConsolidatedStatementsOfComprehensiveLossParenthetical" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfShareholdersEquity" xlink:href="nmih-20151231.xsd#ConsolidatedStatementsOfShareholdersEquity" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:href="nmih-20151231.xsd#ConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:href="nmih-20151231.xsd#DocumentAndEntityInformation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:href="nmih-20151231.xsd#FairValueOfFinancialInstruments" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:href="nmih-20151231.xsd#FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsNarrativeDetails" xlink:href="nmih-20151231.xsd#FairValueOfFinancialInstrumentsNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollFowardOfLevel3LiabilitiesMeasuredAtFairValueDetails" xlink:href="nmih-20151231.xsd#FairValueOfFinancialInstrumentsRollFowardOfLevel3LiabilitiesMeasuredAtFairValueDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:href="nmih-20151231.xsd#FairValueOfFinancialInstrumentsTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxes" xlink:href="nmih-20151231.xsd#IncomeTaxes" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesComponentsOfProvisionForIncomeTaxesBenefitsDetails" xlink:href="nmih-20151231.xsd#IncomeTaxesComponentsOfProvisionForIncomeTaxesBenefitsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesDeferredTaxAssetAndLiabilitiesDetails" xlink:href="nmih-20151231.xsd#IncomeTaxesDeferredTaxAssetAndLiabilitiesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesIncomeTaxReconciliationDetails" xlink:href="nmih-20151231.xsd#IncomeTaxesIncomeTaxReconciliationDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:href="nmih-20151231.xsd#IncomeTaxesNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IncomeTaxesTables" xlink:href="nmih-20151231.xsd#IncomeTaxesTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwill" xlink:href="nmih-20151231.xsd#IntangibleAssetsAndGoodwill" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillDetails" xlink:href="nmih-20151231.xsd#IntangibleAssetsAndGoodwillDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillTables" xlink:href="nmih-20151231.xsd#IntangibleAssetsAndGoodwillTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/Investments" xlink:href="nmih-20151231.xsd#Investments" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:href="nmih-20151231.xsd#InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:href="nmih-20151231.xsd#InvestmentsNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:href="nmih-20151231.xsd#InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:href="nmih-20151231.xsd#InvestmentsScheduledMaturitiesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsTables" xlink:href="nmih-20151231.xsd#InvestmentsTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/InvestmentsUnrealizedLossesDetails" xlink:href="nmih-20151231.xsd#InvestmentsUnrealizedLossesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentation" xlink:href="nmih-20151231.xsd#OrganizationAndBasisOfPresentation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentationDetails" xlink:href="nmih-20151231.xsd#OrganizationAndBasisOfPresentationDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/QuarterlyFinancialDataUnaudited" xlink:href="nmih-20151231.xsd#QuarterlyFinancialDataUnaudited" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/QuarterlyFinancialDataUnauditedDetails" xlink:href="nmih-20151231.xsd#QuarterlyFinancialDataUnauditedDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/QuarterlyFinancialDataUnauditedTables" xlink:href="nmih-20151231.xsd#QuarterlyFinancialDataUnauditedTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformation" xlink:href="nmih-20151231.xsd#RegulatoryInformation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationNarrativeDetails" xlink:href="nmih-20151231.xsd#RegulatoryInformationNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationScheduleOfCombinedStatutoryNetLossStatutorySurplusContingencyReserveAndRtcRatiosDetails" xlink:href="nmih-20151231.xsd#RegulatoryInformationScheduleOfCombinedStatutoryNetLossStatutorySurplusContingencyReserveAndRtcRatiosDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/RegulatoryInformationTables" xlink:href="nmih-20151231.xsd#RegulatoryInformationTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimsExpenses" xlink:href="nmih-20151231.xsd#ReservesForInsuranceClaimsAndClaimsExpenses" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimsExpensesNarrativeDetails" xlink:href="nmih-20151231.xsd#ReservesForInsuranceClaimsAndClaimsExpensesNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimsExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpensesDetails" xlink:href="nmih-20151231.xsd#ReservesForInsuranceClaimsAndClaimsExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpensesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimsExpensesTables" xlink:href="nmih-20151231.xsd#ReservesForInsuranceClaimsAndClaimsExpensesTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedParties" xlink:href="nmih-20151231.xsd#ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedParties" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesDetails" xlink:href="nmih-20151231.xsd#ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnly" xlink:href="nmih-20151231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnly" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetAdditionalInformationDetails" xlink:href="nmih-20151231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetAdditionalInformationDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetDetails" xlink:href="nmih-20151231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyCashFlowStatementDetails" xlink:href="nmih-20151231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyCashFlowStatementDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyIncomeStatementAdditionalInformationDetails" xlink:href="nmih-20151231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyIncomeStatementAdditionalInformationDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyIncomeStatementDetails" xlink:href="nmih-20151231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyIncomeStatementDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySupplementalNotesDetails" xlink:href="nmih-20151231.xsd#ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySupplementalNotesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ScheduleIvFinancialInformationOfRegistrantReinsuranceParentCompanyOnly" xlink:href="nmih-20151231.xsd#ScheduleIvFinancialInformationOfRegistrantReinsuranceParentCompanyOnly" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensation" xlink:href="nmih-20151231.xsd#ShareBasedCompensation" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationNarrativeDetails" xlink:href="nmih-20151231.xsd#ShareBasedCompensationNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:href="nmih-20151231.xsd#ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsValuationAssumptionsDetails" xlink:href="nmih-20151231.xsd#ShareBasedCompensationRestrictedStockUnitsValuationAssumptionsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionActivityDetails" xlink:href="nmih-20151231.xsd#ShareBasedCompensationStockOptionActivityDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionsValuationAssumptionsDetails" xlink:href="nmih-20151231.xsd#ShareBasedCompensationStockOptionsValuationAssumptionsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/ShareBasedCompensationTables" xlink:href="nmih-20151231.xsd#ShareBasedCompensationTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipment" xlink:href="nmih-20151231.xsd#SoftwareAndEquipment" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentDetails" xlink:href="nmih-20151231.xsd#SoftwareAndEquipmentDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:href="nmih-20151231.xsd#SoftwareAndEquipmentNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SoftwareAndEquipmentTables" xlink:href="nmih-20151231.xsd#SoftwareAndEquipmentTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPolicies" xlink:href="nmih-20151231.xsd#SummaryOfAccountingPolicies" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesDetails" xlink:href="nmih-20151231.xsd#SummaryOfAccountingPoliciesDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesPolicies" xlink:href="nmih-20151231.xsd#SummaryOfAccountingPoliciesPolicies" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/TermLoan" xlink:href="nmih-20151231.xsd#TermLoan" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/TermLoanNarrativeDetails" xlink:href="nmih-20151231.xsd#TermLoanNarrativeDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/TermLoanScheduleOfFuturePrincipalPaymentsDetails" xlink:href="nmih-20151231.xsd#TermLoanScheduleOfFuturePrincipalPaymentsDetails" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/TermLoanTables" xlink:href="nmih-20151231.xsd#TermLoanTables" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/Warrants" xlink:href="nmih-20151231.xsd#Warrants" xlink:type="simple" />
  <roleRef roleURI="http://www.nationalmi.com/role/WarrantsDetails" xlink:href="nmih-20151231.xsd#WarrantsDetails" xlink:type="simple" />
  <arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all" xlink:type="simple" />
  <arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default" xlink:type="simple" />
  <arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain" xlink:type="simple" />
  <arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member" xlink:type="simple" />
  <arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension" xlink:type="simple" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingencies" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesFutureMinimumLeasePaymentsDetails" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesLineItems" xlink:label="loc_us-gaap_ComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesLineItems_2F877CC1058C9DF3A4BEC27AF0FAD9EF" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesTable" xlink:label="loc_us-gaap_ScheduleOfComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesTable_4862653A037A410E8B98C27AF0FAD765" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesLineItems_2F877CC1058C9DF3A4BEC27AF0FAD9EF" xlink:to="loc_us-gaap_ScheduleOfComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesTable_4862653A037A410E8B98C27AF0FAD765" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_A2EA50DCAB4E76BA1ECDC27AF0FA653D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesTable_4862653A037A410E8B98C27AF0FAD765" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_A2EA50DCAB4E76BA1ECDC27AF0FA653D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_108A2008A556E51DD787C27AF0FAF868_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_A2EA50DCAB4E76BA1ECDC27AF0FA653D" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_108A2008A556E51DD787C27AF0FAF868_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_108A2008A556E51DD787C27AF0FAF868" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_A2EA50DCAB4E76BA1ECDC27AF0FA653D" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_108A2008A556E51DD787C27AF0FAF868" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SeniorSecuredDebtMember" xlink:label="loc_nmih_SeniorSecuredDebtMember_84BBB772CBD6C277A28CC27AF0FAD76B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_108A2008A556E51DD787C27AF0FAF868" xlink:to="loc_nmih_SeniorSecuredDebtMember_84BBB772CBD6C277A28CC27AF0FAD76B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_9B315814AC668AF7808CC27AF0FADA41" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesTable_4862653A037A410E8B98C27AF0FAD765" xlink:to="loc_us-gaap_DebtInstrumentAxis_9B315814AC668AF7808CC27AF0FADA41" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_110A00C0868FFE83C8BDC27AF0FA7E87_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_9B315814AC668AF7808CC27AF0FADA41" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_110A00C0868FFE83C8BDC27AF0FA7E87_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_110A00C0868FFE83C8BDC27AF0FA7E87" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_9B315814AC668AF7808CC27AF0FADA41" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_110A00C0868FFE83C8BDC27AF0FA7E87" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_CreditAgreementMember" xlink:label="loc_nmih_CreditAgreementMember_192ECA356DF7BE67BAF7C27AF0FAC89A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_110A00C0868FFE83C8BDC27AF0FA7E87" xlink:to="loc_nmih_CreditAgreementMember_192ECA356DF7BE67BAF7C27AF0FAC89A" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ApprovedInsurersMinimumRequiredAssets" xlink:label="loc_nmih_ApprovedInsurersMinimumRequiredAssets_271065D1F779C9ACB260C27AF0FAC2C6" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesLineItems_2F877CC1058C9DF3A4BEC27AF0FAD9EF" xlink:to="loc_nmih_ApprovedInsurersMinimumRequiredAssets_271065D1F779C9ACB260C27AF0FAC2C6" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ApprovedInsurersRiskedBasedRequiredAssetsPrimaryInsuranceFloor" xlink:label="loc_nmih_ApprovedInsurersRiskedBasedRequiredAssetsPrimaryInsuranceFloor_96B983DF79CC32CDCC1AC27AF0FA31E9" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesLineItems_2F877CC1058C9DF3A4BEC27AF0FAD9EF" xlink:to="loc_nmih_ApprovedInsurersRiskedBasedRequiredAssetsPrimaryInsuranceFloor_96B983DF79CC32CDCC1AC27AF0FA31E9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentFaceAmount" xlink:label="loc_us-gaap_DebtInstrumentFaceAmount_E5F525A9737F84CDAD94C27AF0FA9B7A" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesLineItems_2F877CC1058C9DF3A4BEC27AF0FAD9EF" xlink:to="loc_us-gaap_DebtInstrumentFaceAmount_E5F525A9737F84CDAD94C27AF0FA9B7A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OperatingLeasesRentExpenseNet" xlink:label="loc_us-gaap_OperatingLeasesRentExpenseNet_0F1038AE2D302931BF37C27AF0FA59C7" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ComplianceWithRegulatoryCapitalRequirementsForMortgageCompaniesLineItems_2F877CC1058C9DF3A4BEC27AF0FAD9EF" xlink:to="loc_us-gaap_OperatingLeasesRentExpenseNet_0F1038AE2D302931BF37C27AF0FA59C7" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/CommitmentsAndContingenciesTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/CommonStockOfferings" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/CommonStockOfferingsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockLineItems" xlink:label="loc_us-gaap_ClassOfStockLineItems_8C7249A2594645651D02BA73C3EEBB43" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfStockByClassTable" xlink:label="loc_us-gaap_ScheduleOfStockByClassTable_674B7540711D423253F6BA73C3EE7558" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_8C7249A2594645651D02BA73C3EEBB43" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_674B7540711D423253F6BA73C3EE7558" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SaleofStockAxis" xlink:label="loc_nmih_SaleofStockAxis_FC7D3CDDD5BE5E613FD5BA73C3EE5051" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_674B7540711D423253F6BA73C3EE7558" xlink:to="loc_nmih_SaleofStockAxis_FC7D3CDDD5BE5E613FD5BA73C3EE5051" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SaleofStockDomain" xlink:label="loc_nmih_SaleofStockDomain_42F9B8D423867BD76C02BA73C3EEE40F_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_nmih_SaleofStockAxis_FC7D3CDDD5BE5E613FD5BA73C3EE5051" xlink:to="loc_nmih_SaleofStockDomain_42F9B8D423867BD76C02BA73C3EEE40F_default" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SaleofStockDomain" xlink:label="loc_nmih_SaleofStockDomain_42F9B8D423867BD76C02BA73C3EEE40F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_nmih_SaleofStockAxis_FC7D3CDDD5BE5E613FD5BA73C3EE5051" xlink:to="loc_nmih_SaleofStockDomain_42F9B8D423867BD76C02BA73C3EEE40F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IPOMember" xlink:label="loc_us-gaap_IPOMember_75429BA69486530C7DC2BA73C3EE36F8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_SaleofStockDomain_42F9B8D423867BD76C02BA73C3EEE40F" xlink:to="loc_us-gaap_IPOMember_75429BA69486530C7DC2BA73C3EE36F8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_9CF8F211E3FA65A05FE6BA73C3EE55D4" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_674B7540711D423253F6BA73C3EE7558" xlink:to="loc_us-gaap_StatementClassOfStockAxis_9CF8F211E3FA65A05FE6BA73C3EE55D4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_B52BB8CC9112BCD66D96BA73C3EEDF05_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_9CF8F211E3FA65A05FE6BA73C3EE55D4" xlink:to="loc_us-gaap_ClassOfStockDomain_B52BB8CC9112BCD66D96BA73C3EEDF05_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_B52BB8CC9112BCD66D96BA73C3EEDF05" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_9CF8F211E3FA65A05FE6BA73C3EE55D4" xlink:to="loc_us-gaap_ClassOfStockDomain_B52BB8CC9112BCD66D96BA73C3EEDF05" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_F003D0485DBEBBA174D7BA73C3EEA9C0" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_B52BB8CC9112BCD66D96BA73C3EEDF05" xlink:to="loc_us-gaap_CommonClassAMember_F003D0485DBEBBA174D7BA73C3EEA9C0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesNewIssues" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_D45F6A99923C691C95E4BA73C3EEE4E3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_8C7249A2594645651D02BA73C3EEBB43" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_D45F6A99923C691C95E4BA73C3EEE4E3" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ProceedsFromIssuanceofCommonStockNetofStockIssuanceCosts" xlink:label="loc_nmih_ProceedsFromIssuanceofCommonStockNetofStockIssuanceCosts_3E8BD0B1AC5F8A1D877CBA73C3EECE21" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_8C7249A2594645651D02BA73C3EEBB43" xlink:to="loc_nmih_ProceedsFromIssuanceofCommonStockNetofStockIssuanceCosts_3E8BD0B1AC5F8A1D877CBA73C3EECE21" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_MaximumNumberofCommonStockSharesGrantedtoUnderwritersofIPO" xlink:label="loc_nmih_MaximumNumberofCommonStockSharesGrantedtoUnderwritersofIPO_2CA09D62A29BC4878BB9BA73C3EE5106" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_8C7249A2594645651D02BA73C3EEBB43" xlink:to="loc_nmih_MaximumNumberofCommonStockSharesGrantedtoUnderwritersofIPO_2CA09D62A29BC4878BB9BA73C3EE5106" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_MaximumnumberofCommonStockSharesGrantedtoUnderwritersofIPOExercisePrice" xlink:label="loc_nmih_MaximumnumberofCommonStockSharesGrantedtoUnderwritersofIPOExercisePrice_ACA6E31F66EAA3171177BA73C3EE48C3" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_8C7249A2594645651D02BA73C3EEBB43" xlink:to="loc_nmih_MaximumnumberofCommonStockSharesGrantedtoUnderwritersofIPOExercisePrice_ACA6E31F66EAA3171177BA73C3EE48C3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ProceedsFromIssuanceInitialPublicOffering" xlink:label="loc_us-gaap_ProceedsFromIssuanceInitialPublicOffering_335E1A6A42807BC0BA49BA73C3EE5B2B" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_8C7249A2594645651D02BA73C3EEBB43" xlink:to="loc_us-gaap_ProceedsFromIssuanceInitialPublicOffering_335E1A6A42807BC0BA49BA73C3EE5B2B" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ProceedsfromIssuanceInitialPublicOfferingNet" xlink:label="loc_nmih_ProceedsfromIssuanceInitialPublicOfferingNet_6430FE48147264A2C8C0BA73C3EFB819" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_8C7249A2594645651D02BA73C3EEBB43" xlink:to="loc_nmih_ProceedsfromIssuanceInitialPublicOfferingNet_6430FE48147264A2C8C0BA73C3EFB819" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ConsolidatedBalanceSheetsConsolidatedBalanceSheets" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_C8F1C0B6F50445F19D99BF14BE8DE285" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_61EEA9BB03F7C0909FA2BF14BE8D68EE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_C8F1C0B6F50445F19D99BF14BE8DE285" xlink:to="loc_us-gaap_StatementTable_61EEA9BB03F7C0909FA2BF14BE8D68EE" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_58C63D393DF5B5F0530BBF14BE8DE2ED" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_61EEA9BB03F7C0909FA2BF14BE8D68EE" xlink:to="loc_us-gaap_StatementClassOfStockAxis_58C63D393DF5B5F0530BBF14BE8DE2ED" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_FE04E77AD361C142CBA3BF14BE8DE7F3_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_58C63D393DF5B5F0530BBF14BE8DE2ED" xlink:to="loc_us-gaap_ClassOfStockDomain_FE04E77AD361C142CBA3BF14BE8DE7F3_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_FE04E77AD361C142CBA3BF14BE8DE7F3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_58C63D393DF5B5F0530BBF14BE8DE2ED" xlink:to="loc_us-gaap_ClassOfStockDomain_FE04E77AD361C142CBA3BF14BE8DE7F3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_E9695EE0077217E1DC8DBF14BE8D4DF3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_FE04E77AD361C142CBA3BF14BE8DE7F3" xlink:to="loc_us-gaap_CommonClassAMember_E9695EE0077217E1DC8DBF14BE8D4DF3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetsAbstract" xlink:label="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_C8F1C0B6F50445F19D99BF14BE8DE285" xlink:to="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_C07A4D176325ADA31BDEBF14BE8D8AE3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_C07A4D176325ADA31BDEBF14BE8D8AE3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_426A962225177B270CD7BF14BE8DC631" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_426A962225177B270CD7BF14BE8DC631" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PremiumsReceivableAtCarryingValue" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_AC37DB7D2558623D927CBF14BE8EB3C1" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_AC37DB7D2558623D927CBF14BE8EB3C1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_2B6F18BAA36B8CBA9133BF14BE8EE08A" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_2B6F18BAA36B8CBA9133BF14BE8EE08A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_EB4AB8DF5BA86D7C2D76BF14BE8E59C0" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_EB4AB8DF5BA86D7C2D76BF14BE8E59C0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DeferredPolicyAcquisitionCosts" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_86D14B08D447BD840CA0BF14BE8EFA93" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_86D14B08D447BD840CA0BF14BE8EFA93" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_21383D48B3C32B540CB7BF14BE8E67FB" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_21383D48B3C32B540CB7BF14BE8E67FB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_7F10A1B7BE430E35FA3DBF14BE8EBE90" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_7F10A1B7BE430E35FA3DBF14BE8EBE90" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherAssets" xlink:label="loc_us-gaap_OtherAssets_1746FFF3C9F03350D939BF14BE8EFD9A" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:to="loc_us-gaap_OtherAssets_1746FFF3C9F03350D939BF14BE8EFD9A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_F3AE0DEAD829B8832AE4BF14BE8E5FB3" xlink:type="locator" />
    <definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_9FF20EA954AE3CAE74F3BF14BE8DF3AA" xlink:to="loc_us-gaap_Assets_F3AE0DEAD829B8832AE4BF14BE8E5FB3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilitiesAbstract" xlink:label="loc_us-gaap_LiabilitiesAbstract_AFEE4D49FCA5FF5F8EC1BF14BE8E6329" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_C8F1C0B6F50445F19D99BF14BE8DE285" xlink:to="loc_us-gaap_LiabilitiesAbstract_AFEE4D49FCA5FF5F8EC1BF14BE8E6329" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_AA8EA163A268530508B4BF14BE8E16A3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_AFEE4D49FCA5FF5F8EC1BF14BE8E6329" xlink:to="loc_us-gaap_LongTermDebt_AA8EA163A268530508B4BF14BE8E16A3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_UnearnedPremiums" xlink:label="loc_us-gaap_UnearnedPremiums_941A24187CFA7B5AF73DBF14BE8E7477" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_AFEE4D49FCA5FF5F8EC1BF14BE8E6329" xlink:to="loc_us-gaap_UnearnedPremiums_941A24187CFA7B5AF73DBF14BE8E7477" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent" xlink:label="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_07F524386EC865E9CE2DBF14BE8E076F" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_AFEE4D49FCA5FF5F8EC1BF14BE8E6329" xlink:to="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_07F524386EC865E9CE2DBF14BE8E076F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_FE95AF51EF8341B09EEDBF14BE8E7139" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_AFEE4D49FCA5FF5F8EC1BF14BE8E6329" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_FE95AF51EF8341B09EEDBF14BE8E7139" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_WarrantLiability" xlink:label="loc_nmih_WarrantLiability_F65429FC2FCA19FEE54EBF14BE8E1119" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_AFEE4D49FCA5FF5F8EC1BF14BE8E6329" xlink:to="loc_nmih_WarrantLiability_F65429FC2FCA19FEE54EBF14BE8E1119" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DeferredTaxLiabilities" xlink:label="loc_us-gaap_DeferredTaxLiabilities_D2192BD1FC90FB4CCE28BF14BE8ED7F2" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_AFEE4D49FCA5FF5F8EC1BF14BE8E6329" xlink:to="loc_us-gaap_DeferredTaxLiabilities_D2192BD1FC90FB4CCE28BF14BE8ED7F2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Liabilities" xlink:label="loc_us-gaap_Liabilities_E2D1D2647D24F1165E75BF14BE8E5805" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_AFEE4D49FCA5FF5F8EC1BF14BE8E6329" xlink:to="loc_us-gaap_Liabilities_E2D1D2647D24F1165E75BF14BE8E5805" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommitmentsAndContingencies" xlink:label="loc_us-gaap_CommitmentsAndContingencies_6DC9DC8201096A5C99A0BF14BE8F239F" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_C8F1C0B6F50445F19D99BF14BE8DE285" xlink:to="loc_us-gaap_CommitmentsAndContingencies_6DC9DC8201096A5C99A0BF14BE8F239F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockholdersEquityAbstract" xlink:label="loc_us-gaap_StockholdersEquityAbstract_53E080E721FFF77BD329BF14BE8F6040" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_C8F1C0B6F50445F19D99BF14BE8DE285" xlink:to="loc_us-gaap_StockholdersEquityAbstract_53E080E721FFF77BD329BF14BE8F6040" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockValueOutstanding" xlink:label="loc_us-gaap_CommonStockValueOutstanding_6A88482BB2132443EC2BBF14BE8FFF00" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_53E080E721FFF77BD329BF14BE8F6040" xlink:to="loc_us-gaap_CommonStockValueOutstanding_6A88482BB2132443EC2BBF14BE8FFF00" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AdditionalPaidInCapital" xlink:label="loc_us-gaap_AdditionalPaidInCapital_FDC578DA80206CC55FEDBF14BE8FDA65" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_53E080E721FFF77BD329BF14BE8F6040" xlink:to="loc_us-gaap_AdditionalPaidInCapital_FDC578DA80206CC55FEDBF14BE8FDA65" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_E9E135F1673330AE26A2BF14BE8FB4A9" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_53E080E721FFF77BD329BF14BE8F6040" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_E9E135F1673330AE26A2BF14BE8FB4A9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_0BF1D8D3C8F4BD47AD5DBF14BE8F5111" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_53E080E721FFF77BD329BF14BE8F6040" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_0BF1D8D3C8F4BD47AD5DBF14BE8F5111" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_B2DF2AD5DC2B74C269A5BF14BE8F9E8B" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_53E080E721FFF77BD329BF14BE8F6040" xlink:to="loc_us-gaap_StockholdersEquity_B2DF2AD5DC2B74C269A5BF14BE8F9E8B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_1F58F4A6D834254E4CD4BF14BE8F138B" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_C8F1C0B6F50445F19D99BF14BE8DE285" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_1F58F4A6D834254E4CD4BF14BE8F138B" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ConsolidatedBalanceSheetsParenthetical" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_5C9C383A86CE53DAA9B5ACE0BB364BB7" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_8DA2B769EBF25EE69468F67E57F2E461" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_5C9C383A86CE53DAA9B5ACE0BB364BB7" xlink:to="loc_us-gaap_StatementTable_8DA2B769EBF25EE69468F67E57F2E461" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_727EC2217AC25FE694916A5BED6F9F78" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_8DA2B769EBF25EE69468F67E57F2E461" xlink:to="loc_us-gaap_StatementClassOfStockAxis_727EC2217AC25FE694916A5BED6F9F78" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_B3DB68AC6952D9340F1923181A7D1DB8_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_727EC2217AC25FE694916A5BED6F9F78" xlink:to="loc_us-gaap_ClassOfStockDomain_B3DB68AC6952D9340F1923181A7D1DB8_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_3D06CD72E4E55592A0868E3D17148835" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_727EC2217AC25FE694916A5BED6F9F78" xlink:to="loc_us-gaap_ClassOfStockDomain_3D06CD72E4E55592A0868E3D17148835" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_16E600C677015EF09C6EF5FE24EFAF1F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3D06CD72E4E55592A0868E3D17148835" xlink:to="loc_us-gaap_CommonClassAMember_16E600C677015EF09C6EF5FE24EFAF1F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_B393A8D34BCD510E9DAE640F36D9E28D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_5C9C383A86CE53DAA9B5ACE0BB364BB7" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_B393A8D34BCD510E9DAE640F36D9E28D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockParOrStatedValuePerShare" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_ABCD3FE7E5AC5D56BA2CFFF7F89EE109" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_5C9C383A86CE53DAA9B5ACE0BB364BB7" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_ABCD3FE7E5AC5D56BA2CFFF7F89EE109" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockSharesIssued" xlink:label="loc_us-gaap_CommonStockSharesIssued_E45E1B00749D554E9B9322D1791773D3" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_5C9C383A86CE53DAA9B5ACE0BB364BB7" xlink:to="loc_us-gaap_CommonStockSharesIssued_E45E1B00749D554E9B9322D1791773D3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockSharesOutstanding" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_539C858A36975F97969DEC3938554D64" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_5C9C383A86CE53DAA9B5ACE0BB364BB7" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_539C858A36975F97969DEC3938554D64" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockSharesAuthorized" xlink:label="loc_us-gaap_CommonStockSharesAuthorized_FC644DE402E55B5D910120DB2D77C9EA" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_5C9C383A86CE53DAA9B5ACE0BB364BB7" xlink:to="loc_us-gaap_CommonStockSharesAuthorized_FC644DE402E55B5D910120DB2D77C9EA" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfCashFlows" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfComprehensiveLossConsolidatedStatementsOfComprehensiveLoss" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfComprehensiveLossParenthetical" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfShareholdersEquity" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_570BC7B51FAA40B42A6BBCFB6101F064" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_69DE40D43FC995E2A3A5BCFB6100FA19" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_570BC7B51FAA40B42A6BBCFB6101F064" xlink:to="loc_us-gaap_StatementTable_69DE40D43FC995E2A3A5BCFB6100FA19" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_AC4F29408A4144C2FAF8BCFB61008AAD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_69DE40D43FC995E2A3A5BCFB6100FA19" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_AC4F29408A4144C2FAF8BCFB61008AAD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_B46CD3E8334520FEC829BCFB61009A09_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_AC4F29408A4144C2FAF8BCFB61008AAD" xlink:to="loc_us-gaap_EquityComponentDomain_B46CD3E8334520FEC829BCFB61009A09_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_B46CD3E8334520FEC829BCFB61009A09" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_AC4F29408A4144C2FAF8BCFB61008AAD" xlink:to="loc_us-gaap_EquityComponentDomain_B46CD3E8334520FEC829BCFB61009A09" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockMember" xlink:label="loc_us-gaap_CommonStockMember_66E98D1A88C51DE167E1BCFB6100CBA7" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_B46CD3E8334520FEC829BCFB61009A09" xlink:to="loc_us-gaap_CommonStockMember_66E98D1A88C51DE167E1BCFB6100CBA7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AdditionalPaidInCapitalMember" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_C2975DC232FF8F17A27ABCFB6100C4C1" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_B46CD3E8334520FEC829BCFB61009A09" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_C2975DC232FF8F17A27ABCFB6100C4C1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_1267D8B3326C884249DEBCFB61005379" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_B46CD3E8334520FEC829BCFB61009A09" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_1267D8B3326C884249DEBCFB61005379" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RetainedEarningsMember" xlink:label="loc_us-gaap_RetainedEarningsMember_CBD9FB6FBCD169950979BCFB610044A7" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_B46CD3E8334520FEC829BCFB61009A09" xlink:to="loc_us-gaap_RetainedEarningsMember_CBD9FB6FBCD169950979BCFB610044A7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_3511E97405981775C0DCBCFB6100E5B4" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_69DE40D43FC995E2A3A5BCFB6100FA19" xlink:to="loc_us-gaap_StatementClassOfStockAxis_3511E97405981775C0DCBCFB6100E5B4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_3162E1E0532378DE2CE8BCFB6100C794_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_3511E97405981775C0DCBCFB6100E5B4" xlink:to="loc_us-gaap_ClassOfStockDomain_3162E1E0532378DE2CE8BCFB6100C794_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_3162E1E0532378DE2CE8BCFB6100C794" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_3511E97405981775C0DCBCFB6100E5B4" xlink:to="loc_us-gaap_ClassOfStockDomain_3162E1E0532378DE2CE8BCFB6100C794" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_1B3871946165A672BD6BBCFB6100FE2F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3162E1E0532378DE2CE8BCFB6100C794" xlink:to="loc_us-gaap_CommonClassAMember_1B3871946165A672BD6BBCFB6100FE2F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassBMember" xlink:label="loc_us-gaap_CommonClassBMember_4261E46B176EE7EF41D5BCFB6101A18F" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_3162E1E0532378DE2CE8BCFB6100C794" xlink:to="loc_us-gaap_CommonClassBMember_4261E46B176EE7EF41D5BCFB6101A18F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_04734010173DC47E8DA9BCFB6101BEB3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_570BC7B51FAA40B42A6BBCFB6101F064" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_04734010173DC47E8DA9BCFB6101BEB3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_96FDEC1DC3B9A0A3FD93BCFB610126EC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_04734010173DC47E8DA9BCFB6101BEB3" xlink:to="loc_us-gaap_StockholdersEquity_96FDEC1DC3B9A0A3FD93BCFB610126EC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_1011AF682574CA3FB8D6BCFB6101E11F" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_04734010173DC47E8DA9BCFB6101BEB3" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueEmployeeStockPurchasePlan_1011AF682574CA3FB8D6BCFB6101E11F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_D45555D8E1A3B583716BBCFB6101D324" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_04734010173DC47E8DA9BCFB6101BEB3" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_D45555D8E1A3B583716BBCFB6101D324" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax_F171B8D3021E5426A206BCFB61017207" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_04734010173DC47E8DA9BCFB6101BEB3" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax_F171B8D3021E5426A206BCFB61017207" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_71119845EDAC3EEAEF6BBCFB6101CBA9" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_04734010173DC47E8DA9BCFB6101BEB3" xlink:to="loc_us-gaap_NetIncomeLoss_71119845EDAC3EEAEF6BBCFB6101CBA9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockAndWarrantsIssuedDuringPeriodValuePreferredStockAndWarrants" xlink:label="loc_us-gaap_StockAndWarrantsIssuedDuringPeriodValuePreferredStockAndWarrants_82A397873AE005EAC82FBCFB6101F437" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_04734010173DC47E8DA9BCFB6101BEB3" xlink:to="loc_us-gaap_StockAndWarrantsIssuedDuringPeriodValuePreferredStockAndWarrants_82A397873AE005EAC82FBCFB6101F437" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueNewIssues" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueNewIssues_E4C992A6AD70B861FBC5BCFB61011FF2" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_04734010173DC47E8DA9BCFB6101BEB3" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueNewIssues_E4C992A6AD70B861FBC5BCFB61011FF2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodValueAcquisitions" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueAcquisitions_F24F6E6B0E2B39609869BCFB6101E666" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_04734010173DC47E8DA9BCFB6101BEB3" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueAcquisitions_F24F6E6B0E2B39609869BCFB6101E666" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ConsolidatedStatementsOfShareholdersEquityParenthetical" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_9A9DE8E08BC58E8FDBDFBDFCCD36C70A" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_C833CF2C8EF7FA603609BDFCCD35175F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_9A9DE8E08BC58E8FDBDFBDFCCD36C70A" xlink:to="loc_us-gaap_StatementTable_C833CF2C8EF7FA603609BDFCCD35175F" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_F6D8331B25D80A199A4EBDFCCD35AEC7" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_C833CF2C8EF7FA603609BDFCCD35175F" xlink:to="loc_us-gaap_StatementClassOfStockAxis_F6D8331B25D80A199A4EBDFCCD35AEC7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_C85EBC49A1C5E42BC0DBBDFCCD35DB9E_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_F6D8331B25D80A199A4EBDFCCD35AEC7" xlink:to="loc_us-gaap_ClassOfStockDomain_C85EBC49A1C5E42BC0DBBDFCCD35DB9E_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_C85EBC49A1C5E42BC0DBBDFCCD35DB9E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_F6D8331B25D80A199A4EBDFCCD35AEC7" xlink:to="loc_us-gaap_ClassOfStockDomain_C85EBC49A1C5E42BC0DBBDFCCD35DB9E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_FF12CB54C301E8FDF0CBBDFCCD36096D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_C85EBC49A1C5E42BC0DBBDFCCD35DB9E" xlink:to="loc_us-gaap_CommonClassAMember_FF12CB54C301E8FDF0CBBDFCCD36096D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_02A218A864539E50C14DBDFCCD367622" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_C833CF2C8EF7FA603609BDFCCD35175F" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_02A218A864539E50C14DBDFCCD367622" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_899492EB6D7AD336CF05BDFCCD361CA1_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_02A218A864539E50C14DBDFCCD367622" xlink:to="loc_us-gaap_EquityComponentDomain_899492EB6D7AD336CF05BDFCCD361CA1_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_899492EB6D7AD336CF05BDFCCD361CA1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_02A218A864539E50C14DBDFCCD367622" xlink:to="loc_us-gaap_EquityComponentDomain_899492EB6D7AD336CF05BDFCCD361CA1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockMember" xlink:label="loc_us-gaap_CommonStockMember_603F8D21E3000D2A26BBBDFCCD36759D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_899492EB6D7AD336CF05BDFCCD361CA1" xlink:to="loc_us-gaap_CommonStockMember_603F8D21E3000D2A26BBBDFCCD36759D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesNewIssues" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_90B1DBB5E9DE679EF81CBDFCCD36524C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_9A9DE8E08BC58E8FDBDFBDFCCD36C70A" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_90B1DBB5E9DE679EF81CBDFCCD36524C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockParOrStatedValuePerShare" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_6C5F780EFAA1FB44933FBDFCCD36918E" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_9A9DE8E08BC58E8FDBDFBDFCCD36C70A" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_6C5F780EFAA1FB44933FBDFCCD36918E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesOther" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesOther_7E0A8E3CFB72059E983EBDFCCD36A0A3" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_9A9DE8E08BC58E8FDBDFBDFCCD36C70A" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesOther_7E0A8E3CFB72059E983EBDFCCD36A0A3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PaymentsOfStockIssuanceCosts" xlink:label="loc_us-gaap_PaymentsOfStockIssuanceCosts_78C0C7E084456865FAD7BDFCCD36E603" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_9A9DE8E08BC58E8FDBDFBDFCCD36C70A" xlink:to="loc_us-gaap_PaymentsOfStockIssuanceCosts_78C0C7E084456865FAD7BDFCCD36E603" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodTax_FA3A66DFD97788722598BDFCCD364DCF" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_9A9DE8E08BC58E8FDBDFBDFCCD36C70A" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodTax_FA3A66DFD97788722598BDFCCD364DCF" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/DocumentAndEntityInformation" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstruments" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsAssetsAndLiabilitiesAtFairValueDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_020C52D777CE6A2C36AAB23B9A3DBC49" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_3158BA02AFC1C86F3194B23B9A3C8218" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_020C52D777CE6A2C36AAB23B9A3DBC49" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_3158BA02AFC1C86F3194B23B9A3C8218" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_E34A993ED102EF0A2DADB23B9A3D4F90" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_3158BA02AFC1C86F3194B23B9A3C8218" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_E34A993ED102EF0A2DADB23B9A3D4F90" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_3F2A7B307BD28B61441FB23B9A3DA6D7_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_E34A993ED102EF0A2DADB23B9A3D4F90" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_3F2A7B307BD28B61441FB23B9A3DA6D7_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_3F2A7B307BD28B61441FB23B9A3DA6D7" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_E34A993ED102EF0A2DADB23B9A3D4F90" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_3F2A7B307BD28B61441FB23B9A3DA6D7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_C4C953AED5D9EAD44C08B23B9A3D9A6E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_3F2A7B307BD28B61441FB23B9A3DA6D7" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_C4C953AED5D9EAD44C08B23B9A3D9A6E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_2649B451A21D0A778F44B23B9A3DF682" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_3F2A7B307BD28B61441FB23B9A3DA6D7" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_2649B451A21D0A778F44B23B9A3DF682" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_7D78B669D54F53C84C62B23B9A3DBA4D" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_3F2A7B307BD28B61441FB23B9A3DA6D7" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_7D78B669D54F53C84C62B23B9A3DBA4D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_AC9BE7039B55BE55A254B23B9A3DF541" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_3F2A7B307BD28B61441FB23B9A3DA6D7" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_AC9BE7039B55BE55A254B23B9A3DF541" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByMeasurementFrequencyAxis" xlink:label="loc_us-gaap_FairValueByMeasurementFrequencyAxis_49A1A04EC638D8F04074B23B9A3D04A6" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_3158BA02AFC1C86F3194B23B9A3C8218" xlink:to="loc_us-gaap_FairValueByMeasurementFrequencyAxis_49A1A04EC638D8F04074B23B9A3D04A6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_90D78F3B069DDB989ACDB23B9A3D2479_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_49A1A04EC638D8F04074B23B9A3D04A6" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_90D78F3B069DDB989ACDB23B9A3D2479_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_90D78F3B069DDB989ACDB23B9A3D2479" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_49A1A04EC638D8F04074B23B9A3D04A6" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_90D78F3B069DDB989ACDB23B9A3D2479" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsRecurringMember" xlink:label="loc_us-gaap_FairValueMeasurementsRecurringMember_78C91F890F61ABD21048B23B9A3D187D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementFrequencyDomain_90D78F3B069DDB989ACDB23B9A3D2479" xlink:to="loc_us-gaap_FairValueMeasurementsRecurringMember_78C91F890F61ABD21048B23B9A3D187D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_38AE6F835B672C1D61DDB23B9A3DEA27" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_3158BA02AFC1C86F3194B23B9A3C8218" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_38AE6F835B672C1D61DDB23B9A3DEA27" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5A02A69EEB831903AD3DB23B9A3D87F5_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_38AE6F835B672C1D61DDB23B9A3DEA27" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5A02A69EEB831903AD3DB23B9A3D87F5_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5A02A69EEB831903AD3DB23B9A3D87F5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_38AE6F835B672C1D61DDB23B9A3DEA27" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5A02A69EEB831903AD3DB23B9A3D87F5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel1Member" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_E62A5248BC4052CA1888B23B9A3DA8AC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5A02A69EEB831903AD3DB23B9A3D87F5" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_E62A5248BC4052CA1888B23B9A3DA8AC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel2Member" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_DA7E70FB467FCFEBF1EAB23B9A3DAD09" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5A02A69EEB831903AD3DB23B9A3D87F5" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_DA7E70FB467FCFEBF1EAB23B9A3DAD09" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_CFCFCA982DE07DD47FFFB23B9A3DF70F" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5A02A69EEB831903AD3DB23B9A3D87F5" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_CFCFCA982DE07DD47FFFB23B9A3DF70F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_F04308816CA00F26B1B0B23B9A3D6314" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_020C52D777CE6A2C36AAB23B9A3DBC49" xlink:to="loc_us-gaap_AvailableForSaleSecurities_F04308816CA00F26B1B0B23B9A3D6314" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CashAndCashEquivalentsFairValueDisclosure" xlink:label="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_836816903497930748FAB23B9A3DAD2A" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_020C52D777CE6A2C36AAB23B9A3DBC49" xlink:to="loc_us-gaap_CashAndCashEquivalentsFairValueDisclosure_836816903497930748FAB23B9A3DAD2A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetsFairValueDisclosure" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_4EB33DBCA582CD4CB5F5B23B9A4287BD" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_020C52D777CE6A2C36AAB23B9A3DBC49" xlink:to="loc_us-gaap_AssetsFairValueDisclosure_4EB33DBCA582CD4CB5F5B23B9A4287BD" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_WarrantLiability" xlink:label="loc_nmih_WarrantLiability_8E86961330B3E1A85322B23B9A43B252" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_020C52D777CE6A2C36AAB23B9A3DBC49" xlink:to="loc_nmih_WarrantLiability_8E86961330B3E1A85322B23B9A43B252" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilitiesFairValueDisclosure" xlink:label="loc_us-gaap_LiabilitiesFairValueDisclosure_848E4BDEB53CB41B1EB6B23B9A43DE3C" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_020C52D777CE6A2C36AAB23B9A3DBC49" xlink:to="loc_us-gaap_LiabilitiesFairValueDisclosure_848E4BDEB53CB41B1EB6B23B9A43DE3C" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_A45C73E153D5A2394174E5BB26933FED" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_63C3153C2376CAFB2A4CE5BB268D4D0F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_A45C73E153D5A2394174E5BB26933FED" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_63C3153C2376CAFB2A4CE5BB268D4D0F" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_088518212994F365E985E5CB15CDEC46" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_63C3153C2376CAFB2A4CE5BB268D4D0F" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_088518212994F365E985E5CB15CDEC46" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_63479879F840E576BD3EE5CB15CE93AB_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_088518212994F365E985E5CB15CDEC46" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_63479879F840E576BD3EE5CB15CE93AB_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_63479879F840E576BD3EE5CB15CE93AB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_088518212994F365E985E5CB15CDEC46" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_63479879F840E576BD3EE5CB15CE93AB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_214CCD1E9CB2C041104FE5CB168D3223" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_63479879F840E576BD3EE5CB15CE93AB" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_214CCD1E9CB2C041104FE5CB168D3223" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_537B6FAEBF7D1292C65AE5CB16C0EED8" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_63479879F840E576BD3EE5CB15CE93AB" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_537B6FAEBF7D1292C65AE5CB16C0EED8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByMeasurementFrequencyAxis" xlink:label="loc_us-gaap_FairValueByMeasurementFrequencyAxis_4FDE5877A94F05B3892CE5CB157EDA85" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_63C3153C2376CAFB2A4CE5BB268D4D0F" xlink:to="loc_us-gaap_FairValueByMeasurementFrequencyAxis_4FDE5877A94F05B3892CE5CB157EDA85" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_942B4647BE7451A6CE07E5CB157E4ED2_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_4FDE5877A94F05B3892CE5CB157EDA85" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_942B4647BE7451A6CE07E5CB157E4ED2_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementFrequencyDomain" xlink:label="loc_us-gaap_FairValueMeasurementFrequencyDomain_942B4647BE7451A6CE07E5CB157E4ED2" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementFrequencyAxis_4FDE5877A94F05B3892CE5CB157EDA85" xlink:to="loc_us-gaap_FairValueMeasurementFrequencyDomain_942B4647BE7451A6CE07E5CB157E4ED2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsRecurringMember" xlink:label="loc_us-gaap_FairValueMeasurementsRecurringMember_FADE2F893AB0CFEDA5ACE5CB165BACBE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementFrequencyDomain_942B4647BE7451A6CE07E5CB157E4ED2" xlink:to="loc_us-gaap_FairValueMeasurementsRecurringMember_FADE2F893AB0CFEDA5ACE5CB165BACBE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByAssetClassAxis" xlink:label="loc_us-gaap_FairValueByAssetClassAxis_59DD59831322EB6D313CE5C3EAA9911B" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_63C3153C2376CAFB2A4CE5BB268D4D0F" xlink:to="loc_us-gaap_FairValueByAssetClassAxis_59DD59831322EB6D313CE5C3EAA9911B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_6E3C4B98060691916EE0E5C59C2C053E_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_59DD59831322EB6D313CE5C3EAA9911B" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_6E3C4B98060691916EE0E5C59C2C053E_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_6E3C4B98060691916EE0E5C59C2C053E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_59DD59831322EB6D313CE5C3EAA9911B" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_6E3C4B98060691916EE0E5C59C2C053E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ForeignCorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_ForeignCorporateDebtSecuritiesMember_6F3A77771D5A745FF3A0E5C549A7B880" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_6E3C4B98060691916EE0E5C59C2C053E" xlink:to="loc_us-gaap_ForeignCorporateDebtSecuritiesMember_6F3A77771D5A745FF3A0E5C549A7B880" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_YankeeBondsMember" xlink:label="loc_nmih_YankeeBondsMember_52F6EA075462C02531D6E5C8C4BA3429" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_6E3C4B98060691916EE0E5C59C2C053E" xlink:to="loc_nmih_YankeeBondsMember_52F6EA075462C02531D6E5C8C4BA3429" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByLiabilityClassAxis" xlink:label="loc_us-gaap_FairValueByLiabilityClassAxis_658AC9F0DCEAE95C7DA1E5BB268D70F8" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_63C3153C2376CAFB2A4CE5BB268D4D0F" xlink:to="loc_us-gaap_FairValueByLiabilityClassAxis_658AC9F0DCEAE95C7DA1E5BB268D70F8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_C2200761905D64B071EEE5BB268DBC50_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByLiabilityClassAxis_658AC9F0DCEAE95C7DA1E5BB268D70F8" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_C2200761905D64B071EEE5BB268DBC50_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_C2200761905D64B071EEE5BB268DBC50" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByLiabilityClassAxis_658AC9F0DCEAE95C7DA1E5BB268D70F8" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_C2200761905D64B071EEE5BB268DBC50" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_WarrantLiabilityMember" xlink:label="loc_nmih_WarrantLiabilityMember_0CB10226837EE731D936E5BB26921A7B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_C2200761905D64B071EEE5BB268DBC50" xlink:to="loc_nmih_WarrantLiabilityMember_0CB10226837EE731D936E5BB26921A7B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_B1822849ECDECAEB9519E5BB26923755" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_63C3153C2376CAFB2A4CE5BB268D4D0F" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_B1822849ECDECAEB9519E5BB26923755" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_081B8077B93D1C1799F3E5BB2692083A_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_B1822849ECDECAEB9519E5BB26923755" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_081B8077B93D1C1799F3E5BB2692083A_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_081B8077B93D1C1799F3E5BB2692083A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_B1822849ECDECAEB9519E5BB26923755" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_081B8077B93D1C1799F3E5BB2692083A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel2Member" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_C8D6DC6F0B14F0427EB9E5CB162B6683" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_081B8077B93D1C1799F3E5BB2692083A" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_C8D6DC6F0B14F0427EB9E5CB162B6683" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_BAAB642A9CED9D158891E5BB26928B2B" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_081B8077B93D1C1799F3E5BB2692083A" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_BAAB642A9CED9D158891E5BB26928B2B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_5BBF8100EC57B96CD713E5CB15527B2D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_A45C73E153D5A2394174E5BB26933FED" xlink:to="loc_us-gaap_AvailableForSaleSecurities_5BBF8100EC57B96CD713E5CB15527B2D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharePrice" xlink:label="loc_us-gaap_SharePrice_1FA2FE3491DABC9A455FE5BB26932FB3" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_A45C73E153D5A2394174E5BB26933FED" xlink:to="loc_us-gaap_SharePrice_1FA2FE3491DABC9A455FE5BB26932FB3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssumptionsRiskFreeInterestRate" xlink:label="loc_us-gaap_FairValueAssumptionsRiskFreeInterestRate_69258813A1BB4B3D8208E5BB2693AC62" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_A45C73E153D5A2394174E5BB26933FED" xlink:to="loc_us-gaap_FairValueAssumptionsRiskFreeInterestRate_69258813A1BB4B3D8208E5BB2693AC62" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssumptionsExpectedTerm" xlink:label="loc_us-gaap_FairValueAssumptionsExpectedTerm_4A8B300D74907DF89A8CE5BB2693CBE3" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_A45C73E153D5A2394174E5BB26933FED" xlink:to="loc_us-gaap_FairValueAssumptionsExpectedTerm_4A8B300D74907DF89A8CE5BB2693CBE3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssumptionsExpectedVolatilityRate" xlink:label="loc_us-gaap_FairValueAssumptionsExpectedVolatilityRate_2EADA2588015C16DC41CE5BB26935A2D" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_A45C73E153D5A2394174E5BB26933FED" xlink:to="loc_us-gaap_FairValueAssumptionsExpectedVolatilityRate_2EADA2588015C16DC41CE5BB26935A2D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueAssumptionsExpectedDividendRate" xlink:label="loc_us-gaap_FairValueAssumptionsExpectedDividendRate_4545E766BA391DE231F0E5BB26934573" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_A45C73E153D5A2394174E5BB26933FED" xlink:to="loc_us-gaap_FairValueAssumptionsExpectedDividendRate_4545E766BA391DE231F0E5BB26934573" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsRollFowardOfLevel3LiabilitiesMeasuredAtFairValueDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems_F15E819E591DDE8D1CECBCFB60B40758" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationTable" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationTable_3B616E579BB6F9EE3338BCFB60B37D67" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems_F15E819E591DDE8D1CECBCFB60B40758" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationTable_3B616E579BB6F9EE3338BCFB60B37D67" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_FA4C467DD056199E586CBCFB60B3DF9C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationTable_3B616E579BB6F9EE3338BCFB60B37D67" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_FA4C467DD056199E586CBCFB60B3DF9C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5D53CD153716EF88DAA7BCFB60B34337_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_FA4C467DD056199E586CBCFB60B3DF9C" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5D53CD153716EF88DAA7BCFB60B34337_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5D53CD153716EF88DAA7BCFB60B34337" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_FA4C467DD056199E586CBCFB60B3DF9C" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5D53CD153716EF88DAA7BCFB60B34337" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_7EE241CD93B8DB961F67BCFB60B31160" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_5D53CD153716EF88DAA7BCFB60B34337" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_7EE241CD93B8DB961F67BCFB60B31160" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByLiabilityClassAxis" xlink:label="loc_us-gaap_FairValueByLiabilityClassAxis_38D4BD26F36898F30500BCFB60B3EDF0" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationTable_3B616E579BB6F9EE3338BCFB60B37D67" xlink:to="loc_us-gaap_FairValueByLiabilityClassAxis_38D4BD26F36898F30500BCFB60B3EDF0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_55093778F892766B4DAEBCFB60B3E4C4_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByLiabilityClassAxis_38D4BD26F36898F30500BCFB60B3EDF0" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_55093778F892766B4DAEBCFB60B3E4C4_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_55093778F892766B4DAEBCFB60B3E4C4" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByLiabilityClassAxis_38D4BD26F36898F30500BCFB60B3EDF0" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_55093778F892766B4DAEBCFB60B3E4C4" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_WarrantLiabilityMember" xlink:label="loc_nmih_WarrantLiabilityMember_49E2B1F91FF4B091E3DBBCFB60B3A1E4" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_55093778F892766B4DAEBCFB60B3E4C4" xlink:to="loc_nmih_WarrantLiabilityMember_49E2B1F91FF4B091E3DBBCFB60B3A1E4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_D813CE771B741FA862E7BCFB60B48161" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationLineItems_F15E819E591DDE8D1CECBCFB60B40758" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_D813CE771B741FA862E7BCFB60B48161" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue_96583F239536ED1B5547BCFB60B4180F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_D813CE771B741FA862E7BCFB60B48161" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationsRecurringBasisLiabilityValue_96583F239536ED1B5547BCFB60B4180F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings_491691E329EC0E93779EBCFB60B4D895" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_D813CE771B741FA862E7BCFB60B48161" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilityGainLossIncludedInEarnings_491691E329EC0E93779EBCFB60B4D895" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements_DBAAC31209610AFE3C6DBCFB60B4EF40" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_D813CE771B741FA862E7BCFB60B48161" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisLiabilitySettlements_DBAAC31209610AFE3C6DBCFB60B4EF40" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_WarrantLiabilityReductionTransferredtoEquity" xlink:label="loc_nmih_WarrantLiabilityReductionTransferredtoEquity_0D32C1723F94C6198123BCFB60B4DEE5" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationCalculationRollForward_D813CE771B741FA862E7BCFB60B48161" xlink:to="loc_nmih_WarrantLiabilityReductionTransferredtoEquity_0D32C1723F94C6198123BCFB60B4DEE5" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/FairValueOfFinancialInstrumentsTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IncomeTaxes" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesComponentsOfProvisionForIncomeTaxesBenefitsDetails" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesDeferredTaxAssetAndLiabilitiesDetails" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesIncomeTaxReconciliationDetails" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeTaxContingencyLineItems" xlink:label="loc_us-gaap_IncomeTaxContingencyLineItems_ACB0B39473BF71F87DD0EADFC9685D2A" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeTaxContingencyTable" xlink:label="loc_us-gaap_IncomeTaxContingencyTable_CA1C4D039421B6587837EADFC9678262" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_ACB0B39473BF71F87DD0EADFC9685D2A" xlink:to="loc_us-gaap_IncomeTaxContingencyTable_CA1C4D039421B6587837EADFC9678262" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeStatementLocationAxis" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_5AFC65D20E414C9BA903EB2340B5562B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_IncomeTaxContingencyTable_CA1C4D039421B6587837EADFC9678262" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_5AFC65D20E414C9BA903EB2340B5562B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_0C78A19021FA730AAD2DEB2340BA34D3_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_5AFC65D20E414C9BA903EB2340B5562B" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_0C78A19021FA730AAD2DEB2340BA34D3_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeStatementLocationDomain" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_0C78A19021FA730AAD2DEB2340BA34D3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_5AFC65D20E414C9BA903EB2340B5562B" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_0C78A19021FA730AAD2DEB2340BA34D3" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_IncomeTaxBenefitMember" xlink:label="loc_nmih_IncomeTaxBenefitMember_1042DF8B9F10CA666166EB25D2E61722" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_0C78A19021FA730AAD2DEB2340BA34D3" xlink:to="loc_nmih_IncomeTaxBenefitMember_1042DF8B9F10CA666166EB25D2E61722" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationAxis" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_A31BD932294062EBF956EB22F5974337" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_IncomeTaxContingencyTable_CA1C4D039421B6587837EADFC9678262" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_A31BD932294062EBF956EB22F5974337" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationDomain" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_9599A6E677A922D3A25CEB275152FA45_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_A31BD932294062EBF956EB22F5974337" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_9599A6E677A922D3A25CEB275152FA45_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeLocationDomain" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_9599A6E677A922D3A25CEB275152FA45" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLocationAxis_A31BD932294062EBF956EB22F5974337" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_9599A6E677A922D3A25CEB275152FA45" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeMember" xlink:label="loc_us-gaap_OtherComprehensiveIncomeMember_C29A3F0F825EFD62371DEB25259B9EE5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLocationDomain_9599A6E677A922D3A25CEB275152FA45" xlink:to="loc_us-gaap_OtherComprehensiveIncomeMember_C29A3F0F825EFD62371DEB25259B9EE5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeTaxAuthorityAxis" xlink:label="loc_us-gaap_IncomeTaxAuthorityAxis_762104740CCD4B9A0F0AEADFC967E6D7" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_IncomeTaxContingencyTable_CA1C4D039421B6587837EADFC9678262" xlink:to="loc_us-gaap_IncomeTaxAuthorityAxis_762104740CCD4B9A0F0AEADFC967E6D7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityDomain_B94B53BB1F2E49EF8BF5EADFC96773A7_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_762104740CCD4B9A0F0AEADFC967E6D7" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_B94B53BB1F2E49EF8BF5EADFC96773A7_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeTaxAuthorityDomain" xlink:label="loc_us-gaap_IncomeTaxAuthorityDomain_B94B53BB1F2E49EF8BF5EADFC96773A7" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeTaxAuthorityAxis_762104740CCD4B9A0F0AEADFC967E6D7" xlink:to="loc_us-gaap_IncomeTaxAuthorityDomain_B94B53BB1F2E49EF8BF5EADFC96773A7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DomesticCountryMember" xlink:label="loc_us-gaap_DomesticCountryMember_807F523DE4799961974FEADFC96715DA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_B94B53BB1F2E49EF8BF5EADFC96773A7" xlink:to="loc_us-gaap_DomesticCountryMember_807F523DE4799961974FEADFC96715DA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StateAndLocalJurisdictionMember" xlink:label="loc_us-gaap_StateAndLocalJurisdictionMember_12A773885A53E92CFF78EADFC968B931" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxAuthorityDomain_B94B53BB1F2E49EF8BF5EADFC96773A7" xlink:to="loc_us-gaap_StateAndLocalJurisdictionMember_12A773885A53E92CFF78EADFC968B931" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ExpirationPeriodAxis" xlink:label="loc_nmih_ExpirationPeriodAxis_C6F63E866663B3022544EADFC9685462" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_IncomeTaxContingencyTable_CA1C4D039421B6587837EADFC9678262" xlink:to="loc_nmih_ExpirationPeriodAxis_C6F63E866663B3022544EADFC9685462" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ExpirationPeriodDomain" xlink:label="loc_nmih_ExpirationPeriodDomain_99A9E20DC589C574F87FEADFC968107E_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_nmih_ExpirationPeriodAxis_C6F63E866663B3022544EADFC9685462" xlink:to="loc_nmih_ExpirationPeriodDomain_99A9E20DC589C574F87FEADFC968107E_default" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ExpirationPeriodDomain" xlink:label="loc_nmih_ExpirationPeriodDomain_99A9E20DC589C574F87FEADFC968107E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_nmih_ExpirationPeriodAxis_C6F63E866663B3022544EADFC9685462" xlink:to="loc_nmih_ExpirationPeriodDomain_99A9E20DC589C574F87FEADFC968107E" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_AnnualLimitationThroughYearTwoMember" xlink:label="loc_nmih_AnnualLimitationThroughYearTwoMember_047AD6D754AB5174E75CEADFC9687882" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_ExpirationPeriodDomain_99A9E20DC589C574F87FEADFC968107E" xlink:to="loc_nmih_AnnualLimitationThroughYearTwoMember_047AD6D754AB5174E75CEADFC9687882" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_AnnualLimitationsAfterYearTwoMember" xlink:label="loc_nmih_AnnualLimitationsAfterYearTwoMember_A9D2D1CE8E5B4188015FEADFC96886E1" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_ExpirationPeriodDomain_99A9E20DC589C574F87FEADFC968107E" xlink:to="loc_nmih_AnnualLimitationsAfterYearTwoMember_A9D2D1CE8E5B4188015FEADFC96886E1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DeferredTaxLiabilities" xlink:label="loc_us-gaap_DeferredTaxLiabilities_088CD8D28C7A4E1A91EFEADFC96846F8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_ACB0B39473BF71F87DD0EADFC9685D2A" xlink:to="loc_us-gaap_DeferredTaxLiabilities_088CD8D28C7A4E1A91EFEADFC96846F8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_14937A6926DCBD1395BBEADFC9684C6E" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_ACB0B39473BF71F87DD0EADFC9685D2A" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_14937A6926DCBD1395BBEADFC9684C6E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeTaxExpenseBenefitIntraperiodTaxAllocation" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefitIntraperiodTaxAllocation_C73E89FFAC92408A9E01EB22886372BD" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_ACB0B39473BF71F87DD0EADFC9685D2A" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefitIntraperiodTaxAllocation_C73E89FFAC92408A9E01EB22886372BD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalTaxEffectFromShareBasedCompensation" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalTaxEffectFromShareBasedCompensation_AA18667101B9CA852461EADFC9689EC6" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_ACB0B39473BF71F87DD0EADFC9685D2A" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalTaxEffectFromShareBasedCompensation_AA18667101B9CA852461EADFC9689EC6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OperatingLossCarryforwards" xlink:label="loc_us-gaap_OperatingLossCarryforwards_E2D1A6F1419648B40AA6EADFC9686B28" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_ACB0B39473BF71F87DD0EADFC9685D2A" xlink:to="loc_us-gaap_OperatingLossCarryforwards_E2D1A6F1419648B40AA6EADFC9686B28" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DeferredTaxAssetsOperatingLossCarryforwardsSubjectToExpiration" xlink:label="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwardsSubjectToExpiration_46AA37B72B2783A1D302EADFC968AD11" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_ACB0B39473BF71F87DD0EADFC9685D2A" xlink:to="loc_us-gaap_DeferredTaxAssetsOperatingLossCarryforwardsSubjectToExpiration_46AA37B72B2783A1D302EADFC968AD11" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DeferredTaxAssetsValuationAllowance" xlink:label="loc_us-gaap_DeferredTaxAssetsValuationAllowance_AB6CA4847651444B7226EADFC968C306" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_ACB0B39473BF71F87DD0EADFC9685D2A" xlink:to="loc_us-gaap_DeferredTaxAssetsValuationAllowance_AB6CA4847651444B7226EADFC968C306" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_UnrecognizedTaxBenefits" xlink:label="loc_us-gaap_UnrecognizedTaxBenefits_D2A0782BC9274804BCEFEADFC968C7BD" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeTaxContingencyLineItems_ACB0B39473BF71F87DD0EADFC9685D2A" xlink:to="loc_us-gaap_UnrecognizedTaxBenefits_D2A0782BC9274804BCEFEADFC968C7BD" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/IncomeTaxesTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwill" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_2C325010AF9059BE8CF9E23B30D335F1" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfIndefiniteLivedIntangibleAssetsTable" xlink:label="loc_us-gaap_ScheduleOfIndefiniteLivedIntangibleAssetsTable_C37418CD6D2F540C851CE754B95B0A7B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_2C325010AF9059BE8CF9E23B30D335F1" xlink:to="loc_us-gaap_ScheduleOfIndefiniteLivedIntangibleAssetsTable_C37418CD6D2F540C851CE754B95B0A7B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_E7713F49F4F051E5860863CE28BD6FB8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfIndefiniteLivedIntangibleAssetsTable_C37418CD6D2F540C851CE754B95B0A7B" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_E7713F49F4F051E5860863CE28BD6FB8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_7E9D7BBC56D47A430CB728142637E2CB_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_E7713F49F4F051E5860863CE28BD6FB8" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_7E9D7BBC56D47A430CB728142637E2CB_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_7D57066A1F2D539190A90B2D91FEE549" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_E7713F49F4F051E5860863CE28BD6FB8" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_7D57066A1F2D539190A90B2D91FEE549" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_StateLicensesMember" xlink:label="loc_nmih_StateLicensesMember_AC366F5CCC385C70BE91EFD0944F9F1C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_7D57066A1F2D539190A90B2D91FEE549" xlink:to="loc_nmih_StateLicensesMember_AC366F5CCC385C70BE91EFD0944F9F1C" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_GSEApprovalsMember" xlink:label="loc_nmih_GSEApprovalsMember_45B54247C87A5208B96ED25B94F1ED78" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_7D57066A1F2D539190A90B2D91FEE549" xlink:to="loc_nmih_GSEApprovalsMember_45B54247C87A5208B96ED25B94F1ED78" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Goodwill" xlink:label="loc_us-gaap_Goodwill_0691A9E330845FBFB41D3F96B5A3A4C2" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_2C325010AF9059BE8CF9E23B30D335F1" xlink:to="loc_us-gaap_Goodwill_0691A9E330845FBFB41D3F96B5A3A4C2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_AF80E58814405AC398843F73D3F894E5" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_2C325010AF9059BE8CF9E23B30D335F1" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_AF80E58814405AC398843F73D3F894E5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IntangibleAssetsNetIncludingGoodwill" xlink:label="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_6935D0AE074F52DA8BF914DF997E7BD2" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_2C325010AF9059BE8CF9E23B30D335F1" xlink:to="loc_us-gaap_IntangibleAssetsNetIncludingGoodwill_6935D0AE074F52DA8BF914DF997E7BD2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill" xlink:label="loc_us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill_65854AC49BC75D019AB21069DF2B82B7" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassLineItems_2C325010AF9059BE8CF9E23B30D335F1" xlink:to="loc_us-gaap_ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill_65854AC49BC75D019AB21069DF2B82B7" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/IntangibleAssetsAndGoodwillTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/Investments" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsFairValuesAndGrossUnrealizedGainsAndLossesOnInvestmentsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2CC64AC751AD487C2316E6108CA6D97C" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_4D1C375141BD47D84080E6108CA575F3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2CC64AC751AD487C2316E6108CA6D97C" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_4D1C375141BD47D84080E6108CA575F3" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_B4B67E6EEF494CF47B47E6108CA57599" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_4D1C375141BD47D84080E6108CA575F3" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_B4B67E6EEF494CF47B47E6108CA57599" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_576E56376903EA294164E6108CA5C8AF_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_B4B67E6EEF494CF47B47E6108CA57599" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_576E56376903EA294164E6108CA5C8AF_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_576E56376903EA294164E6108CA5C8AF" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_B4B67E6EEF494CF47B47E6108CA57599" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_576E56376903EA294164E6108CA5C8AF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_B1AE333F880CFBCB0650E6108CA539F8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_576E56376903EA294164E6108CA5C8AF" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_B1AE333F880CFBCB0650E6108CA539F8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_6B31130C6DFC933D0965E6108CA5E460" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_576E56376903EA294164E6108CA5C8AF" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_6B31130C6DFC933D0965E6108CA5E460" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_4C06B5181E2EA089B0FEE6108CA6AEE5" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_576E56376903EA294164E6108CA5C8AF" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_4C06B5181E2EA089B0FEE6108CA6AEE5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_C04742B96C5B1893A0E7E6108CA686BB" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_576E56376903EA294164E6108CA5C8AF" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_C04742B96C5B1893A0E7E6108CA686BB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BondsMember" xlink:label="loc_us-gaap_BondsMember_43952E5E15862A3AF96BE6108CA66F20" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_576E56376903EA294164E6108CA5C8AF" xlink:to="loc_us-gaap_BondsMember_43952E5E15862A3AF96BE6108CA66F20" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShortTermInvestmentsMember" xlink:label="loc_us-gaap_ShortTermInvestmentsMember_626F57469251EB73C498E6108CA60515" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_576E56376903EA294164E6108CA5C8AF" xlink:to="loc_us-gaap_ShortTermInvestmentsMember_626F57469251EB73C498E6108CA60515" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_534E0776FBEEFC93B0C9E6108CA63DDF" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2CC64AC751AD487C2316E6108CA6D97C" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_534E0776FBEEFC93B0C9E6108CA63DDF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_F5887A830BD5643B4776E6108CA6D7D3" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2CC64AC751AD487C2316E6108CA6D97C" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_F5887A830BD5643B4776E6108CA6D7D3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_A926CE258AF5684488A4E6108CA6AEA6" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2CC64AC751AD487C2316E6108CA6D97C" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_A926CE258AF5684488A4E6108CA6AEA6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCarryingAmount" xlink:label="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCarryingAmount_F056FB37042048FF0C6BE6108CA653AE" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2CC64AC751AD487C2316E6108CA6D97C" xlink:to="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCarryingAmount_F056FB37042048FF0C6BE6108CA653AE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_DB0197A204D4ABCC866AE6108CA6D8EA" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_2CC64AC751AD487C2316E6108CA6D97C" xlink:to="loc_us-gaap_AvailableForSaleSecurities_DB0197A204D4ABCC866AE6108CA6D8EA" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D08868BC780DEBED139AC27AF1A635E4" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_32EAA50AB552854FE88BC27AF1A5579F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D08868BC780DEBED139AC27AF1A635E4" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_32EAA50AB552854FE88BC27AF1A5579F" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_D8E8DA40A647B58BE9B8C27AF1A5941B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_32EAA50AB552854FE88BC27AF1A5579F" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_D8E8DA40A647B58BE9B8C27AF1A5941B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_CEA0A30F3BC8410BA96AC27AF1A6B411_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_D8E8DA40A647B58BE9B8C27AF1A5941B" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_CEA0A30F3BC8410BA96AC27AF1A6B411_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_CEA0A30F3BC8410BA96AC27AF1A6B411" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_D8E8DA40A647B58BE9B8C27AF1A5941B" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_CEA0A30F3BC8410BA96AC27AF1A6B411" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_DBF7993A40DB8B58C1D2C27AF1A60F00" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_CEA0A30F3BC8410BA96AC27AF1A6B411" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_DBF7993A40DB8B58C1D2C27AF1A60F00" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_36D75759C28273523AD8C27AF1A6A2C3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D08868BC780DEBED139AC27AF1A635E4" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_36D75759C28273523AD8C27AF1A6A2C3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_8962554DDB5BF8C86A68C27AF1A60411" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D08868BC780DEBED139AC27AF1A635E4" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_8962554DDB5BF8C86A68C27AF1A60411" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGains" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGains_1DECB35E6DCDCBD71798C27AF1A627CF" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D08868BC780DEBED139AC27AF1A635E4" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGains_1DECB35E6DCDCBD71798C27AF1A627CF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableforsaleSecuritiesGrossRealizedLossesExcludingOtherThanTemporaryImpairments" xlink:label="loc_us-gaap_AvailableforsaleSecuritiesGrossRealizedLossesExcludingOtherThanTemporaryImpairments_3C0CDC7BFF2016DC9571C27AF1A64DD2" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D08868BC780DEBED139AC27AF1A635E4" xlink:to="loc_us-gaap_AvailableforsaleSecuritiesGrossRealizedLossesExcludingOtherThanTemporaryImpairments_3C0CDC7BFF2016DC9571C27AF1A64DD2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CashCashEquivalentsAndShortTermInvestments" xlink:label="loc_us-gaap_CashCashEquivalentsAndShortTermInvestments_A95737537C1D06E1E55BC27AF1A63B26" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D08868BC780DEBED139AC27AF1A635E4" xlink:to="loc_us-gaap_CashCashEquivalentsAndShortTermInvestments_A95737537C1D06E1E55BC27AF1A63B26" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ImpairmentOfInvestments" xlink:label="loc_us-gaap_ImpairmentOfInvestments_6769306400069130535BC2E0371E80E3" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_D08868BC780DEBED139AC27AF1A635E4" xlink:to="loc_us-gaap_ImpairmentOfInvestments_6769306400069130535BC2E0371E80E3" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_FE26C4F864570CBCE5AABDFCCC3BA284" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_B7965E79A80245AECF06BDFCCC3BC1E1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_FE26C4F864570CBCE5AABDFCCC3BA284" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_B7965E79A80245AECF06BDFCCC3BC1E1" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InvestmentTypeAxis" xlink:label="loc_us-gaap_InvestmentTypeAxis_9C7A4D6AB8CAA39D9F91BDFCCC3BB287" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_B7965E79A80245AECF06BDFCCC3BC1E1" xlink:to="loc_us-gaap_InvestmentTypeAxis_9C7A4D6AB8CAA39D9F91BDFCCC3BB287" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InvestmentTypeCategorizationMember" xlink:label="loc_us-gaap_InvestmentTypeCategorizationMember_08ACDB7237A3B028A67DBDFCCC3B229B_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InvestmentTypeAxis_9C7A4D6AB8CAA39D9F91BDFCCC3BB287" xlink:to="loc_us-gaap_InvestmentTypeCategorizationMember_08ACDB7237A3B028A67DBDFCCC3B229B_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InvestmentTypeCategorizationMember" xlink:label="loc_us-gaap_InvestmentTypeCategorizationMember_08ACDB7237A3B028A67DBDFCCC3B229B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InvestmentTypeAxis_9C7A4D6AB8CAA39D9F91BDFCCC3BB287" xlink:to="loc_us-gaap_InvestmentTypeCategorizationMember_08ACDB7237A3B028A67DBDFCCC3B229B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FixedMaturitiesMember" xlink:label="loc_us-gaap_FixedMaturitiesMember_41C5463DA785642FB68EBDFCCC3B01AC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_08ACDB7237A3B028A67DBDFCCC3B229B" xlink:to="loc_us-gaap_FixedMaturitiesMember_41C5463DA785642FB68EBDFCCC3B01AC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherLongTermInvestmentsMember" xlink:label="loc_us-gaap_OtherLongTermInvestmentsMember_D55667DE4918C9367AF1BDFCCC3B3A3B" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_08ACDB7237A3B028A67DBDFCCC3B229B" xlink:to="loc_us-gaap_OtherLongTermInvestmentsMember_D55667DE4918C9367AF1BDFCCC3B3A3B" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_InvestmentIncomeGross" xlink:label="loc_nmih_InvestmentIncomeGross_922746A41C4FB9B09F16BDFCCC3B6F3E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_FE26C4F864570CBCE5AABDFCCC3BA284" xlink:to="loc_nmih_InvestmentIncomeGross_922746A41C4FB9B09F16BDFCCC3B6F3E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InvestmentIncomeInvestmentExpense" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_38192CA94256DB3E88C9BDFCCC3BEBFB" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_FE26C4F864570CBCE5AABDFCCC3BA284" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_38192CA94256DB3E88C9BDFCCC3BEBFB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InvestmentIncomeNet" xlink:label="loc_us-gaap_InvestmentIncomeNet_D40943ED1BAEC6D92E11BDFCCC3BFE65" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_FE26C4F864570CBCE5AABDFCCC3BA284" xlink:to="loc_us-gaap_InvestmentIncomeNet_D40943ED1BAEC6D92E11BDFCCC3BFE65" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsScheduledMaturitiesDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_677998CC4B9D53DF3475AC7F514B8C99" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_C230E01AE0E089FCB6E4AC7F514A6A43" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_677998CC4B9D53DF3475AC7F514B8C99" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_C230E01AE0E089FCB6E4AC7F514A6A43" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_1E4A313C76BE2B3621BFAC7F514A6354" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_C230E01AE0E089FCB6E4AC7F514A6A43" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_1E4A313C76BE2B3621BFAC7F514A6354" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_1D105B2FD79E030621EBAC7F514AF9B0_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_1E4A313C76BE2B3621BFAC7F514A6354" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_1D105B2FD79E030621EBAC7F514AF9B0_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_1D105B2FD79E030621EBAC7F514AF9B0" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_1E4A313C76BE2B3621BFAC7F514A6354" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_1D105B2FD79E030621EBAC7F514AF9B0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_ECEB011337D86B1973FCAC7F514B1F78" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_1D105B2FD79E030621EBAC7F514AF9B0" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_ECEB011337D86B1973FCAC7F514B1F78" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_5A565782838D1110704CAC7F514B2C46" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_677998CC4B9D53DF3475AC7F514B8C99" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_5A565782838D1110704CAC7F514B2C46" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_070A39DDE1F1F18B7F4BAC7F514B9346" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_5A565782838D1110704CAC7F514B2C46" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_070A39DDE1F1F18B7F4BAC7F514B9346" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_62B67825A03AE8272999AC7F514BF127" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_5A565782838D1110704CAC7F514B2C46" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_62B67825A03AE8272999AC7F514BF127" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_281CC7D2739D072C1915AC7F514BFC0F" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_5A565782838D1110704CAC7F514B2C46" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_281CC7D2739D072C1915AC7F514BFC0F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_8392D5206EC06879244CAC7F514BA1EB" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_5A565782838D1110704CAC7F514B2C46" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_8392D5206EC06879244CAC7F514BA1EB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_65B48CAF1B3159012204AC7F514BCC4F" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAmortizedCostBasisAbstract_5A565782838D1110704CAC7F514B2C46" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_65B48CAF1B3159012204AC7F514BCC4F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_AB3EB4C65991763CF1AAAC7F514B53C9" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_677998CC4B9D53DF3475AC7F514B8C99" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_AB3EB4C65991763CF1AAAC7F514B53C9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_563AB87C533A0D2CC727AC7F514B58C3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_AB3EB4C65991763CF1AAAC7F514B53C9" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_563AB87C533A0D2CC727AC7F514B58C3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_CBDCA62B99F067C2BBC3AC7F514BEFC7" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_AB3EB4C65991763CF1AAAC7F514B53C9" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_CBDCA62B99F067C2BBC3AC7F514BEFC7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_7A26CC313FF4462F128AAC7F514BEF8C" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_AB3EB4C65991763CF1AAAC7F514B53C9" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_7A26CC313FF4462F128AAC7F514BEF8C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_39E41C2ACFC2D4460FDCAC7F514B1460" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_AB3EB4C65991763CF1AAAC7F514B53C9" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_39E41C2ACFC2D4460FDCAC7F514B1460" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_882C86DD1C12364E1777AC7F514BBC2E" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesSingleMaturityDateAbstract_AB3EB4C65991763CF1AAAC7F514B53C9" xlink:to="loc_us-gaap_AvailableForSaleSecurities_882C86DD1C12364E1777AC7F514BBC2E" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/InvestmentsUnrealizedLossesDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesTable" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_BB6969CCB8915B8DA71B0D046D71ADA2" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:to="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_BB6969CCB8915B8DA71B0D046D71ADA2" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_B272F77A4DAE55E5A05EF5DC76E82C7D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesTable_BB6969CCB8915B8DA71B0D046D71ADA2" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_B272F77A4DAE55E5A05EF5DC76E82C7D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_56A90345D044443CC6B22C60E0E150C7_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_B272F77A4DAE55E5A05EF5DC76E82C7D" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_56A90345D044443CC6B22C60E0E150C7_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_39E2A50D611559DBB47B39519C1CBE08" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_B272F77A4DAE55E5A05EF5DC76E82C7D" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_39E2A50D611559DBB47B39519C1CBE08" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_1859B61A41DB58B78F4ED483F8D3719C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_39E2A50D611559DBB47B39519C1CBE08" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_1859B61A41DB58B78F4ED483F8D3719C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_2303692A2579546C8A882F89B3EE4EF5" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_39E2A50D611559DBB47B39519C1CBE08" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_2303692A2579546C8A882F89B3EE4EF5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_97EC4719763559058D315A68E9D613DC" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_39E2A50D611559DBB47B39519C1CBE08" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_97EC4719763559058D315A68E9D613DC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_C04EABC564DA583BB7426B151AC4633E" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_39E2A50D611559DBB47B39519C1CBE08" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_C04EABC564DA583BB7426B151AC4633E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_FB8C514AC7B05D1FBACEF3B3E2C5EA48" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsLessThanOneYear_FB8C514AC7B05D1FBACEF3B3E2C5EA48" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_4BD6C00967EE5724B8C3A863A5FDCB76" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThanTwelveMonthsFairValue_4BD6C00967EE5724B8C3A863A5FDCB76" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_38E86084E8C95825B2B18A21AE43A086" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_38E86084E8C95825B2B18A21AE43A086" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear" xlink:label="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_C51BE09380E75E68A75A960C3FD234D6" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:to="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositionsGreaterThanOrEqualToOneYear_C51BE09380E75E68A75A960C3FD234D6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_5EACA82A0E3A5FFABA227ECB7A98EEE8" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionTwelveMonthsOrLongerFairValue_5EACA82A0E3A5FFABA227ECB7A98EEE8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_9DA1180FC9DE541A9169EF45966CB6E9" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_9DA1180FC9DE541A9169EF45966CB6E9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1" xlink:label="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1_B5D4195071505138951C2385F3CC66FB" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:to="loc_us-gaap_AvailableforsaleSecuritiesInUnrealizedLossPositionsQualitativeDisclosureNumberOfPositions1_B5D4195071505138951C2385F3CC66FB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue_421F8DEA6C3C52FBB675729AAC299549" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionFairValue_421F8DEA6C3C52FBB675729AAC299549" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_9135AA205F9651C19A41763AB82148AD" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_A85CFC00F7905455A1E49C4E1CA16FA1" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesContinuousUnrealizedLossPositionAccumulatedLoss_9135AA205F9651C19A41763AB82148AD" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentation" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/OrganizationAndBasisOfPresentationDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionLineItems" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_564854AA99A63D39102CBDFCCCEB477C" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_40D6BF24CB0311371621BDFCCCE58800" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_564854AA99A63D39102CBDFCCCEB477C" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_40D6BF24CB0311371621BDFCCCE58800" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_3559A0873A9172CEC821BDFCCCE569BD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_40D6BF24CB0311371621BDFCCCE58800" xlink:to="loc_us-gaap_StatementClassOfStockAxis_3559A0873A9172CEC821BDFCCCE569BD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_DD0B332DB30D5A544795BDFCCCE50829_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_3559A0873A9172CEC821BDFCCCE569BD" xlink:to="loc_us-gaap_ClassOfStockDomain_DD0B332DB30D5A544795BDFCCCE50829_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_DD0B332DB30D5A544795BDFCCCE50829" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_3559A0873A9172CEC821BDFCCCE569BD" xlink:to="loc_us-gaap_ClassOfStockDomain_DD0B332DB30D5A544795BDFCCCE50829" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_48E6F1B889E0344FB834BDFCCCE54D81" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_DD0B332DB30D5A544795BDFCCCE50829" xlink:to="loc_us-gaap_CommonClassAMember_48E6F1B889E0344FB834BDFCCCE54D81" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAxis" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_7BC61426C9C71239C8A6BDFCCCE5B94F" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_40D6BF24CB0311371621BDFCCCE58800" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_7BC61426C9C71239C8A6BDFCCCE5B94F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_F478B7CFA8F01C91F335BDFCCCE5A9D4_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_7BC61426C9C71239C8A6BDFCCCE5B94F" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_F478B7CFA8F01C91F335BDFCCCE5A9D4_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessAcquisitionAcquireeDomain" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_F478B7CFA8F01C91F335BDFCCCE5A9D4" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_7BC61426C9C71239C8A6BDFCCCE5B94F" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_F478B7CFA8F01C91F335BDFCCCE5A9D4" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_MACFinancialHoldingCorporationandSubsidiariesMember" xlink:label="loc_nmih_MACFinancialHoldingCorporationandSubsidiariesMember_F19CBB24ACBC4FD036D9BDFCCCE52284" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_F478B7CFA8F01C91F335BDFCCCE5A9D4" xlink:to="loc_nmih_MACFinancialHoldingCorporationandSubsidiariesMember_F19CBB24ACBC4FD036D9BDFCCCE52284" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_8415A0C1B1B1AED46A93BDFCCCE50735" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_40D6BF24CB0311371621BDFCCCE58800" xlink:to="loc_dei_LegalEntityAxis_8415A0C1B1B1AED46A93BDFCCCE50735" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_B35E3F1E50F846AF8617BDFCCCEAE4CB_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_8415A0C1B1B1AED46A93BDFCCCE50735" xlink:to="loc_dei_EntityDomain_B35E3F1E50F846AF8617BDFCCCEAE4CB_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_B35E3F1E50F846AF8617BDFCCCEAE4CB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_8415A0C1B1B1AED46A93BDFCCCE50735" xlink:to="loc_dei_EntityDomain_B35E3F1E50F846AF8617BDFCCCEAE4CB" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_NMIServicesInc.Member" xlink:label="loc_nmih_NMIServicesInc.Member_0CC6021836431C0D513BBDFCCCEA3C58" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_B35E3F1E50F846AF8617BDFCCCEAE4CB" xlink:to="loc_nmih_NMIServicesInc.Member_0CC6021836431C0D513BBDFCCCEA3C58" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_NMicandReoneCombinedMember" xlink:label="loc_nmih_NMicandReoneCombinedMember_C405B2D3032A090024F3BDFCCCEA3DD8" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_B35E3F1E50F846AF8617BDFCCCEAE4CB" xlink:to="loc_nmih_NMicandReoneCombinedMember_C405B2D3032A090024F3BDFCCCEA3DD8" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SaleofStockAxis" xlink:label="loc_nmih_SaleofStockAxis_56C295BD74CA0595EF95BDFCCCEAA1B4" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_40D6BF24CB0311371621BDFCCCE58800" xlink:to="loc_nmih_SaleofStockAxis_56C295BD74CA0595EF95BDFCCCEAA1B4" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SaleofStockDomain" xlink:label="loc_nmih_SaleofStockDomain_E35EEAE85705BD1EBB9DBDFCCCEB22FD_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_nmih_SaleofStockAxis_56C295BD74CA0595EF95BDFCCCEAA1B4" xlink:to="loc_nmih_SaleofStockDomain_E35EEAE85705BD1EBB9DBDFCCCEB22FD_default" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SaleofStockDomain" xlink:label="loc_nmih_SaleofStockDomain_E35EEAE85705BD1EBB9DBDFCCCEB22FD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_nmih_SaleofStockAxis_56C295BD74CA0595EF95BDFCCCEAA1B4" xlink:to="loc_nmih_SaleofStockDomain_E35EEAE85705BD1EBB9DBDFCCCEB22FD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IPOMember" xlink:label="loc_us-gaap_IPOMember_62C20B2FE62F18F3F48EBDFCCCEBDDF9" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_nmih_SaleofStockDomain_E35EEAE85705BD1EBB9DBDFCCCEB22FD" xlink:to="loc_us-gaap_IPOMember_62C20B2FE62F18F3F48EBDFCCCEBDDF9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesNewIssues" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_C2E00468E0D5BED7ABDABDFCCCEBB7E7" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_564854AA99A63D39102CBDFCCCEB477C" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesNewIssues_C2E00468E0D5BED7ABDABDFCCCEBB7E7" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ProceedsFromIssuanceofCommonStockNetofStockIssuanceCosts" xlink:label="loc_nmih_ProceedsFromIssuanceofCommonStockNetofStockIssuanceCosts_A124313DACE43DBBAD79BDFCCCEB659B" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_564854AA99A63D39102CBDFCCCEB477C" xlink:to="loc_nmih_ProceedsFromIssuanceofCommonStockNetofStockIssuanceCosts_A124313DACE43DBBAD79BDFCCCEB659B" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_BusinessCombinationConsiderationTransferredCashandEquityInterestsIssuedandIssuable" xlink:label="loc_nmih_BusinessCombinationConsiderationTransferredCashandEquityInterestsIssuedandIssuable_6FE5B31BE284399E76BCBDFCCCEBF754" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_564854AA99A63D39102CBDFCCCEB477C" xlink:to="loc_nmih_BusinessCombinationConsiderationTransferredCashandEquityInterestsIssuedandIssuable_6FE5B31BE284399E76BCBDFCCCEBF754" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BusinessCombinationConsiderationTransferredLiabilitiesIncurred" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferredLiabilitiesIncurred_337824302ED266398CDFBDFCCCEB33EB" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_564854AA99A63D39102CBDFCCCEB477C" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferredLiabilitiesIncurred_337824302ED266398CDFBDFCCCEB33EB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NumberOfStatesInWhichEntityOperates" xlink:label="loc_us-gaap_NumberOfStatesInWhichEntityOperates_EE2FF3499532AABBACC6BDFCCCEB2A78" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_564854AA99A63D39102CBDFCCCEB477C" xlink:to="loc_us-gaap_NumberOfStatesInWhichEntityOperates_EE2FF3499532AABBACC6BDFCCCEB2A78" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_PaymenttoInvestmentinSubsidiary" xlink:label="loc_nmih_PaymenttoInvestmentinSubsidiary_036EE263262E33967E38BDFCCCEBAC2F" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_564854AA99A63D39102CBDFCCCEB477C" xlink:to="loc_nmih_PaymenttoInvestmentinSubsidiary_036EE263262E33967E38BDFCCCEBAC2F" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/QuarterlyFinancialDataUnaudited" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/QuarterlyFinancialDataUnauditedDetails" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/QuarterlyFinancialDataUnauditedTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformation" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesLineItems" xlink:label="loc_us-gaap_StatutoryAccountingPracticesLineItems_F570D90E9CB4AC925333BD99DE5575F0" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesTable" xlink:label="loc_us-gaap_StatutoryAccountingPracticesTable_8F747C298687E91E4E7EBD99DE554D06" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_F570D90E9CB4AC925333BD99DE5575F0" xlink:to="loc_us-gaap_StatutoryAccountingPracticesTable_8F747C298687E91E4E7EBD99DE554D06" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesByJurisdictionAxis" xlink:label="loc_us-gaap_StatutoryAccountingPracticesByJurisdictionAxis_DAAE27215515F5DCE4F6BD99DE558CFA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatutoryAccountingPracticesTable_8F747C298687E91E4E7EBD99DE554D06" xlink:to="loc_us-gaap_StatutoryAccountingPracticesByJurisdictionAxis_DAAE27215515F5DCE4F6BD99DE558CFA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesJurisdictionDomain" xlink:label="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_F53B28762065CA7C4A79BD99DE555B8E_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatutoryAccountingPracticesByJurisdictionAxis_DAAE27215515F5DCE4F6BD99DE558CFA" xlink:to="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_F53B28762065CA7C4A79BD99DE555B8E_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesJurisdictionDomain" xlink:label="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_F53B28762065CA7C4A79BD99DE555B8E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatutoryAccountingPracticesByJurisdictionAxis_DAAE27215515F5DCE4F6BD99DE558CFA" xlink:to="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_F53B28762065CA7C4A79BD99DE555B8E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/stpr/2011/stpr-2011-01-31.xsd#stpr_WI" xlink:label="loc_stpr_WI_8FAF801D1E78B5C58DFDBD99DE55B4E3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesJurisdictionDomain_F53B28762065CA7C4A79BD99DE555B8E" xlink:to="loc_stpr_WI_8FAF801D1E78B5C58DFDBD99DE55B4E3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_85FBAAB262805FAAC7AFBD99DE55E31E" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatutoryAccountingPracticesTable_8F747C298687E91E4E7EBD99DE554D06" xlink:to="loc_dei_LegalEntityAxis_85FBAAB262805FAAC7AFBD99DE55E31E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_621885E8A5339273CFB2BD99DE559552_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_85FBAAB262805FAAC7AFBD99DE55E31E" xlink:to="loc_dei_EntityDomain_621885E8A5339273CFB2BD99DE559552_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_621885E8A5339273CFB2BD99DE559552" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_85FBAAB262805FAAC7AFBD99DE55E31E" xlink:to="loc_dei_EntityDomain_621885E8A5339273CFB2BD99DE559552" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_NMICMember" xlink:label="loc_nmih_NMICMember_11EB0BB564B864A6E40ABD99DE554AC6" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_621885E8A5339273CFB2BD99DE559552" xlink:to="loc_nmih_NMICMember_11EB0BB564B864A6E40ABD99DE554AC6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SubsidiariesMember" xlink:label="loc_us-gaap_SubsidiariesMember_1B3BE2742EBD5468B3C3BD99DE553F62" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_621885E8A5339273CFB2BD99DE559552" xlink:to="loc_us-gaap_SubsidiariesMember_1B3BE2742EBD5468B3C3BD99DE553F62" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_NumberofStatesWhichRequireMinimumAmountofStatutoryCapitalRelativetoRiskInForce" xlink:label="loc_nmih_NumberofStatesWhichRequireMinimumAmountofStatutoryCapitalRelativetoRiskInForce_20597ACF56ECB9BED748BD99DE55538D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_F570D90E9CB4AC925333BD99DE5575F0" xlink:to="loc_nmih_NumberofStatesWhichRequireMinimumAmountofStatutoryCapitalRelativetoRiskInForce_20597ACF56ECB9BED748BD99DE55538D" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_RiskToCapitalRatioRegulatoryMaximum" xlink:label="loc_nmih_RiskToCapitalRatioRegulatoryMaximum_5AD855BD624B1E3C4283BD99DE5504A6" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_F570D90E9CB4AC925333BD99DE5575F0" xlink:to="loc_nmih_RiskToCapitalRatioRegulatoryMaximum_5AD855BD624B1E3C4283BD99DE5504A6" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_NumberofPoliciesinForce" xlink:label="loc_nmih_NumberofPoliciesinForce_6759E1078F4C5A0BF3A5BD99DE55AB77" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_F570D90E9CB4AC925333BD99DE5575F0" xlink:to="loc_nmih_NumberofPoliciesinForce_6759E1078F4C5A0BF3A5BD99DE55AB77" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_MortgageInsuranceRiskinForce" xlink:label="loc_nmih_MortgageInsuranceRiskinForce_04D1A1D2496A04EF4114BD99DE5666A3" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_F570D90E9CB4AC925333BD99DE5575F0" xlink:to="loc_nmih_MortgageInsuranceRiskinForce_04D1A1D2496A04EF4114BD99DE5666A3" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_MortgageInsurancePercentageofIndebtednessonSingleLoanLimit" xlink:label="loc_nmih_MortgageInsurancePercentageofIndebtednessonSingleLoanLimit_623042800C08C888C28EBD99DE55E9F0" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_F570D90E9CB4AC925333BD99DE5575F0" xlink:to="loc_nmih_MortgageInsurancePercentageofIndebtednessonSingleLoanLimit_623042800C08C888C28EBD99DE55E9F0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_51C3826DAE3C927EB934BD99DE562A1B" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_F570D90E9CB4AC925333BD99DE5575F0" xlink:to="loc_us-gaap_StockholdersEquity_51C3826DAE3C927EB934BD99DE562A1B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityMethodInvestments" xlink:label="loc_us-gaap_EquityMethodInvestments_9004B0D90BBE982AB4B5BD99DE561863" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_F570D90E9CB4AC925333BD99DE5575F0" xlink:to="loc_us-gaap_EquityMethodInvestments_9004B0D90BBE982AB4B5BD99DE561863" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_OrdinaryDividendsRestrictionwithRegardstoCapitalSurplus" xlink:label="loc_nmih_OrdinaryDividendsRestrictionwithRegardstoCapitalSurplus_95FA092A2A596AEA11FBBD99DE56EF5A" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_F570D90E9CB4AC925333BD99DE5575F0" xlink:to="loc_nmih_OrdinaryDividendsRestrictionwithRegardstoCapitalSurplus_95FA092A2A596AEA11FBBD99DE56EF5A" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationScheduleOfCombinedStatutoryNetLossStatutorySurplusContingencyReserveAndRtcRatiosDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesLineItems" xlink:label="loc_us-gaap_StatutoryAccountingPracticesLineItems_9B4C6DECB439FD18A9FEBD99DE503F98" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesTable" xlink:label="loc_us-gaap_StatutoryAccountingPracticesTable_BC38E96BBDD738686FB1BD99DE5047ED" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_9B4C6DECB439FD18A9FEBD99DE503F98" xlink:to="loc_us-gaap_StatutoryAccountingPracticesTable_BC38E96BBDD738686FB1BD99DE5047ED" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_D1B57A578322FB28FB58BD99DE50ED7C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatutoryAccountingPracticesTable_BC38E96BBDD738686FB1BD99DE5047ED" xlink:to="loc_dei_LegalEntityAxis_D1B57A578322FB28FB58BD99DE50ED7C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_D9AB0997BE05E7299D4CBD99DE50F8F1_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_D1B57A578322FB28FB58BD99DE50ED7C" xlink:to="loc_dei_EntityDomain_D9AB0997BE05E7299D4CBD99DE50F8F1_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_D9AB0997BE05E7299D4CBD99DE50F8F1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_D1B57A578322FB28FB58BD99DE50ED7C" xlink:to="loc_dei_EntityDomain_D9AB0997BE05E7299D4CBD99DE50F8F1" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_NMicandReoneCombinedMember" xlink:label="loc_nmih_NMicandReoneCombinedMember_0FD2699B0A6E17B38EFDBD99DE50EB04" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_D9AB0997BE05E7299D4CBD99DE50F8F1" xlink:to="loc_nmih_NMicandReoneCombinedMember_0FD2699B0A6E17B38EFDBD99DE50EB04" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesStatutoryNetIncomeAmount" xlink:label="loc_us-gaap_StatutoryAccountingPracticesStatutoryNetIncomeAmount_FB293AECDE6E81D41E99BD99DE5082F6" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_9B4C6DECB439FD18A9FEBD99DE503F98" xlink:to="loc_us-gaap_StatutoryAccountingPracticesStatutoryNetIncomeAmount_FB293AECDE6E81D41E99BD99DE5082F6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance" xlink:label="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance_74DF76B336A95BC35040BD99DE50E05A" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_9B4C6DECB439FD18A9FEBD99DE503F98" xlink:to="loc_us-gaap_StatutoryAccountingPracticesStatutoryCapitalAndSurplusBalance_74DF76B336A95BC35040BD99DE50E05A" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_StatutoryAccountingPracticesContingencyReserve" xlink:label="loc_nmih_StatutoryAccountingPracticesContingencyReserve_C4B55E60B933A9AC47BBBD99DE50FDC2" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_9B4C6DECB439FD18A9FEBD99DE503F98" xlink:to="loc_nmih_StatutoryAccountingPracticesContingencyReserve_C4B55E60B933A9AC47BBBD99DE50FDC2" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_RiskToCapitalRatioRegulatoryActual" xlink:label="loc_nmih_RiskToCapitalRatioRegulatoryActual_FB5519F37B7D6043C812BD99DE50D241" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatutoryAccountingPracticesLineItems_9B4C6DECB439FD18A9FEBD99DE503F98" xlink:to="loc_nmih_RiskToCapitalRatioRegulatoryActual_FB5519F37B7D6043C812BD99DE50D241" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/RegulatoryInformationTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimsExpenses" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimsExpensesNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseTable" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseTable_BDD9363B6809BE6BB21FE69A2FB207FA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseTable_BDD9363B6809BE6BB21FE69A2FB207FA" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CounterpartyNameAxis" xlink:label="loc_us-gaap_CounterpartyNameAxis_765168517EA223534F70E69A2FB202FA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseTable_BDD9363B6809BE6BB21FE69A2FB207FA" xlink:to="loc_us-gaap_CounterpartyNameAxis_765168517EA223534F70E69A2FB202FA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RepurchaseAgreementCounterpartyNameDomain" xlink:label="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_C6F5B7E751D35FEB8E10E69A2FB29719_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CounterpartyNameAxis_765168517EA223534F70E69A2FB202FA" xlink:to="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_C6F5B7E751D35FEB8E10E69A2FB29719_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RepurchaseAgreementCounterpartyNameDomain" xlink:label="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_C6F5B7E751D35FEB8E10E69A2FB29719" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CounterpartyNameAxis_765168517EA223534F70E69A2FB202FA" xlink:to="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_C6F5B7E751D35FEB8E10E69A2FB29719" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_FannieMaeMember" xlink:label="loc_nmih_FannieMaeMember_F9706FC8E679D9154B65E69A2FB26ED2" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RepurchaseAgreementCounterpartyNameDomain_C6F5B7E751D35FEB8E10E69A2FB29719" xlink:to="loc_nmih_FannieMaeMember_F9706FC8E679D9154B65E69A2FB26ED2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_A87B806F063A1CBC14D9E69A2FB22475" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpense_A87B806F063A1CBC14D9E69A2FB22475" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_LiabilityforUnpaidClaimsandClaimsAdjustmentExpenseIncurredbutNotReportedIBNRClaimsNumberofPrimaryLoansinDefault" xlink:label="loc_nmih_LiabilityforUnpaidClaimsandClaimsAdjustmentExpenseIncurredbutNotReportedIBNRClaimsNumberofPrimaryLoansinDefault_1EBA692FD0F6A4558263E69A2FB25527" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_nmih_LiabilityforUnpaidClaimsandClaimsAdjustmentExpenseIncurredbutNotReportedIBNRClaimsNumberofPrimaryLoansinDefault_1EBA692FD0F6A4558263E69A2FB25527" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_LiabilityforPaidClaimsandClaimsAdjustmentExpenseNumberofPaidClaims" xlink:label="loc_nmih_LiabilityforPaidClaimsandClaimsAdjustmentExpenseNumberofPaidClaims_3E1CA30353C1AAF09AEBE69A2FB2AB9E" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_nmih_LiabilityforPaidClaimsandClaimsAdjustmentExpenseNumberofPaidClaims_3E1CA30353C1AAF09AEBE69A2FB2AB9E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PaymentsForLossesAndLossAdjustmentExpense" xlink:label="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_4E04ED64763712709590E69A2FB29CB4" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_us-gaap_PaymentsForLossesAndLossAdjustmentExpense_4E04ED64763712709590E69A2FB29CB4" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_LoansInPoolPastDue60DaysOrMoreNumberOfLoans" xlink:label="loc_nmih_LoansInPoolPastDue60DaysOrMoreNumberOfLoans_F5CBE20FA159F8A22CBDE69A2FB23BBD" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_nmih_LoansInPoolPastDue60DaysOrMoreNumberOfLoans_F5CBE20FA159F8A22CBDE69A2FB23BBD" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_LoansInPoolPastDue60DaysOrMoreLoanRiskinForce" xlink:label="loc_nmih_LoansInPoolPastDue60DaysOrMoreLoanRiskinForce_EC1BBA05A976846ED17FE69A2FB2CB06" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_nmih_LoansInPoolPastDue60DaysOrMoreLoanRiskinForce_EC1BBA05A976846ED17FE69A2FB2CB06" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_MortgagePoolInsuranceClaimDeductible" xlink:label="loc_nmih_MortgagePoolInsuranceClaimDeductible_8762F7AA6E5844645C1BE69A2FB29338" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_nmih_MortgagePoolInsuranceClaimDeductible_8762F7AA6E5844645C1BE69A2FB29338" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_LoansInPoolLoanToValueRatio" xlink:label="loc_nmih_LoansInPoolLoanToValueRatio_9A4BAA54EB33C91A6230E69A2FB2A3D7" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_nmih_LoansInPoolLoanToValueRatio_9A4BAA54EB33C91A6230E69A2FB2A3D7" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_LiabilityforUnpaidClaimsandClaimsAdjustmentExpenseClaimsAppliedtoDeductible" xlink:label="loc_nmih_LiabilityforUnpaidClaimsandClaimsAdjustmentExpenseClaimsAppliedtoDeductible_C3AF57815D31148029E7E69A2FB256D6" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_nmih_LiabilityforUnpaidClaimsandClaimsAdjustmentExpenseClaimsAppliedtoDeductible_C3AF57815D31148029E7E69A2FB256D6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_BB6C59017E32A4FA9C78E69A2FB2ACDB" xlink:type="locator" />
    <definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_BB6C59017E32A4FA9C78E69A2FB2ACDB" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_LiabilityforPriorYearClaimsandClaimsAdjustmentExpense" xlink:label="loc_nmih_LiabilityforPriorYearClaimsandClaimsAdjustmentExpense_95BF0BDA2E6085882738E69A2FB26C36" xlink:type="locator" />
    <definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_CC62B72E0CA607C61DB0E69A2FB26E50" xlink:to="loc_nmih_LiabilityforPriorYearClaimsandClaimsAdjustmentExpense_95BF0BDA2E6085882738E69A2FB26C36" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimsExpensesReconciliationOfReserveBalancesForInsuranceClaimsExpensesDetails" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ReservesForInsuranceClaimsAndClaimsExpensesTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedParties" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ScheduleISummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems" xlink:label="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_0E83DDF3BB7AA2B31760F562BC989EC3" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable" xlink:label="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_A90CC0D6C0CC2F76AA47F562BC923CD5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_0E83DDF3BB7AA2B31760F562BC989EC3" xlink:to="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_A90CC0D6C0CC2F76AA47F562BC923CD5" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_A7923BB844C7DDAE0312F562BC923375" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_A90CC0D6C0CC2F76AA47F562BC923CD5" xlink:to="loc_dei_LegalEntityAxis_A7923BB844C7DDAE0312F562BC923375" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_EDAAA506089489EC86DFF562BC927C76_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_A7923BB844C7DDAE0312F562BC923375" xlink:to="loc_dei_EntityDomain_EDAAA506089489EC86DFF562BC927C76_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_EDAAA506089489EC86DFF562BC927C76" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_A7923BB844C7DDAE0312F562BC923375" xlink:to="loc_dei_EntityDomain_EDAAA506089489EC86DFF562BC927C76" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ParentCompanyMember" xlink:label="loc_us-gaap_ParentCompanyMember_CF76765EBA41F50D23D0F562BC920328" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_EDAAA506089489EC86DFF562BC927C76" xlink:to="loc_us-gaap_ParentCompanyMember_CF76765EBA41F50D23D0F562BC920328" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_3AA3BDC429999F5E8346F562BC9286A4" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_A90CC0D6C0CC2F76AA47F562BC923CD5" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_3AA3BDC429999F5E8346F562BC9286A4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_36EF08FF9662B20C7A86F562BC930664_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_3AA3BDC429999F5E8346F562BC9286A4" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_36EF08FF9662B20C7A86F562BC930664_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain" xlink:label="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_36EF08FF9662B20C7A86F562BC930664" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesAxis_3AA3BDC429999F5E8346F562BC9286A4" xlink:to="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_36EF08FF9662B20C7A86F562BC930664" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USTreasuryAndGovernmentMember" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_0C8AA203DEBD6381863BF562BC98CA61" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_36EF08FF9662B20C7A86F562BC930664" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_0C8AA203DEBD6381863BF562BC98CA61" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_16801A460C48D0823B1FF562BC9805E1" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_36EF08FF9662B20C7A86F562BC930664" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_16801A460C48D0823B1FF562BC9805E1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CorporateDebtSecuritiesMember" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_977F5E6C9589119DBAC3F562BC981AEB" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_36EF08FF9662B20C7A86F562BC930664" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_977F5E6C9589119DBAC3F562BC981AEB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetBackedSecuritiesMember" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_0B5C9E4C9BB27B7C4F62F562BC98DA02" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_36EF08FF9662B20C7A86F562BC930664" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_0B5C9E4C9BB27B7C4F62F562BC98DA02" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_BondsMember" xlink:label="loc_us-gaap_BondsMember_0A5EF7F6D4E9A60B1A34F562BC98D22E" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_36EF08FF9662B20C7A86F562BC930664" xlink:to="loc_us-gaap_BondsMember_0A5EF7F6D4E9A60B1A34F562BC98D22E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShortTermInvestmentsMember" xlink:label="loc_us-gaap_ShortTermInvestmentsMember_00105AD7D0F23510DF37F562BC98EBCA" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_MajorTypesOfDebtAndEquitySecuritiesDomain_36EF08FF9662B20C7A86F562BC930664" xlink:to="loc_us-gaap_ShortTermInvestmentsMember_00105AD7D0F23510DF37F562BC98EBCA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesAmortizedCost" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_3AD540433119DBDA11A5F562BC9821CB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_0E83DDF3BB7AA2B31760F562BC989EC3" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesAmortizedCost_3AD540433119DBDA11A5F562BC9821CB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecurities" xlink:label="loc_us-gaap_AvailableForSaleSecurities_CA1AF28F44C0BE4B003EF562BC98DF71" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_0E83DDF3BB7AA2B31760F562BC989EC3" xlink:to="loc_us-gaap_AvailableForSaleSecurities_CA1AF28F44C0BE4B003EF562BC98DF71" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCarryingAmount" xlink:label="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCarryingAmount_C94C3082B4ADB633C21FF562BC98FB76" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_0E83DDF3BB7AA2B31760F562BC989EC3" xlink:to="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCarryingAmount_C94C3082B4ADB633C21FF562BC98FB76" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnly" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetAdditionalInformationDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementLineItems" xlink:label="loc_us-gaap_StatementLineItems_1F73237A49631790F793BD99DE358442" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementTable" xlink:label="loc_us-gaap_StatementTable_2F07FD6AC76BC501C426BD99DE343097" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_1F73237A49631790F793BD99DE358442" xlink:to="loc_us-gaap_StatementTable_2F07FD6AC76BC501C426BD99DE343097" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_DE9F513E69539F25E7FABD99DE34EDAC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_2F07FD6AC76BC501C426BD99DE343097" xlink:to="loc_dei_LegalEntityAxis_DE9F513E69539F25E7FABD99DE34EDAC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_6A5B3FF88604186E08C2BD99DE34768B_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_DE9F513E69539F25E7FABD99DE34EDAC" xlink:to="loc_dei_EntityDomain_6A5B3FF88604186E08C2BD99DE34768B_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_6A5B3FF88604186E08C2BD99DE34768B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_DE9F513E69539F25E7FABD99DE34EDAC" xlink:to="loc_dei_EntityDomain_6A5B3FF88604186E08C2BD99DE34768B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ParentCompanyMember" xlink:label="loc_us-gaap_ParentCompanyMember_7499F51FE09D4C3806AFBD99DE349258" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_6A5B3FF88604186E08C2BD99DE34768B" xlink:to="loc_us-gaap_ParentCompanyMember_7499F51FE09D4C3806AFBD99DE349258" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_8F1BF9B7318759D25AFEBD99DE34FB30" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_2F07FD6AC76BC501C426BD99DE343097" xlink:to="loc_us-gaap_StatementClassOfStockAxis_8F1BF9B7318759D25AFEBD99DE34FB30" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_D15EC11D351E793109F7BD99DE35D20F_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_8F1BF9B7318759D25AFEBD99DE34FB30" xlink:to="loc_us-gaap_ClassOfStockDomain_D15EC11D351E793109F7BD99DE35D20F_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_D15EC11D351E793109F7BD99DE35D20F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_8F1BF9B7318759D25AFEBD99DE34FB30" xlink:to="loc_us-gaap_ClassOfStockDomain_D15EC11D351E793109F7BD99DE35D20F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_6D5265215F4C83C053D8BD99DE35B9C5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_D15EC11D351E793109F7BD99DE35D20F" xlink:to="loc_us-gaap_CommonClassAMember_6D5265215F4C83C053D8BD99DE35B9C5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockParOrStatedValuePerShare" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_E0055255937E02142A01BD99DE3512B2" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1F73237A49631790F793BD99DE358442" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_E0055255937E02142A01BD99DE3512B2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockSharesIssued" xlink:label="loc_us-gaap_CommonStockSharesIssued_DCFA184D23D6338E68D3BD99DE35FA2B" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1F73237A49631790F793BD99DE358442" xlink:to="loc_us-gaap_CommonStockSharesIssued_DCFA184D23D6338E68D3BD99DE35FA2B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockSharesOutstanding" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_D25EBCCECBE0A1709FC0BD99DE3529E8" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1F73237A49631790F793BD99DE358442" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_D25EBCCECBE0A1709FC0BD99DE3529E8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockSharesAuthorized" xlink:label="loc_us-gaap_CommonStockSharesAuthorized_5F95EA75C6179FE119C3BD99DE35759A" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1F73237A49631790F793BD99DE358442" xlink:to="loc_us-gaap_CommonStockSharesAuthorized_5F95EA75C6179FE119C3BD99DE35759A" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyBalanceSheetDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CondensedBalanceSheetStatementsCaptionsLineItems" xlink:label="loc_us-gaap_CondensedBalanceSheetStatementsCaptionsLineItems_DF2455324EC6FF862028F0D58FA5AEB8" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CondensedBalanceSheetStatementTable" xlink:label="loc_us-gaap_CondensedBalanceSheetStatementTable_9D01F32AB220B3589FE9F0D58FA4EABD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_CondensedBalanceSheetStatementsCaptionsLineItems_DF2455324EC6FF862028F0D58FA5AEB8" xlink:to="loc_us-gaap_CondensedBalanceSheetStatementTable_9D01F32AB220B3589FE9F0D58FA4EABD" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_96D0F4C4145E2C5C4600F0D58FA451AA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_CondensedBalanceSheetStatementTable_9D01F32AB220B3589FE9F0D58FA4EABD" xlink:to="loc_us-gaap_StatementClassOfStockAxis_96D0F4C4145E2C5C4600F0D58FA451AA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_45E18C198BF151AF2D61F0D58FA475DF_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_96D0F4C4145E2C5C4600F0D58FA451AA" xlink:to="loc_us-gaap_ClassOfStockDomain_45E18C198BF151AF2D61F0D58FA475DF_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_45E18C198BF151AF2D61F0D58FA475DF" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_96D0F4C4145E2C5C4600F0D58FA451AA" xlink:to="loc_us-gaap_ClassOfStockDomain_45E18C198BF151AF2D61F0D58FA475DF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_9365D9C01A93192A4DDFF0D58FA4A534" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_45E18C198BF151AF2D61F0D58FA475DF" xlink:to="loc_us-gaap_CommonClassAMember_9365D9C01A93192A4DDFF0D58FA4A534" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_234CBC6F5EF721E3EE31F0D58FA4F207" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_CondensedBalanceSheetStatementTable_9D01F32AB220B3589FE9F0D58FA4EABD" xlink:to="loc_dei_LegalEntityAxis_234CBC6F5EF721E3EE31F0D58FA4F207" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_3E7A220893779708344BF0D58FA504AC_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_234CBC6F5EF721E3EE31F0D58FA4F207" xlink:to="loc_dei_EntityDomain_3E7A220893779708344BF0D58FA504AC_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_3E7A220893779708344BF0D58FA504AC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_234CBC6F5EF721E3EE31F0D58FA4F207" xlink:to="loc_dei_EntityDomain_3E7A220893779708344BF0D58FA504AC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ParentCompanyMember" xlink:label="loc_us-gaap_ParentCompanyMember_FAEE2D752256B7395EC2F0D58FA5DF5D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_3E7A220893779708344BF0D58FA504AC" xlink:to="loc_us-gaap_ParentCompanyMember_FAEE2D752256B7395EC2F0D58FA5DF5D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AssetsAbstract" xlink:label="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedBalanceSheetStatementsCaptionsLineItems_DF2455324EC6FF862028F0D58FA5AEB8" xlink:to="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Investments" xlink:label="loc_us-gaap_Investments_B3F3850CE74CDE9B7F37F0D58FA508DE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:to="loc_us-gaap_Investments_B3F3850CE74CDE9B7F37F0D58FA508DE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_B9EB46824459C7FF7D43F0D58FA5C44C" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_B9EB46824459C7FF7D43F0D58FA5C44C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityMethodInvestments" xlink:label="loc_us-gaap_EquityMethodInvestments_18B4B477291E07DD466CF0D58FA591D2" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:to="loc_us-gaap_EquityMethodInvestments_18B4B477291E07DD466CF0D58FA591D2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_AC5151135D23C8D46909F0D58FA5E214" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_AC5151135D23C8D46909F0D58FA5E214" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PrepaidExpenseCurrentAndNoncurrent" xlink:label="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_765AA3BB32E7AECC4CBAF0D58FA5E2E3" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:to="loc_us-gaap_PrepaidExpenseCurrentAndNoncurrent_765AA3BB32E7AECC4CBAF0D58FA5E2E3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DueFromAffiliates" xlink:label="loc_us-gaap_DueFromAffiliates_1AEF5A8EC1C4A6E8AEE9F0D58FA57863" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:to="loc_us-gaap_DueFromAffiliates_1AEF5A8EC1C4A6E8AEE9F0D58FA57863" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_B13FB3E11088D51977BAF0D58FA57491" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_B13FB3E11088D51977BAF0D58FA57491" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherAssets" xlink:label="loc_us-gaap_OtherAssets_E7BE5E2BEACA7185D0BFF0D58FA565CC" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:to="loc_us-gaap_OtherAssets_E7BE5E2BEACA7185D0BFF0D58FA565CC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Assets" xlink:label="loc_us-gaap_Assets_CC00B529FB2C25A292C9F0D58FA5545D" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_393EB8AE3D1E894B4A0FF0D58FA575C5" xlink:to="loc_us-gaap_Assets_CC00B529FB2C25A292C9F0D58FA5545D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilitiesAbstract" xlink:label="loc_us-gaap_LiabilitiesAbstract_0DEDA9CAF969A20D0177F0D58FA5400A" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedBalanceSheetStatementsCaptionsLineItems_DF2455324EC6FF862028F0D58FA5AEB8" xlink:to="loc_us-gaap_LiabilitiesAbstract_0DEDA9CAF969A20D0177F0D58FA5400A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongTermDebt" xlink:label="loc_us-gaap_LongTermDebt_4220A1558EA4B391391FF0D58FA58B40" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_0DEDA9CAF969A20D0177F0D58FA5400A" xlink:to="loc_us-gaap_LongTermDebt_4220A1558EA4B391391FF0D58FA58B40" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent" xlink:label="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_AC1544846A9579512A76F0D58FA52765" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_0DEDA9CAF969A20D0177F0D58FA5400A" xlink:to="loc_us-gaap_AccountsPayableAndAccruedLiabilitiesCurrentAndNoncurrent_AC1544846A9579512A76F0D58FA52765" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_WarrantLiability" xlink:label="loc_nmih_WarrantLiability_311980342E30BF05ECB8F0D58FA5D49B" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_0DEDA9CAF969A20D0177F0D58FA5400A" xlink:to="loc_nmih_WarrantLiability_311980342E30BF05ECB8F0D58FA5D49B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Liabilities" xlink:label="loc_us-gaap_Liabilities_A3F3C8F1E9F890BB0DF8F0D58FA5618E" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_0DEDA9CAF969A20D0177F0D58FA5400A" xlink:to="loc_us-gaap_Liabilities_A3F3C8F1E9F890BB0DF8F0D58FA5618E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityAbstract" xlink:label="loc_us-gaap_EquityAbstract_E4D86608C02B0F1588E3F0D58FA69E2F" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedBalanceSheetStatementsCaptionsLineItems_DF2455324EC6FF862028F0D58FA5AEB8" xlink:to="loc_us-gaap_EquityAbstract_E4D86608C02B0F1588E3F0D58FA69E2F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockValueOutstanding" xlink:label="loc_us-gaap_CommonStockValueOutstanding_8526CC4807D6CF9C625FF0D58FA6A8FF" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityAbstract_E4D86608C02B0F1588E3F0D58FA69E2F" xlink:to="loc_us-gaap_CommonStockValueOutstanding_8526CC4807D6CF9C625FF0D58FA6A8FF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AdditionalPaidInCapital" xlink:label="loc_us-gaap_AdditionalPaidInCapital_8C0D84D18C764B461B7AF0D58FA6DC3D" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityAbstract_E4D86608C02B0F1588E3F0D58FA69E2F" xlink:to="loc_us-gaap_AdditionalPaidInCapital_8C0D84D18C764B461B7AF0D58FA6DC3D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_3999040FAEC239FCC3F2F0D58FA6580A" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityAbstract_E4D86608C02B0F1588E3F0D58FA69E2F" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_3999040FAEC239FCC3F2F0D58FA6580A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RetainedEarningsAccumulatedDeficit" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_EB26F47A1A38D08F6889F0D58FA61383" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityAbstract_E4D86608C02B0F1588E3F0D58FA69E2F" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_EB26F47A1A38D08F6889F0D58FA61383" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockholdersEquity" xlink:label="loc_us-gaap_StockholdersEquity_784CB11E53BD0CFA7A40F0D58FA60923" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityAbstract_E4D86608C02B0F1588E3F0D58FA69E2F" xlink:to="loc_us-gaap_StockholdersEquity_784CB11E53BD0CFA7A40F0D58FA60923" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LiabilitiesAndStockholdersEquity" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_F72D4C4EA4E5C984B6EEF0D58FA6FE44" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedBalanceSheetStatementsCaptionsLineItems_DF2455324EC6FF862028F0D58FA5AEB8" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_F72D4C4EA4E5C984B6EEF0D58FA6FE44" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyCashFlowStatementDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CondensedCashFlowStatementsCaptionsLineItems" xlink:label="loc_us-gaap_CondensedCashFlowStatementsCaptionsLineItems_81825660A9F25A6242DEE69A2D5D023E" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CondensedCashFlowStatementTable" xlink:label="loc_us-gaap_CondensedCashFlowStatementTable_6E368A0697CC94F89920E69A2D5DBE2B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_CondensedCashFlowStatementsCaptionsLineItems_81825660A9F25A6242DEE69A2D5D023E" xlink:to="loc_us-gaap_CondensedCashFlowStatementTable_6E368A0697CC94F89920E69A2D5DBE2B" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_B24B86A47F429DEC829BE69A2D5DF38F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_CondensedCashFlowStatementTable_6E368A0697CC94F89920E69A2D5DBE2B" xlink:to="loc_us-gaap_DebtInstrumentAxis_B24B86A47F429DEC829BE69A2D5DF38F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_E6D965A250C27B8ACA80E69A2D5DB1D0_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_B24B86A47F429DEC829BE69A2D5DF38F" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_E6D965A250C27B8ACA80E69A2D5DB1D0_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_E6D965A250C27B8ACA80E69A2D5DB1D0" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_B24B86A47F429DEC829BE69A2D5DF38F" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_E6D965A250C27B8ACA80E69A2D5DB1D0" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_CreditAgreementMember" xlink:label="loc_nmih_CreditAgreementMember_095644000C5B38F3E1A6E69A2D5D55FB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_E6D965A250C27B8ACA80E69A2D5DB1D0" xlink:to="loc_nmih_CreditAgreementMember_095644000C5B38F3E1A6E69A2D5D55FB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_962E3C6E026F965D1A0CE69A2D5DEF45" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_CondensedCashFlowStatementTable_6E368A0697CC94F89920E69A2D5DBE2B" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_962E3C6E026F965D1A0CE69A2D5DEF45" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_1C5C4064A105ABCB1AF2E69A2D5D187F_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_962E3C6E026F965D1A0CE69A2D5DEF45" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_1C5C4064A105ABCB1AF2E69A2D5D187F_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_1C5C4064A105ABCB1AF2E69A2D5D187F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_962E3C6E026F965D1A0CE69A2D5DEF45" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_1C5C4064A105ABCB1AF2E69A2D5D187F" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SeniorSecuredDebtMember" xlink:label="loc_nmih_SeniorSecuredDebtMember_E968AEE6C03587BCE5CAE69A2D5D600D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_1C5C4064A105ABCB1AF2E69A2D5D187F" xlink:to="loc_nmih_SeniorSecuredDebtMember_E968AEE6C03587BCE5CAE69A2D5D600D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_24D790D9C5B0081B1599E69A2D5D9D17" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_CondensedCashFlowStatementTable_6E368A0697CC94F89920E69A2D5DBE2B" xlink:to="loc_dei_LegalEntityAxis_24D790D9C5B0081B1599E69A2D5D9D17" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_B52701D942BAE91CEF5EE69A2D5D933B_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_24D790D9C5B0081B1599E69A2D5D9D17" xlink:to="loc_dei_EntityDomain_B52701D942BAE91CEF5EE69A2D5D933B_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_B52701D942BAE91CEF5EE69A2D5D933B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_24D790D9C5B0081B1599E69A2D5D9D17" xlink:to="loc_dei_EntityDomain_B52701D942BAE91CEF5EE69A2D5D933B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ParentCompanyMember" xlink:label="loc_us-gaap_ParentCompanyMember_99EFA844D60386D6C112E69A2D5DF9E2" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_B52701D942BAE91CEF5EE69A2D5D933B" xlink:to="loc_us-gaap_ParentCompanyMember_99EFA844D60386D6C112E69A2D5DF9E2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2205550014B2C2980313E69A2D5D964E" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedCashFlowStatementsCaptionsLineItems_81825660A9F25A6242DEE69A2D5D023E" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2205550014B2C2980313E69A2D5D964E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_A3BE15F08091483EA592E69A2D5EE135" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2205550014B2C2980313E69A2D5D964E" xlink:to="loc_us-gaap_NetIncomeLoss_A3BE15F08091483EA592E69A2D5EE135" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract" xlink:label="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_C16E1F2491068905B92AE69A2D5ED7F6" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2205550014B2C2980313E69A2D5D964E" xlink:to="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_C16E1F2491068905B92AE69A2D5ED7F6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensation" xlink:label="loc_us-gaap_ShareBasedCompensation_0CFBF8541D4FC453DF35E69A2D5E39DE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_C16E1F2491068905B92AE69A2D5ED7F6" xlink:to="loc_us-gaap_ShareBasedCompensation_0CFBF8541D4FC453DF35E69A2D5E39DE" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_DA4AFACA9A18390C0704E69A2D5E120E" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_C16E1F2491068905B92AE69A2D5ED7F6" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_DA4AFACA9A18390C0704E69A2D5E120E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_39B96E2F8195D91A578EE69A2D5E74B6" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_C16E1F2491068905B92AE69A2D5ED7F6" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_39B96E2F8195D91A578EE69A2D5E74B6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DepreciationAmortizationAndAccretionNet" xlink:label="loc_us-gaap_DepreciationAmortizationAndAccretionNet_345A97B79C60E4908344E69A2D5F5989" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_C16E1F2491068905B92AE69A2D5ED7F6" xlink:to="loc_us-gaap_DepreciationAmortizationAndAccretionNet_345A97B79C60E4908344E69A2D5F5989" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AmortizationOfFinancingCostsAndDiscounts" xlink:label="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_C2499F3D13AF9E514871E69A2D5F70BE" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_C16E1F2491068905B92AE69A2D5ED7F6" xlink:to="loc_us-gaap_AmortizationOfFinancingCostsAndDiscounts_C2499F3D13AF9E514871E69A2D5F70BE" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ExpenseBenefitforTaxesonCurrentYearUnrealizedGains" xlink:label="loc_nmih_ExpenseBenefitforTaxesonCurrentYearUnrealizedGains_AAB678F0B468E2C1BBC2E69A2D5FFF5C" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_C16E1F2491068905B92AE69A2D5ED7F6" xlink:to="loc_nmih_ExpenseBenefitforTaxesonCurrentYearUnrealizedGains_AAB678F0B468E2C1BBC2E69A2D5FFF5C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncreaseDecreaseInOtherOperatingAssetsAndLiabilitiesNetAbstract" xlink:label="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssetsAndLiabilitiesNetAbstract_EDC5A9235133A7D79195E69A2D5F4144" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2205550014B2C2980313E69A2D5D964E" xlink:to="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssetsAndLiabilitiesNetAbstract_EDC5A9235133A7D79195E69A2D5F4144" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_GainLossOnSaleOfStockInSubsidiaryOrEquityMethodInvestee" xlink:label="loc_us-gaap_GainLossOnSaleOfStockInSubsidiaryOrEquityMethodInvestee_92DFF8F6853CA4AB8C35E69A2D5F8C0C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssetsAndLiabilitiesNetAbstract_EDC5A9235133A7D79195E69A2D5F4144" xlink:to="loc_us-gaap_GainLossOnSaleOfStockInSubsidiaryOrEquityMethodInvestee_92DFF8F6853CA4AB8C35E69A2D5F8C0C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_F97ABAB183C76FF8339CE69A2D64F68A" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssetsAndLiabilitiesNetAbstract_EDC5A9235133A7D79195E69A2D5F4144" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_F97ABAB183C76FF8339CE69A2D64F68A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncreaseDecreaseDueFromAffiliates" xlink:label="loc_us-gaap_IncreaseDecreaseDueFromAffiliates_1856803712C7F6418E06E69A2D6484C3" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssetsAndLiabilitiesNetAbstract_EDC5A9235133A7D79195E69A2D5F4144" xlink:to="loc_us-gaap_IncreaseDecreaseDueFromAffiliates_1856803712C7F6418E06E69A2D6484C3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidExpense" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_1583D4AB1D82CE38B15DE69A2D64011E" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssetsAndLiabilitiesNetAbstract_EDC5A9235133A7D79195E69A2D5F4144" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidExpense_1583D4AB1D82CE38B15DE69A2D64011E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets" xlink:label="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_7E65706A62C408E885F1E69A2D646389" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssetsAndLiabilitiesNetAbstract_EDC5A9235133A7D79195E69A2D5F4144" xlink:to="loc_us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets_7E65706A62C408E885F1E69A2D646389" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_DC22E52D8C7CDEE63D67E69A2D6418B7" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOtherOperatingAssetsAndLiabilitiesNetAbstract_EDC5A9235133A7D79195E69A2D5F4144" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsPayableAndAccruedLiabilities_DC22E52D8C7CDEE63D67E69A2D6418B7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_03512C596EEA9E44C109E69A2D64179A" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract_2205550014B2C2980313E69A2D5D964E" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations_03512C596EEA9E44C109E69A2D64179A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_E24F630411907B5B4587E69A2D64FAC6" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedCashFlowStatementsCaptionsLineItems_81825660A9F25A6242DEE69A2D5D023E" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_E24F630411907B5B4587E69A2D64FAC6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PaymentsToAcquireInterestInSubsidiariesAndAffiliates" xlink:label="loc_us-gaap_PaymentsToAcquireInterestInSubsidiariesAndAffiliates_0DD6864BBF78B9AE4ABCE69A2D653EAE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_E24F630411907B5B4587E69A2D64FAC6" xlink:to="loc_us-gaap_PaymentsToAcquireInterestInSubsidiariesAndAffiliates_0DD6864BBF78B9AE4ABCE69A2D653EAE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt" xlink:label="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_98A6F92A0F7F2A4D9C72E69A2D65AF11" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_E24F630411907B5B4587E69A2D64FAC6" xlink:to="loc_us-gaap_PaymentsToAcquireAvailableForSaleSecuritiesDebt_98A6F92A0F7F2A4D9C72E69A2D65AF11" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt" xlink:label="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_65D6C90E4BA216158EDDE69A2D65408A" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_E24F630411907B5B4587E69A2D64FAC6" xlink:to="loc_us-gaap_ProceedsFromSaleOfAvailableForSaleSecuritiesDebt_65D6C90E4BA216158EDDE69A2D65408A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PaymentsToAcquirePropertyPlantAndEquipment" xlink:label="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_A8CF50A22A98301DD4FDE69A2D65881A" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_E24F630411907B5B4587E69A2D64FAC6" xlink:to="loc_us-gaap_PaymentsToAcquirePropertyPlantAndEquipment_A8CF50A22A98301DD4FDE69A2D65881A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_324659C7DA3592813307E69A2D65BB27" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract_E24F630411907B5B4587E69A2D64FAC6" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_324659C7DA3592813307E69A2D65BB27" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_E6B1AFFF6EA9FC1F7DE2E69A2D658D15" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedCashFlowStatementsCaptionsLineItems_81825660A9F25A6242DEE69A2D5D023E" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_E6B1AFFF6EA9FC1F7DE2E69A2D658D15" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_CCC0CBF34F4D18FCB903E69A2D65597B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_E6B1AFFF6EA9FC1F7DE2E69A2D658D15" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_CCC0CBF34F4D18FCB903E69A2D65597B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ProceedsFromIssuanceOfCommonStock" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_6B6F6115270B6959E503E69A2D65B018" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_E6B1AFFF6EA9FC1F7DE2E69A2D658D15" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfCommonStock_6B6F6115270B6959E503E69A2D65B018" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_GainLossFromSettlementofWarrants" xlink:label="loc_nmih_GainLossFromSettlementofWarrants_AB59EA7E1AA17E5795B7E69A2D5E2AA9" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_E6B1AFFF6EA9FC1F7DE2E69A2D658D15" xlink:to="loc_nmih_GainLossFromSettlementofWarrants_AB59EA7E1AA17E5795B7E69A2D5E2AA9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ProceedsFromIssuanceOfLongTermDebt" xlink:label="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_3ABD840A713E044AC42AE69A2D64BF83" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_E6B1AFFF6EA9FC1F7DE2E69A2D658D15" xlink:to="loc_us-gaap_ProceedsFromIssuanceOfLongTermDebt_3ABD840A713E044AC42AE69A2D64BF83" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RepaymentsOfLongTermDebt" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_72227EB8E3D87EA325BAE69A2D656029" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_E6B1AFFF6EA9FC1F7DE2E69A2D658D15" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_72227EB8E3D87EA325BAE69A2D656029" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PaymentsOfDebtIssuanceCosts" xlink:label="loc_us-gaap_PaymentsOfDebtIssuanceCosts_2958907F4CB93D5AF940E69A2D654EE8" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_E6B1AFFF6EA9FC1F7DE2E69A2D658D15" xlink:to="loc_us-gaap_PaymentsOfDebtIssuanceCosts_2958907F4CB93D5AF940E69A2D654EE8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_FE6B656BDB2714DE6718E69A2D65CCA0" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract_E6B1AFFF6EA9FC1F7DE2E69A2D658D15" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_FE6B656BDB2714DE6718E69A2D65CCA0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease" xlink:label="loc_us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease_6350CB8AA83C6F9D5A57E69A2D65ACE4" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedCashFlowStatementsCaptionsLineItems_81825660A9F25A6242DEE69A2D5D023E" xlink:to="loc_us-gaap_CashAndCashEquivalentsPeriodIncreaseDecrease_6350CB8AA83C6F9D5A57E69A2D65ACE4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_B554106C27C292292747E69A2D6502EF" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedCashFlowStatementsCaptionsLineItems_81825660A9F25A6242DEE69A2D5D023E" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_B554106C27C292292747E69A2D6502EF" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyIncomeStatementAdditionalInformationDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CondensedIncomeStatementsCaptionsLineItems" xlink:label="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_C7C005DBACA83671C27EF1F6746FA529" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CondensedIncomeStatementTable" xlink:label="loc_us-gaap_CondensedIncomeStatementTable_88BD8D8C095C9CD08687F1F6746F78AF" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_C7C005DBACA83671C27EF1F6746FA529" xlink:to="loc_us-gaap_CondensedIncomeStatementTable_88BD8D8C095C9CD08687F1F6746F78AF" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_8628586BD839593067A5F1F6746F02DE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_CondensedIncomeStatementTable_88BD8D8C095C9CD08687F1F6746F78AF" xlink:to="loc_dei_LegalEntityAxis_8628586BD839593067A5F1F6746F02DE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_9DFF19E12ABBF021E48CF1F6746F6487_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_8628586BD839593067A5F1F6746F02DE" xlink:to="loc_dei_EntityDomain_9DFF19E12ABBF021E48CF1F6746F6487_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_9DFF19E12ABBF021E48CF1F6746F6487" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_8628586BD839593067A5F1F6746F02DE" xlink:to="loc_dei_EntityDomain_9DFF19E12ABBF021E48CF1F6746F6487" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ParentCompanyMember" xlink:label="loc_us-gaap_ParentCompanyMember_1608A886E45B147DD249F1F6746FD5A1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_9DFF19E12ABBF021E48CF1F6746F6487" xlink:to="loc_us-gaap_ParentCompanyMember_1608A886E45B147DD249F1F6746FD5A1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodTax_CB4DBE55CC471160032EF1F6746F1E81" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_C7C005DBACA83671C27EF1F6746FA529" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodTax_CB4DBE55CC471160032EF1F6746F1E81" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesTax_38DB9B07A6B4EABEA193F1F6746F2A99" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_C7C005DBACA83671C27EF1F6746FA529" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesTax_38DB9B07A6B4EABEA193F1F6746F2A99" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlyIncomeStatementDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CondensedIncomeStatementsCaptionsLineItems" xlink:label="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_BD9CDA35D810DFD6E971F5F7F5396714" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CondensedIncomeStatementTable" xlink:label="loc_us-gaap_CondensedIncomeStatementTable_771A63AB5824AE539802F5F7F5387198" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_BD9CDA35D810DFD6E971F5F7F5396714" xlink:to="loc_us-gaap_CondensedIncomeStatementTable_771A63AB5824AE539802F5F7F5387198" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_C0826B7269C3209196E5F5F7F539B47F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_CondensedIncomeStatementTable_771A63AB5824AE539802F5F7F5387198" xlink:to="loc_dei_LegalEntityAxis_C0826B7269C3209196E5F5F7F539B47F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_DF9AD5528C4CBD8AA6BCF5F7F539F932_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_C0826B7269C3209196E5F5F7F539B47F" xlink:to="loc_dei_EntityDomain_DF9AD5528C4CBD8AA6BCF5F7F539F932_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_DF9AD5528C4CBD8AA6BCF5F7F539F932" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_C0826B7269C3209196E5F5F7F539B47F" xlink:to="loc_dei_EntityDomain_DF9AD5528C4CBD8AA6BCF5F7F539F932" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ParentCompanyMember" xlink:label="loc_us-gaap_ParentCompanyMember_C934A1F260FBB04F51A1F5F7F5390094" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_DF9AD5528C4CBD8AA6BCF5F7F539F932" xlink:to="loc_us-gaap_ParentCompanyMember_C934A1F260FBB04F51A1F5F7F5390094" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RevenuesAbstract" xlink:label="loc_us-gaap_RevenuesAbstract_54CAAC9DD87D9F7296E2F5F7F539110C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_BD9CDA35D810DFD6E971F5F7F5396714" xlink:to="loc_us-gaap_RevenuesAbstract_54CAAC9DD87D9F7296E2F5F7F539110C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetInvestmentIncome" xlink:label="loc_us-gaap_NetInvestmentIncome_77E00EF3A1D4069398D1F5F7F53A5F2A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesAbstract_54CAAC9DD87D9F7296E2F5F7F539110C" xlink:to="loc_us-gaap_NetInvestmentIncome_77E00EF3A1D4069398D1F5F7F53A5F2A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_0380DB037B52576F3FCEF5F7F53ACD93" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesAbstract_54CAAC9DD87D9F7296E2F5F7F539110C" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesGrossRealizedGainLossNet_0380DB037B52576F3FCEF5F7F53ACD93" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Revenues" xlink:label="loc_us-gaap_Revenues_F6342A99CC7F776F1EA0F5F7F53A6667" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesAbstract_54CAAC9DD87D9F7296E2F5F7F539110C" xlink:to="loc_us-gaap_Revenues_F6342A99CC7F776F1EA0F5F7F53A6667" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CostsAndExpensesAbstract" xlink:label="loc_us-gaap_CostsAndExpensesAbstract_D484F83D6E458F6F268FF5F7F53A86D2" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_BD9CDA35D810DFD6E971F5F7F5396714" xlink:to="loc_us-gaap_CostsAndExpensesAbstract_D484F83D6E458F6F268FF5F7F53A86D2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherExpenses" xlink:label="loc_us-gaap_OtherExpenses_B12C2F40D27A15600DFDF5F7F53A1D90" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CostsAndExpensesAbstract_D484F83D6E458F6F268FF5F7F53A86D2" xlink:to="loc_us-gaap_OtherExpenses_B12C2F40D27A15600DFDF5F7F53A1D90" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CostsAndExpenses" xlink:label="loc_us-gaap_CostsAndExpenses_1834642828847F5105C4F5F7F53AA9AC" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CostsAndExpensesAbstract_D484F83D6E458F6F268FF5F7F53A86D2" xlink:to="loc_us-gaap_CostsAndExpenses_1834642828847F5105C4F5F7F53AA9AC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherIncomeAndExpensesAbstract" xlink:label="loc_us-gaap_OtherIncomeAndExpensesAbstract_B66F9D37A09BE2A904C4F5F7F53AE0CC" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_BD9CDA35D810DFD6E971F5F7F5396714" xlink:to="loc_us-gaap_OtherIncomeAndExpensesAbstract_B66F9D37A09BE2A904C4F5F7F53AE0CC" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_GainLossonChangeinFairValueofWarrantLiability" xlink:label="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_675B03920555920C0F38F5F7F53AE4E7" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherIncomeAndExpensesAbstract_B66F9D37A09BE2A904C4F5F7F53AE0CC" xlink:to="loc_nmih_GainLossonChangeinFairValueofWarrantLiability_675B03920555920C0F38F5F7F53AE4E7" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_GainLossFromSettlementofWarrants" xlink:label="loc_nmih_GainLossFromSettlementofWarrants_805979364BDE06D36472F5F7F53A15E0" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherIncomeAndExpensesAbstract_B66F9D37A09BE2A904C4F5F7F53AE0CC" xlink:to="loc_nmih_GainLossFromSettlementofWarrants_805979364BDE06D36472F5F7F53A15E0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InterestExpenseDebt" xlink:label="loc_us-gaap_InterestExpenseDebt_15411500D57515D509F4F5F7F53A5627" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherIncomeAndExpensesAbstract_B66F9D37A09BE2A904C4F5F7F53AE0CC" xlink:to="loc_us-gaap_InterestExpenseDebt_15411500D57515D509F4F5F7F53A5627" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherNonoperatingIncomeExpense" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_3A5205424797DC4BDBCBF5F7F53A04AB" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherIncomeAndExpensesAbstract_B66F9D37A09BE2A904C4F5F7F53AE0CC" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_3A5205424797DC4BDBCBF5F7F53A04AB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeLossFromEquityMethodInvestments" xlink:label="loc_us-gaap_IncomeLossFromEquityMethodInvestments_4153FD26E2FCA4B66E43F5F7F53A9515" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_BD9CDA35D810DFD6E971F5F7F5396714" xlink:to="loc_us-gaap_IncomeLossFromEquityMethodInvestments_4153FD26E2FCA4B66E43F5F7F53A9515" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_5341F265E36533EC5F9EF5F7F53A08E8" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_BD9CDA35D810DFD6E971F5F7F5396714" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_5341F265E36533EC5F9EF5F7F53A08E8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_IncomeTaxExpenseBenefit" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_00E5DC192D54727DF4CBF5F7F53AF54D" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_BD9CDA35D810DFD6E971F5F7F5396714" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_00E5DC192D54727DF4CBF5F7F53AF54D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_NetIncomeLoss" xlink:label="loc_us-gaap_NetIncomeLoss_F61F21A990895AD34738F5F7F53A36B5" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_BD9CDA35D810DFD6E971F5F7F5396714" xlink:to="loc_us-gaap_NetIncomeLoss_F61F21A990895AD34738F5F7F53A36B5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_28C986F5F1350350D400F5F7F53A68E3" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedIncomeStatementsCaptionsLineItems_BD9CDA35D810DFD6E971F5F7F5396714" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_28C986F5F1350350D400F5F7F53A68E3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_24D5B55EA6C9079A9EC3F5F7F53B912F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_28C986F5F1350350D400F5F7F53A68E3" xlink:to="loc_us-gaap_OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax_24D5B55EA6C9079A9EC3F5F7F53B912F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_9ACE40544A71C6049136F5F7F53B6E51" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_28C986F5F1350350D400F5F7F53A68E3" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIForSaleOfSecuritiesNetOfTax_9ACE40544A71C6049136F5F7F53B6E51" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_OtherComprehensiveIncomeLossNetofTaxPortionAttributabletoSubsidiary" xlink:label="loc_nmih_OtherComprehensiveIncomeLossNetofTaxPortionAttributabletoSubsidiary_7B6F67E8AB22778203E2F5F7F5BE7133" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_28C986F5F1350350D400F5F7F53A68E3" xlink:to="loc_nmih_OtherComprehensiveIncomeLossNetofTaxPortionAttributabletoSubsidiary_7B6F67E8AB22778203E2F5F7F5BE7133" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5CC405FC8E40DEC4EF5FF5F7F53B7BA2" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_28C986F5F1350350D400F5F7F53A68E3" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_5CC405FC8E40DEC4EF5FF5F7F53B7BA2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ComprehensiveIncomeNetOfTax" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_E13410B03B4C1A0C99E8F5F7F53BBB08" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPeriodIncreaseDecreaseAbstract_28C986F5F1350350D400F5F7F53A68E3" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTax_E13410B03B4C1A0C99E8F5F7F53BBB08" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ScheduleIiFinancialInformationOfRegistrantParentCompanyOnlySupplementalNotesDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CondensedFinancialStatementsCaptionsLineItems" xlink:label="loc_us-gaap_CondensedFinancialStatementsCaptionsLineItems_E16F9D747BF85A9BB38044C37BA310CD" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfCondensedFinancialStatementsTable" xlink:label="loc_us-gaap_ScheduleOfCondensedFinancialStatementsTable_74BDF9F4DE905A9EB7672D7F89CCD235" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_CondensedFinancialStatementsCaptionsLineItems_E16F9D747BF85A9BB38044C37BA310CD" xlink:to="loc_us-gaap_ScheduleOfCondensedFinancialStatementsTable_74BDF9F4DE905A9EB7672D7F89CCD235" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_LegalEntityAxis" xlink:label="loc_dei_LegalEntityAxis_7EABEBBB2EDC55DA86D6D950F8815C9C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfCondensedFinancialStatementsTable_74BDF9F4DE905A9EB7672D7F89CCD235" xlink:to="loc_dei_LegalEntityAxis_7EABEBBB2EDC55DA86D6D950F8815C9C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_8EFEC3D4332B03F8FD654BA943310ADC_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_7EABEBBB2EDC55DA86D6D950F8815C9C" xlink:to="loc_dei_EntityDomain_8EFEC3D4332B03F8FD654BA943310ADC_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.sec.gov/dei/2014/dei-2014-01-31.xsd#dei_EntityDomain" xlink:label="loc_dei_EntityDomain_006178F31E9D5DC69610B5CF8F55F2AE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_7EABEBBB2EDC55DA86D6D950F8815C9C" xlink:to="loc_dei_EntityDomain_006178F31E9D5DC69610B5CF8F55F2AE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SubsidiariesMember" xlink:label="loc_us-gaap_SubsidiariesMember_253F5A4514FF5588BD2D22D8A4AF6A43" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_006178F31E9D5DC69610B5CF8F55F2AE" xlink:to="loc_us-gaap_SubsidiariesMember_253F5A4514FF5588BD2D22D8A4AF6A43" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_OperatingExpenses" xlink:label="loc_us-gaap_OperatingExpenses_1CCE63E460345E429ACF410235F0639A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CondensedFinancialStatementsCaptionsLineItems_E16F9D747BF85A9BB38044C37BA310CD" xlink:to="loc_us-gaap_OperatingExpenses_1CCE63E460345E429ACF410235F0639A" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ScheduleIvFinancialInformationOfRegistrantReinsuranceParentCompanyOnly" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensation" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_DD72B65A0CDD9169F530C27AF126B13D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_DD72B65A0CDD9169F530C27AF126B13D" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByLiabilityClassAxis" xlink:label="loc_us-gaap_FairValueByLiabilityClassAxis_D787DB2CEAA7BFEA1309C27AF126C854" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_DD72B65A0CDD9169F530C27AF126B13D" xlink:to="loc_us-gaap_FairValueByLiabilityClassAxis_D787DB2CEAA7BFEA1309C27AF126C854" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_EE6CA24745D0D948FE50C27AF1264AA1_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByLiabilityClassAxis_D787DB2CEAA7BFEA1309C27AF126C854" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_EE6CA24745D0D948FE50C27AF1264AA1_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_EE6CA24745D0D948FE50C27AF1264AA1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByLiabilityClassAxis_D787DB2CEAA7BFEA1309C27AF126C854" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_EE6CA24745D0D948FE50C27AF1264AA1" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_WarrantLiabilityMember" xlink:label="loc_nmih_WarrantLiabilityMember_7F34CB19D86862706E9AC27AF126C41B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisUnobservableInputReconciliationByLiabilityClassDomain_EE6CA24745D0D948FE50C27AF1264AA1" xlink:to="loc_nmih_WarrantLiabilityMember_7F34CB19D86862706E9AC27AF126C41B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_0EAD78BF247ACFFC1546C27AF126A43F" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_DD72B65A0CDD9169F530C27AF126B13D" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_0EAD78BF247ACFFC1546C27AF126A43F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_CA08672166AD9E45B831C27AF1262882_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_0EAD78BF247ACFFC1546C27AF126A43F" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_CA08672166AD9E45B831C27AF1262882_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_CA08672166AD9E45B831C27AF1262882" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_0EAD78BF247ACFFC1546C27AF126A43F" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_CA08672166AD9E45B831C27AF1262882" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FairValueInputsLevel3Member" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_86C85EA6EBD7EDC108ECC27AF1266AAE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_CA08672166AD9E45B831C27AF1262882" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_86C85EA6EBD7EDC108ECC27AF1266AAE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_F8701E5A079D310A83D8C27AF126878A" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_DD72B65A0CDD9169F530C27AF126B13D" xlink:to="loc_us-gaap_RangeAxis_F8701E5A079D310A83D8C27AF126878A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_28F638C2E6C3A5C4979CC27AF126EB35_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_F8701E5A079D310A83D8C27AF126878A" xlink:to="loc_us-gaap_RangeMember_28F638C2E6C3A5C4979CC27AF126EB35_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_28F638C2E6C3A5C4979CC27AF126EB35" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_F8701E5A079D310A83D8C27AF126878A" xlink:to="loc_us-gaap_RangeMember_28F638C2E6C3A5C4979CC27AF126EB35" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_18F1FB2FA7B05711DAF8C27AF12750C6" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_28F638C2E6C3A5C4979CC27AF126EB35" xlink:to="loc_us-gaap_MinimumMember_18F1FB2FA7B05711DAF8C27AF12750C6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_860761838900A8ACF35AC27AF127B709" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_28F638C2E6C3A5C4979CC27AF126EB35" xlink:to="loc_us-gaap_MaximumMember_860761838900A8ACF35AC27AF127B709" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_69CD0F5D6BDEF23FFA99C27AF127C3B4" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_DD72B65A0CDD9169F530C27AF126B13D" xlink:to="loc_us-gaap_PlanNameAxis_69CD0F5D6BDEF23FFA99C27AF127C3B4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_B3E891647A4F7E02350AC27AF127576C_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_69CD0F5D6BDEF23FFA99C27AF127C3B4" xlink:to="loc_us-gaap_PlanNameDomain_B3E891647A4F7E02350AC27AF127576C_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_B3E891647A4F7E02350AC27AF127576C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_69CD0F5D6BDEF23FFA99C27AF127C3B4" xlink:to="loc_us-gaap_PlanNameDomain_B3E891647A4F7E02350AC27AF127576C" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_The2012StockIncentivePlanMember" xlink:label="loc_nmih_The2012StockIncentivePlanMember_3FDC8A1F1EAB14D6E05FC27AF127E273" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_B3E891647A4F7E02350AC27AF127576C" xlink:to="loc_nmih_The2012StockIncentivePlanMember_3FDC8A1F1EAB14D6E05FC27AF127E273" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_NMIH2014OmnibusIncentivePlanMember" xlink:label="loc_nmih_NMIH2014OmnibusIncentivePlanMember_373989D03BFF4B31A181C27AF1276911" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_B3E891647A4F7E02350AC27AF127576C" xlink:to="loc_nmih_NMIH2014OmnibusIncentivePlanMember_373989D03BFF4B31A181C27AF1276911" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_DirectorPhantomSharePlanMember" xlink:label="loc_nmih_DirectorPhantomSharePlanMember_DF56AC806CDBF29D8CC0C27AF1270240" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_B3E891647A4F7E02350AC27AF127576C" xlink:to="loc_nmih_DirectorPhantomSharePlanMember_DF56AC806CDBF29D8CC0C27AF1270240" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_3CA55DCBACD98E5112EBC27AF1274F7B" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_DD72B65A0CDD9169F530C27AF126B13D" xlink:to="loc_us-gaap_StatementClassOfStockAxis_3CA55DCBACD98E5112EBC27AF1274F7B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_857F92539A62FF628B92C27AF127674B_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_3CA55DCBACD98E5112EBC27AF1274F7B" xlink:to="loc_us-gaap_ClassOfStockDomain_857F92539A62FF628B92C27AF127674B_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_857F92539A62FF628B92C27AF127674B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_3CA55DCBACD98E5112EBC27AF1274F7B" xlink:to="loc_us-gaap_ClassOfStockDomain_857F92539A62FF628B92C27AF127674B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_36DC802FF326873DDE64C27AF127FB47" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_857F92539A62FF628B92C27AF127674B" xlink:to="loc_us-gaap_CommonClassAMember_36DC802FF326873DDE64C27AF127FB47" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_7BCCF7D674FB1F1B928EC27AF12704C1" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_DD72B65A0CDD9169F530C27AF126B13D" xlink:to="loc_us-gaap_AwardTypeAxis_7BCCF7D674FB1F1B928EC27AF12704C1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F32E5E1183E94B5CA790C27AF1278750_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_7BCCF7D674FB1F1B928EC27AF12704C1" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F32E5E1183E94B5CA790C27AF1278750_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F32E5E1183E94B5CA790C27AF1278750" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_7BCCF7D674FB1F1B928EC27AF12704C1" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F32E5E1183E94B5CA790C27AF1278750" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_1F5E89C01A6925A8F7DAC27AF1279288" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F32E5E1183E94B5CA790C27AF1278750" xlink:to="loc_us-gaap_EmployeeStockOptionMember_1F5E89C01A6925A8F7DAC27AF1279288" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_7E4892A6FA93E4E3BFB7C27AF12797BC" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F32E5E1183E94B5CA790C27AF1278750" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_7E4892A6FA93E4E3BFB7C27AF12797BC" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_RestrictedStockUnitsRSUsSubjecttoMarketConditionsMember" xlink:label="loc_nmih_RestrictedStockUnitsRSUsSubjecttoMarketConditionsMember_A4154A2B6C5350786E38C2ABD92CF9F6" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F32E5E1183E94B5CA790C27AF1278750" xlink:to="loc_nmih_RestrictedStockUnitsRSUsSubjecttoMarketConditionsMember_A4154A2B6C5350786E38C2ABD92CF9F6" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_RestrictedStockUnitsRSUsSubjecttoMarketandServiceConditionsMember" xlink:label="loc_nmih_RestrictedStockUnitsRSUsSubjecttoMarketandServiceConditionsMember_63C21A8C3E1F944B09CDC27AF127E21A" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F32E5E1183E94B5CA790C27AF1278750" xlink:to="loc_nmih_RestrictedStockUnitsRSUsSubjecttoMarketandServiceConditionsMember_63C21A8C3E1F944B09CDC27AF127E21A" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_RestrictedStockUnitsRSUsSubjecttoServiceConditionsMember" xlink:label="loc_nmih_RestrictedStockUnitsRSUsSubjecttoServiceConditionsMember_F78BA370C56224118418C27AF1270691" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F32E5E1183E94B5CA790C27AF1278750" xlink:to="loc_nmih_RestrictedStockUnitsRSUsSubjecttoServiceConditionsMember_F78BA370C56224118418C27AF1270691" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PhantomShareUnitsPSUsMember" xlink:label="loc_us-gaap_PhantomShareUnitsPSUsMember_DDBF01087836F2117E3EC27AF127978C" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F32E5E1183E94B5CA790C27AF1278750" xlink:to="loc_us-gaap_PhantomShareUnitsPSUsMember_DDBF01087836F2117E3EC27AF127978C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized_F09B2CD1D15BFF294084C27AF12813DA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized_F09B2CD1D15BFF294084C27AF12813DA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_B860947D53D5C2F580EBC27AF12813EE" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_B860947D53D5C2F580EBC27AF12813EE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1_7A00E2E3AB01E744AFFEC28966384435" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1_7A00E2E3AB01E744AFFEC28966384435" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_5B0904B36E2C12C3B744C27AF12865B8" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_5B0904B36E2C12C3B744C27AF12865B8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber_C6B256CECFB89B1B4FF5C27AF128D549" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableNumber_C6B256CECFB89B1B4FF5C27AF128D549" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_59BBC8A06E3583A3107FC29482A2AB49" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_59BBC8A06E3583A3107FC29482A2AB49" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageExercisePrice_5E6F428791A8CBC8CFEDC27AF128BB51" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageExercisePrice_5E6F428791A8CBC8CFEDC27AF128BB51" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageRemainingContractualTerm1" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageRemainingContractualTerm1_FA998776B23CD65B3FD7C27AF1286169" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestExercisableWeightedAverageRemainingContractualTerm1_FA998776B23CD65B3FD7C27AF1286169" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableAggregateIntrinsicValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableAggregateIntrinsicValue_5053DC4FA61CEA85C611C27AF1287B47" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestExercisableAggregateIntrinsicValue_5053DC4FA61CEA85C611C27AF1287B47" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2_2A5CB72F6F8C801F3297C27AF1284454" xlink:type="locator" />
    <definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2_2A5CB72F6F8C801F3297C27AF1284454" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions_9E8DA5FCF77D46C316D1C27AF12868DC" xlink:type="locator" />
    <definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions_9E8DA5FCF77D46C316D1C27AF12868DC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_F94384E0A6EFD11693BDC27AF128D1A1" xlink:type="locator" />
    <definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_F94384E0A6EFD11693BDC27AF128D1A1" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardPlanModificationNumberofSharesOutstandingandUnvestedAffected" xlink:label="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardPlanModificationNumberofSharesOutstandingandUnvestedAffected_B41FB0DE49E6FEB630F0C27AF12830BB" xlink:type="locator" />
    <definitionArc order="13" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardPlanModificationNumberofSharesOutstandingandUnvestedAffected_B41FB0DE49E6FEB630F0C27AF12830BB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_9783AE99F3424DF93408C27AF128B4CF" xlink:type="locator" />
    <definitionArc order="14" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_9783AE99F3424DF93408C27AF128B4CF" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardEquityInstrumentsOtherthanOptionsNonvestedSubjecttoBothMarketandServiceConditionsAnnualVestingPercentage" xlink:label="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardEquityInstrumentsOtherthanOptionsNonvestedSubjecttoBothMarketandServiceConditionsAnnualVestingPercentage_76D123E3D9139E699BD2C27AF12865BB" xlink:type="locator" />
    <definitionArc order="15" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardEquityInstrumentsOtherthanOptionsNonvestedSubjecttoBothMarketandServiceConditionsAnnualVestingPercentage_76D123E3D9139E699BD2C27AF12865BB" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_NumberofSimulations" xlink:label="loc_nmih_NumberofSimulations_BFADA73DDA1E712E26A0C27AF12867F8" xlink:type="locator" />
    <definitionArc order="16" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_nmih_NumberofSimulations_BFADA73DDA1E712E26A0C27AF12867F8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTerms" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTerms_2189BCB473EA9381AF1AC27AF1281690" xlink:type="locator" />
    <definitionArc order="17" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsOutstandingWeightedAverageRemainingContractualTerms_2189BCB473EA9381AF1AC27AF1281690" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_Dividends" xlink:label="loc_us-gaap_Dividends_B9A7706BB7FCF0D66AD9C27AF1282C04" xlink:type="locator" />
    <definitionArc order="18" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_Dividends_B9A7706BB7FCF0D66AD9C27AF1282C04" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_8EBAC513825D3706B7DCC27AF12812FA" xlink:type="locator" />
    <definitionArc order="19" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_8EBAC513825D3706B7DCC27AF12812FA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DefinedContributionPlanEmployerMatchingContributionPercentOfMatch" xlink:label="loc_us-gaap_DefinedContributionPlanEmployerMatchingContributionPercentOfMatch_269B07C340C5F8CA7736C27AF128FEA6" xlink:type="locator" />
    <definitionArc order="20" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_DefinedContributionPlanEmployerMatchingContributionPercentOfMatch_269B07C340C5F8CA7736C27AF128FEA6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DefinedContributionPlanEmployerMatchingContributionPercent" xlink:label="loc_us-gaap_DefinedContributionPlanEmployerMatchingContributionPercent_0908A88FD4ACD7578663C27AF12837C2" xlink:type="locator" />
    <definitionArc order="21" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_DefinedContributionPlanEmployerMatchingContributionPercent_0908A88FD4ACD7578663C27AF12837C2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DefinedContributionPlanEmployerDiscretionaryContributionAmount" xlink:label="loc_us-gaap_DefinedContributionPlanEmployerDiscretionaryContributionAmount_4375BFD067CCD4AB7EEBC27AF128BF91" xlink:type="locator" />
    <definitionArc order="22" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_DefinedContributionPlanEmployerDiscretionaryContributionAmount_4375BFD067CCD4AB7EEBC27AF128BF91" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_5CF38A624C50D078DC92C27AF1283B46" xlink:type="locator" />
    <definitionArc order="23" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_5CF38A624C50D078DC92C27AF1283B46" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardNumberofIndependentDirectors" xlink:label="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardNumberofIndependentDirectors_5C5125AD31BD92581E87C2A4A2E9225B" xlink:type="locator" />
    <definitionArc order="24" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardNumberofIndependentDirectors_5C5125AD31BD92581E87C2A4A2E9225B" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardEquityInstrumentsOtherthanOptionsGrantedFairMarketValue" xlink:label="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardEquityInstrumentsOtherthanOptionsGrantedFairMarketValue_1162541A5177024ECC89C2992F01B17F" xlink:type="locator" />
    <definitionArc order="25" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardEquityInstrumentsOtherthanOptionsGrantedFairMarketValue_1162541A5177024ECC89C2992F01B17F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharePrice" xlink:label="loc_us-gaap_SharePrice_D691006146083105D2D1C27AF12972D2" xlink:type="locator" />
    <definitionArc order="26" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_SharePrice_D691006146083105D2D1C27AF12972D2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AllocatedShareBasedCompensationExpense" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_3B0AB38FBDE8CFFF8DBCC27AF1292E57" xlink:type="locator" />
    <definitionArc order="27" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_929E4633C326192D75B7C27AF12834E2" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_3B0AB38FBDE8CFFF8DBCC27AF1292E57" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsActivityDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D49BCD3AEF8158F9A57A3EA0849EEADA" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_B5DDCEFDE9F65C1A8A4F6A0787A8F0E2" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D49BCD3AEF8158F9A57A3EA0849EEADA" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_B5DDCEFDE9F65C1A8A4F6A0787A8F0E2" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_D1FA6FB9EC0D51A8B67087EB498463CB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_B5DDCEFDE9F65C1A8A4F6A0787A8F0E2" xlink:to="loc_us-gaap_PlanNameAxis_D1FA6FB9EC0D51A8B67087EB498463CB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_A9FEB9E06D69E7E6C04323F6ECB62874_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_D1FA6FB9EC0D51A8B67087EB498463CB" xlink:to="loc_us-gaap_PlanNameDomain_A9FEB9E06D69E7E6C04323F6ECB62874_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_919E0F7BEE365F63999DFD9201DD0BF5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_D1FA6FB9EC0D51A8B67087EB498463CB" xlink:to="loc_us-gaap_PlanNameDomain_919E0F7BEE365F63999DFD9201DD0BF5" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_The2012StockIncentivePlanMember" xlink:label="loc_nmih_The2012StockIncentivePlanMember_8C3524F7EE295C7B88D907225AC7BEEC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_919E0F7BEE365F63999DFD9201DD0BF5" xlink:to="loc_nmih_The2012StockIncentivePlanMember_8C3524F7EE295C7B88D907225AC7BEEC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_F26A1EA43B7B5E4C80CB8D9BAC84FA42" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_B5DDCEFDE9F65C1A8A4F6A0787A8F0E2" xlink:to="loc_us-gaap_AwardTypeAxis_F26A1EA43B7B5E4C80CB8D9BAC84FA42" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F8130D5CB7A4232F4CC823F6ECB69B13_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_F26A1EA43B7B5E4C80CB8D9BAC84FA42" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_F8130D5CB7A4232F4CC823F6ECB69B13_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5311CCA0D45F52A4AB8CE661D479E7E1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_F26A1EA43B7B5E4C80CB8D9BAC84FA42" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5311CCA0D45F52A4AB8CE661D479E7E1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_1ACD6BE7DFBA54D3A1B0ADAA3DE5B71D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_5311CCA0D45F52A4AB8CE661D479E7E1" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_1ACD6BE7DFBA54D3A1B0ADAA3DE5B71D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_E08DABADB7A65410938784DF70245F7A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D49BCD3AEF8158F9A57A3EA0849EEADA" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_E08DABADB7A65410938784DF70245F7A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_1A89B9CE55E5526D8264B342400E38E1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_E08DABADB7A65410938784DF70245F7A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_1A89B9CE55E5526D8264B342400E38E1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_B6C327D1E410516FBE943A8A4DA02FA7" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_E08DABADB7A65410938784DF70245F7A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_B6C327D1E410516FBE943A8A4DA02FA7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_895DFA44A53454E39B237485686A1F68" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_E08DABADB7A65410938784DF70245F7A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_895DFA44A53454E39B237485686A1F68" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_F056CA8301AB584BB49D4C9C9560AC9D" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_E08DABADB7A65410938784DF70245F7A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_F056CA8301AB584BB49D4C9C9560AC9D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_EE1ADE43ACC455A5810B6BDFD647BA70" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_D49BCD3AEF8158F9A57A3EA0849EEADA" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_EE1ADE43ACC455A5810B6BDFD647BA70" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_477D8143277E5C3E9FF26388B2B4F34A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_EE1ADE43ACC455A5810B6BDFD647BA70" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_477D8143277E5C3E9FF26388B2B4F34A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_565C27B10BAE5788B8B6A094BBEA8C1A" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_EE1ADE43ACC455A5810B6BDFD647BA70" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_565C27B10BAE5788B8B6A094BBEA8C1A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_4ABA9DCD3573505D8FD5581859D95A13" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_EE1ADE43ACC455A5810B6BDFD647BA70" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_4ABA9DCD3573505D8FD5581859D95A13" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_9CE49D9C37555AD3B6FE0D9B85EDD581" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_EE1ADE43ACC455A5810B6BDFD647BA70" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_9CE49D9C37555AD3B6FE0D9B85EDD581" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationRestrictedStockUnitsValuationAssumptionsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_637B6F072F575E1BBC8C927A1BE53C6D" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_F91724790CBC5A30AABDCA1ED919C050" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_637B6F072F575E1BBC8C927A1BE53C6D" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_F91724790CBC5A30AABDCA1ED919C050" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_C8EF65FF158F5D2DA1D7F245CABBDA42" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_F91724790CBC5A30AABDCA1ED919C050" xlink:to="loc_us-gaap_PlanNameAxis_C8EF65FF158F5D2DA1D7F245CABBDA42" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_4B4B6A897461261FF9A5BE72CC2D7B55_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_C8EF65FF158F5D2DA1D7F245CABBDA42" xlink:to="loc_us-gaap_PlanNameDomain_4B4B6A897461261FF9A5BE72CC2D7B55_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_034D5CA3D1105E96A5AAEF0AA5AD342A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_C8EF65FF158F5D2DA1D7F245CABBDA42" xlink:to="loc_us-gaap_PlanNameDomain_034D5CA3D1105E96A5AAEF0AA5AD342A" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_The2012StockIncentivePlanMember" xlink:label="loc_nmih_The2012StockIncentivePlanMember_78995799511B532A9DFF156CFEA2B878" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_034D5CA3D1105E96A5AAEF0AA5AD342A" xlink:to="loc_nmih_The2012StockIncentivePlanMember_78995799511B532A9DFF156CFEA2B878" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_0ABFD9D17E995495AB6DEE9E35E32D99" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_F91724790CBC5A30AABDCA1ED919C050" xlink:to="loc_us-gaap_AwardTypeAxis_0ABFD9D17E995495AB6DEE9E35E32D99" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_14893B7A242C9407DF62BE72CC2DE820_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_0ABFD9D17E995495AB6DEE9E35E32D99" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_14893B7A242C9407DF62BE72CC2DE820_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_62D388DEE4DA54DB97304A9726773931" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_0ABFD9D17E995495AB6DEE9E35E32D99" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_62D388DEE4DA54DB97304A9726773931" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RestrictedStockUnitsRSUMember" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_24B7962F505855E4B99DF214D0346467" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_62D388DEE4DA54DB97304A9726773931" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_24B7962F505855E4B99DF214D0346467" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1_87375FCE3D235F0981A157EE93935C2B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_637B6F072F575E1BBC8C927A1BE53C6D" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1_87375FCE3D235F0981A157EE93935C2B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate_E906163DE872593FAEED79027E2E609B" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_637B6F072F575E1BBC8C927A1BE53C6D" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate_E906163DE872593FAEED79027E2E609B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_E0E9EBD533815C3F870B4609EC63D09D" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_637B6F072F575E1BBC8C927A1BE53C6D" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_E0E9EBD533815C3F870B4609EC63D09D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_45D70016257451C3B89A226BA28ECC48" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_637B6F072F575E1BBC8C927A1BE53C6D" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_45D70016257451C3B89A226BA28ECC48" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ShareBasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedForfeitureRate" xlink:label="loc_nmih_ShareBasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedForfeitureRate_F6C98D8D705653AE9837E0A761A2EC03" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_637B6F072F575E1BBC8C927A1BE53C6D" xlink:to="loc_nmih_ShareBasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedForfeitureRate_F6C98D8D705653AE9837E0A761A2EC03" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionActivityDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_EABE71D73E232CDE927BBCFB6088953A" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_05D3A0CC7E5347834107BCFB60871E45" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_EABE71D73E232CDE927BBCFB6088953A" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_05D3A0CC7E5347834107BCFB60871E45" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_8B2D5FB65C79F0AA9E8EBCFB60889E71" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_05D3A0CC7E5347834107BCFB60871E45" xlink:to="loc_us-gaap_PlanNameAxis_8B2D5FB65C79F0AA9E8EBCFB60889E71" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_890684D2D7A5C344B7E9BCFB60880B88_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_8B2D5FB65C79F0AA9E8EBCFB60889E71" xlink:to="loc_us-gaap_PlanNameDomain_890684D2D7A5C344B7E9BCFB60880B88_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_890684D2D7A5C344B7E9BCFB60880B88" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_8B2D5FB65C79F0AA9E8EBCFB60889E71" xlink:to="loc_us-gaap_PlanNameDomain_890684D2D7A5C344B7E9BCFB60880B88" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_The2012StockIncentivePlanMember" xlink:label="loc_nmih_The2012StockIncentivePlanMember_C5B485A4200F38C1109EBCFB608869E8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_890684D2D7A5C344B7E9BCFB60880B88" xlink:to="loc_nmih_The2012StockIncentivePlanMember_C5B485A4200F38C1109EBCFB608869E8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_483D1D12F2437B335849BCFB60889E79" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_EABE71D73E232CDE927BBCFB6088953A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_483D1D12F2437B335849BCFB60889E79" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber_219BB7E8A08A27EAC52BBCFB6088C041" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_483D1D12F2437B335849BCFB60889E79" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber_219BB7E8A08A27EAC52BBCFB6088C041" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_3C8F5AAF2E1E048F778CBCFB60887774" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_483D1D12F2437B335849BCFB60889E79" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_3C8F5AAF2E1E048F778CBCFB60887774" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_0C39D553F6EEE3CBCB90BCFB608898B0" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_483D1D12F2437B335849BCFB60889E79" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised_0C39D553F6EEE3CBCB90BCFB608898B0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod_9652388DC26F3C312528BCFB6088F58A" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_483D1D12F2437B335849BCFB60889E79" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresInPeriod_9652388DC26F3C312528BCFB6088F58A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExpirationsInPeriod" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExpirationsInPeriod_4B44488EF28F245AB570BCFB6088689F" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward_483D1D12F2437B335849BCFB60889E79" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExpirationsInPeriod_4B44488EF28F245AB570BCFB6088689F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_28F987D870C4112A41B4BCFB608863EF" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_EABE71D73E232CDE927BBCFB6088953A" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_28F987D870C4112A41B4BCFB608863EF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValue_E2B4A3E880B753F7B467BCFB6088FF4B" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_28F987D870C4112A41B4BCFB608863EF" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedWeightedAverageGrantDateFairValue_E2B4A3E880B753F7B467BCFB6088FF4B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_BC66BE47D9F857351201BCFB6088576F" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_28F987D870C4112A41B4BCFB608863EF" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_BC66BE47D9F857351201BCFB6088576F" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardOptionsExercisesinPeriodWeightedAverageGrantDateFairValue" xlink:label="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardOptionsExercisesinPeriodWeightedAverageGrantDateFairValue_345AC7495F57EB7701BBBCFB60886869" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_28F987D870C4112A41B4BCFB608863EF" xlink:to="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardOptionsExercisesinPeriodWeightedAverageGrantDateFairValue_345AC7495F57EB7701BBBCFB60886869" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedOptionsForfeitedWeightedAverageGrantDateFairValue" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedOptionsForfeitedWeightedAverageGrantDateFairValue_829D1D46D9B798269EBCBCFB6088BD0E" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_28F987D870C4112A41B4BCFB608863EF" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedOptionsForfeitedWeightedAverageGrantDateFairValue_829D1D46D9B798269EBCBCFB6088BD0E" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardOptionsNonvestedOptionsExpiredWeightedAverageGrantDateFairValue" xlink:label="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardOptionsNonvestedOptionsExpiredWeightedAverageGrantDateFairValue_545D8037BD6AF455DD7CBCFB6088A4E2" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsNonvestedNumberOfSharesRollForward_28F987D870C4112A41B4BCFB608863EF" xlink:to="loc_nmih_SharebasedCompensationArrangementbySharebasedPaymentAwardOptionsNonvestedOptionsExpiredWeightedAverageGrantDateFairValue_545D8037BD6AF455DD7CBCFB6088A4E2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_099615BE8F4CEBA08823BCFB6089E01A" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_EABE71D73E232CDE927BBCFB6088953A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_099615BE8F4CEBA08823BCFB6089E01A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice_1CDB9E18348E861B6CDABCFB6089DBC6" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_099615BE8F4CEBA08823BCFB6089E01A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice_1CDB9E18348E861B6CDABCFB6089DBC6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice_C068E1170B6C67CB384ABCFB6089F862" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_099615BE8F4CEBA08823BCFB6089E01A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice_C068E1170B6C67CB384ABCFB6089F862" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice_EE9763C9DAC581630B2BBCFB60892705" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_099615BE8F4CEBA08823BCFB6089E01A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice_EE9763C9DAC581630B2BBCFB60892705" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice_30AAA096508C3664A0BFBCFB6089D8FA" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_099615BE8F4CEBA08823BCFB6089E01A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsForfeituresInPeriodWeightedAverageExercisePrice_30AAA096508C3664A0BFBCFB6089D8FA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExpirationsInPeriodWeightedAverageExercisePrice" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExpirationsInPeriodWeightedAverageExercisePrice_ECEDED67A91D792A0A85BCFB60898A03" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward_099615BE8F4CEBA08823BCFB6089E01A" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExpirationsInPeriodWeightedAverageExercisePrice_ECEDED67A91D792A0A85BCFB60898A03" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationStockOptionsValuationAssumptionsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_A02FE180188055F08DF87FB94B05CAAF" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_BB76CE0BE69F5A96A1B774F87ABDACE3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_A02FE180188055F08DF87FB94B05CAAF" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_BB76CE0BE69F5A96A1B774F87ABDACE3" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_CBAACD914C915C9186AE350EE8AD70AB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_BB76CE0BE69F5A96A1B774F87ABDACE3" xlink:to="loc_us-gaap_RangeAxis_CBAACD914C915C9186AE350EE8AD70AB" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_DA0464C400AB5FEB218DBE72CBBFCB53_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_CBAACD914C915C9186AE350EE8AD70AB" xlink:to="loc_us-gaap_RangeMember_DA0464C400AB5FEB218DBE72CBBFCB53_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_26595B095C5D50C98BFA57C8B558C08F" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_CBAACD914C915C9186AE350EE8AD70AB" xlink:to="loc_us-gaap_RangeMember_26595B095C5D50C98BFA57C8B558C08F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_3B60D6C05A2A502488B6572C2545C2BE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_26595B095C5D50C98BFA57C8B558C08F" xlink:to="loc_us-gaap_MinimumMember_3B60D6C05A2A502488B6572C2545C2BE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_F3B1D230E2D85FB5ADEE89B217C0096D" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_26595B095C5D50C98BFA57C8B558C08F" xlink:to="loc_us-gaap_MaximumMember_F3B1D230E2D85FB5ADEE89B217C0096D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameAxis" xlink:label="loc_us-gaap_PlanNameAxis_E99B3BF3F5315F088FC57142526374D5" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_BB76CE0BE69F5A96A1B774F87ABDACE3" xlink:to="loc_us-gaap_PlanNameAxis_E99B3BF3F5315F088FC57142526374D5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_988F970DE0008EDF789CBE72CBBF5FE7_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_E99B3BF3F5315F088FC57142526374D5" xlink:to="loc_us-gaap_PlanNameDomain_988F970DE0008EDF789CBE72CBBF5FE7_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PlanNameDomain" xlink:label="loc_us-gaap_PlanNameDomain_AADB023EB2E85B879BE76D62ECF9E7F7" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_E99B3BF3F5315F088FC57142526374D5" xlink:to="loc_us-gaap_PlanNameDomain_AADB023EB2E85B879BE76D62ECF9E7F7" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_The2012StockIncentivePlanMember" xlink:label="loc_nmih_The2012StockIncentivePlanMember_98EEED65DFE25BC4A427691591D4666C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_AADB023EB2E85B879BE76D62ECF9E7F7" xlink:to="loc_nmih_The2012StockIncentivePlanMember_98EEED65DFE25BC4A427691591D4666C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AwardTypeAxis" xlink:label="loc_us-gaap_AwardTypeAxis_B50BD63113E150058C7DC9EC3504F49F" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_BB76CE0BE69F5A96A1B774F87ABDACE3" xlink:to="loc_us-gaap_AwardTypeAxis_B50BD63113E150058C7DC9EC3504F49F" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_CCDF28F6B1E10BE1A95FBE72CBBF45C1_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_B50BD63113E150058C7DC9EC3504F49F" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_CCDF28F6B1E10BE1A95FBE72CBBF45C1_F8480B38591D5CF8AD45E2D89CDB0A84" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_1CA9D42AA634519289AE542D441A81EA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_B50BD63113E150058C7DC9EC3504F49F" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_1CA9D42AA634519289AE542D441A81EA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EmployeeStockOptionMember" xlink:label="loc_us-gaap_EmployeeStockOptionMember_D1B5341DE1F3592B8376ECA46ABBE02D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_1CA9D42AA634519289AE542D441A81EA" xlink:to="loc_us-gaap_EmployeeStockOptionMember_D1B5341DE1F3592B8376ECA46ABBE02D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1_493ADCBFADF05140959C7F5C93EA3B67" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_A02FE180188055F08DF87FB94B05CAAF" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1_493ADCBFADF05140959C7F5C93EA3B67" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate_D3C898373BE35B7E94C535A7E2DA1D09" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_A02FE180188055F08DF87FB94B05CAAF" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate_D3C898373BE35B7E94C535A7E2DA1D09" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_BA22A9DBD80E5EA68ECBDD62E206147E" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_A02FE180188055F08DF87FB94B05CAAF" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_BA22A9DBD80E5EA68ECBDD62E206147E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_9C352CB90C92562692A26A5288BB703F" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_A02FE180188055F08DF87FB94B05CAAF" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_9C352CB90C92562692A26A5288BB703F" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ShareBasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedForfeitureRate" xlink:label="loc_nmih_ShareBasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedForfeitureRate_5BB595D477E750E6B7736260FF2238AA" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_A02FE180188055F08DF87FB94B05CAAF" xlink:to="loc_nmih_ShareBasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedForfeitureRate_5BB595D477E750E6B7736260FF2238AA" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/ShareBasedCompensationTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipment" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentLineItems" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_19B231E13063D95097D3B0AC399E5368" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_4A6F88ADF57A19051F47B0AC399DB3BA" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_19B231E13063D95097D3B0AC399E5368" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_4A6F88ADF57A19051F47B0AC399DB3BA" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_F0E95BB3FC4DE245F094B0AC399D7D89" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_4A6F88ADF57A19051F47B0AC399DB3BA" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_F0E95BB3FC4DE245F094B0AC399D7D89" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_529EA79B979D08B83DF5B0AC399DC36A_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_F0E95BB3FC4DE245F094B0AC399D7D89" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_529EA79B979D08B83DF5B0AC399DC36A_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_529EA79B979D08B83DF5B0AC399DC36A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_F0E95BB3FC4DE245F094B0AC399D7D89" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_529EA79B979D08B83DF5B0AC399DC36A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SoftwareAndSoftwareDevelopmentCostsMember" xlink:label="loc_us-gaap_SoftwareAndSoftwareDevelopmentCostsMember_B54D505FEEC42AF2C994B0AC399D9EBE" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_529EA79B979D08B83DF5B0AC399DC36A" xlink:to="loc_us-gaap_SoftwareAndSoftwareDevelopmentCostsMember_B54D505FEEC42AF2C994B0AC399D9EBE" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquipmentMember" xlink:label="loc_us-gaap_EquipmentMember_096A96DE6C1BC1BA4352B0AC399DCA90" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_529EA79B979D08B83DF5B0AC399DC36A" xlink:to="loc_us-gaap_EquipmentMember_096A96DE6C1BC1BA4352B0AC399DCA90" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LeaseholdImprovementsMember" xlink:label="loc_us-gaap_LeaseholdImprovementsMember_CD143CF12DBE624BFC94B0AC399DC5CD" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_529EA79B979D08B83DF5B0AC399DC36A" xlink:to="loc_us-gaap_LeaseholdImprovementsMember_CD143CF12DBE624BFC94B0AC399DC5CD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentGross" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentGross_4FB3772619D9050C840BB0AC399E935C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_19B231E13063D95097D3B0AC399E5368" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentGross_4FB3772619D9050C840BB0AC399E935C" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_3D6CF745BCCD00DF11CFB0AC399E4CE9" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_19B231E13063D95097D3B0AC399E5368" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_3D6CF745BCCD00DF11CFB0AC399E4CE9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentNet" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_DDF5257C69F5261A4023B0AC399EB570" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_19B231E13063D95097D3B0AC399E5368" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_DDF5257C69F5261A4023B0AC399EB570" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentLineItems" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentLineItems_6FB2EBDA251F02CF9F29BDFCCA3F00D1" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfPropertyPlantAndEquipmentTable" xlink:label="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_BF2C0D7D2A99FCBF0334BDFCCA3EF887" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_6FB2EBDA251F02CF9F29BDFCCA3F00D1" xlink:to="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_BF2C0D7D2A99FCBF0334BDFCCA3EF887" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_FA7EF8FA6CB113795282BDFCCA3E2E63" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfPropertyPlantAndEquipmentTable_BF2C0D7D2A99FCBF0334BDFCCA3EF887" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_FA7EF8FA6CB113795282BDFCCA3E2E63" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_A6256C5F0DE8837B89E0BDFCCA3ED372_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_FA7EF8FA6CB113795282BDFCCA3E2E63" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_A6256C5F0DE8837B89E0BDFCCA3ED372_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_A6256C5F0DE8837B89E0BDFCCA3ED372" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_FA7EF8FA6CB113795282BDFCCA3E2E63" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_A6256C5F0DE8837B89E0BDFCCA3ED372" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SoftwareAndSoftwareDevelopmentCostsMember" xlink:label="loc_us-gaap_SoftwareAndSoftwareDevelopmentCostsMember_34AA42A24E18EBF79CFBBDFCCA3F0BD1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_A6256C5F0DE8837B89E0BDFCCA3ED372" xlink:to="loc_us-gaap_SoftwareAndSoftwareDevelopmentCostsMember_34AA42A24E18EBF79CFBBDFCCA3F0BD1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DepreciationDepletionAndAmortization" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_7DDF591A0741F71276D8BDFCCA3FE297" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentLineItems_6FB2EBDA251F02CF9F29BDFCCA3F00D1" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_7DDF591A0741F71276D8BDFCCA3FE297" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/SoftwareAndEquipmentTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/SummaryOfAccountingPolicies" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_AA5A8F1C61543599B918C27AF1B9F9C4" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_DCF44F437BCF7E9F6592C27AF1B826FB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_AA5A8F1C61543599B918C27AF1B9F9C4" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_DCF44F437BCF7E9F6592C27AF1B826FB" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ConcentrationRiskByTypeAxis" xlink:label="loc_us-gaap_ConcentrationRiskByTypeAxis_3D324ECD6E1FF552A885C27AF1B87383" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_DCF44F437BCF7E9F6592C27AF1B826FB" xlink:to="loc_us-gaap_ConcentrationRiskByTypeAxis_3D324ECD6E1FF552A885C27AF1B87383" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_B4ADBFAE1E35CDCD8F92C27AF1B805E8_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_3D324ECD6E1FF552A885C27AF1B87383" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_B4ADBFAE1E35CDCD8F92C27AF1B805E8_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ConcentrationRiskTypeDomain" xlink:label="loc_us-gaap_ConcentrationRiskTypeDomain_B4ADBFAE1E35CDCD8F92C27AF1B805E8" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByTypeAxis_3D324ECD6E1FF552A885C27AF1B87383" xlink:to="loc_us-gaap_ConcentrationRiskTypeDomain_B4ADBFAE1E35CDCD8F92C27AF1B805E8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_GeographicConcentrationRiskMember" xlink:label="loc_us-gaap_GeographicConcentrationRiskMember_1188C5FE258D1DCB7AACC27AF1B8E89D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskTypeDomain_B4ADBFAE1E35CDCD8F92C27AF1B805E8" xlink:to="loc_us-gaap_GeographicConcentrationRiskMember_1188C5FE258D1DCB7AACC27AF1B8E89D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ConcentrationRiskByBenchmarkAxis" xlink:label="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_84B9632410F3E9404024C27AF1B8B965" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_DCF44F437BCF7E9F6592C27AF1B826FB" xlink:to="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_84B9632410F3E9404024C27AF1B8B965" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_2ECAC782CA282EEE9AE6C27AF1B98A94_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_84B9632410F3E9404024C27AF1B8B965" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_2ECAC782CA282EEE9AE6C27AF1B98A94_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ConcentrationRiskBenchmarkDomain" xlink:label="loc_us-gaap_ConcentrationRiskBenchmarkDomain_2ECAC782CA282EEE9AE6C27AF1B98A94" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ConcentrationRiskByBenchmarkAxis_84B9632410F3E9404024C27AF1B8B965" xlink:to="loc_us-gaap_ConcentrationRiskBenchmarkDomain_2ECAC782CA282EEE9AE6C27AF1B98A94" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SalesRevenueNetMember" xlink:label="loc_us-gaap_SalesRevenueNetMember_82F506A324A50CB7836DC27AF1B90CAC" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ConcentrationRiskBenchmarkDomain_2ECAC782CA282EEE9AE6C27AF1B98A94" xlink:to="loc_us-gaap_SalesRevenueNetMember_82F506A324A50CB7836DC27AF1B90CAC" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeAxis" xlink:label="loc_us-gaap_RangeAxis_03424EE4FCE151D3FD6FC27AF1B93321" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_DCF44F437BCF7E9F6592C27AF1B826FB" xlink:to="loc_us-gaap_RangeAxis_03424EE4FCE151D3FD6FC27AF1B93321" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_C0CE70FE97992B28B12DC27AF1B9C587_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RangeAxis_03424EE4FCE151D3FD6FC27AF1B93321" xlink:to="loc_us-gaap_RangeMember_C0CE70FE97992B28B12DC27AF1B9C587_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_RangeMember" xlink:label="loc_us-gaap_RangeMember_C0CE70FE97992B28B12DC27AF1B9C587" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RangeAxis_03424EE4FCE151D3FD6FC27AF1B93321" xlink:to="loc_us-gaap_RangeMember_C0CE70FE97992B28B12DC27AF1B9C587" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MinimumMember" xlink:label="loc_us-gaap_MinimumMember_A0EB78442CC812CD8D70C27AF1B9D9D5" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_C0CE70FE97992B28B12DC27AF1B9C587" xlink:to="loc_us-gaap_MinimumMember_A0EB78442CC812CD8D70C27AF1B9D9D5" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_MaximumMember" xlink:label="loc_us-gaap_MaximumMember_2736E7B726F73D74BC27C27AF1B9BAC8" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RangeMember_C0CE70FE97992B28B12DC27AF1B9C587" xlink:to="loc_us-gaap_MaximumMember_2736E7B726F73D74BC27C27AF1B9BAC8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentByTypeAxis" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_ED05BF64547CC853975BC27AF1B9027E" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_DCF44F437BCF7E9F6592C27AF1B826FB" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_ED05BF64547CC853975BC27AF1B9027E" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C567FD1489D60DE0491FC27AF1B90CC6_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_ED05BF64547CC853975BC27AF1B9027E" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C567FD1489D60DE0491FC27AF1B90CC6_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentTypeDomain" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C567FD1489D60DE0491FC27AF1B90CC6" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentByTypeAxis_ED05BF64547CC853975BC27AF1B9027E" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C567FD1489D60DE0491FC27AF1B90CC6" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_SoftwareAndSoftwareDevelopmentCostsMember" xlink:label="loc_us-gaap_SoftwareAndSoftwareDevelopmentCostsMember_67C3FA96D09FF4ADAA19C27AF1B9C522" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C567FD1489D60DE0491FC27AF1B90CC6" xlink:to="loc_us-gaap_SoftwareAndSoftwareDevelopmentCostsMember_67C3FA96D09FF4ADAA19C27AF1B9C522" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquipmentMember" xlink:label="loc_us-gaap_EquipmentMember_584C301DB771BE09C072C27AF1B9856F" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PropertyPlantAndEquipmentTypeDomain_C567FD1489D60DE0491FC27AF1B90CC6" xlink:to="loc_us-gaap_EquipmentMember_584C301DB771BE09C072C27AF1B9856F" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_NumberofInsured" xlink:label="loc_nmih_NumberofInsured_F2E3787E25330C5F191AC27AF1B9CAB3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_AA5A8F1C61543599B918C27AF1B9F9C4" xlink:to="loc_nmih_NumberofInsured_F2E3787E25330C5F191AC27AF1B9CAB3" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ConcentrationRiskPercentage1" xlink:label="loc_us-gaap_ConcentrationRiskPercentage1_DC239B75A7EE34D4295CC27AF1B9FC34" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_AA5A8F1C61543599B918C27AF1B9F9C4" xlink:to="loc_us-gaap_ConcentrationRiskPercentage1_DC239B75A7EE34D4295CC27AF1B9FC34" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DeferredPolicyAcquisitionCostAmortizationExpense" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCostAmortizationExpense_8783F8761071E1E1D0A9C2F0BB0C2D83" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_AA5A8F1C61543599B918C27AF1B9F9C4" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCostAmortizationExpense_8783F8761071E1E1D0A9C2F0BB0C2D83" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_90B8A286EBC13E1F0D1DC27AF1B9223D" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_AA5A8F1C61543599B918C27AF1B9F9C4" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_90B8A286EBC13E1F0D1DC27AF1B9223D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_PropertyPlantAndEquipmentUsefulLife" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_3A6F4BAC24996C6F5F26C27AF1B95F88" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_AA5A8F1C61543599B918C27AF1B9F9C4" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_3A6F4BAC24996C6F5F26C27AF1B95F88" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/SummaryOfAccountingPoliciesPolicies" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/TermLoan" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/TermLoanNarrativeDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentLineItems" xlink:label="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentTable" xlink:label="loc_us-gaap_DebtInstrumentTable_4C43C4A9878A6DB4CF5FE5CAD9498EDB" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_us-gaap_DebtInstrumentTable_4C43C4A9878A6DB4CF5FE5CAD9498EDB" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongtermDebtTypeAxis" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_059490FB4DBAAB778D08E5CAD9494EBD" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_4C43C4A9878A6DB4CF5FE5CAD9498EDB" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_059490FB4DBAAB778D08E5CAD9494EBD" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_35A3244411F4B3E78941E5CAD9499080_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_059490FB4DBAAB778D08E5CAD9494EBD" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_35A3244411F4B3E78941E5CAD9499080_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LongtermDebtTypeDomain" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_35A3244411F4B3E78941E5CAD9499080" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_059490FB4DBAAB778D08E5CAD9494EBD" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_35A3244411F4B3E78941E5CAD9499080" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_SeniorSecuredDebtMember" xlink:label="loc_nmih_SeniorSecuredDebtMember_8FC9598F06FDFC66BEBBE5CAD94929D1" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_35A3244411F4B3E78941E5CAD9499080" xlink:to="loc_nmih_SeniorSecuredDebtMember_8FC9598F06FDFC66BEBBE5CAD94929D1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentAxis" xlink:label="loc_us-gaap_DebtInstrumentAxis_ADDFDD13419220FE13BDE5CAD9496699" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_4C43C4A9878A6DB4CF5FE5CAD9498EDB" xlink:to="loc_us-gaap_DebtInstrumentAxis_ADDFDD13419220FE13BDE5CAD9496699" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_836B14E0BD28D603DA27E5CAD94964A3_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_ADDFDD13419220FE13BDE5CAD9496699" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_836B14E0BD28D603DA27E5CAD94964A3_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentNameDomain" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_836B14E0BD28D603DA27E5CAD94964A3" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_ADDFDD13419220FE13BDE5CAD9496699" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_836B14E0BD28D603DA27E5CAD94964A3" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_CreditAgreementMember" xlink:label="loc_nmih_CreditAgreementMember_20B44896D66C106E96FAE5CAD949AD2D" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_836B14E0BD28D603DA27E5CAD94964A3" xlink:to="loc_nmih_CreditAgreementMember_20B44896D66C106E96FAE5CAD949AD2D" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_VariableRateAxis" xlink:label="loc_us-gaap_VariableRateAxis_BE1527824EAB8F0C1D57E5CAD9493914" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_4C43C4A9878A6DB4CF5FE5CAD9498EDB" xlink:to="loc_us-gaap_VariableRateAxis_BE1527824EAB8F0C1D57E5CAD9493914" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_VariableRateDomain" xlink:label="loc_us-gaap_VariableRateDomain_A73E6FEC07F8F0B8BBF2E5CAD9493561_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VariableRateAxis_BE1527824EAB8F0C1D57E5CAD9493914" xlink:to="loc_us-gaap_VariableRateDomain_A73E6FEC07F8F0B8BBF2E5CAD9493561_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_VariableRateDomain" xlink:label="loc_us-gaap_VariableRateDomain_A73E6FEC07F8F0B8BBF2E5CAD9493561" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VariableRateAxis_BE1527824EAB8F0C1D57E5CAD9493914" xlink:to="loc_us-gaap_VariableRateDomain_A73E6FEC07F8F0B8BBF2E5CAD9493561" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_InitialEurodollarAnnualMarginMember" xlink:label="loc_nmih_InitialEurodollarAnnualMarginMember_BE7C02A90889934C3476E5CAD9495F67" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_A73E6FEC07F8F0B8BBF2E5CAD9493561" xlink:to="loc_nmih_InitialEurodollarAnnualMarginMember_BE7C02A90889934C3476E5CAD9495F67" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EurodollarMember" xlink:label="loc_us-gaap_EurodollarMember_3672926A2FB378FC190EE5CAD9495EF8" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_A73E6FEC07F8F0B8BBF2E5CAD9493561" xlink:to="loc_us-gaap_EurodollarMember_3672926A2FB378FC190EE5CAD9495EF8" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentTerm" xlink:label="loc_us-gaap_DebtInstrumentTerm_0FDA6239EA487F4EC034E5CAD949AF6A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_us-gaap_DebtInstrumentTerm_0FDA6239EA487F4EC034E5CAD949AF6A" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentFaceAmount" xlink:label="loc_us-gaap_DebtInstrumentFaceAmount_1BC2DAA44598CAE9FA67E5CAD949BDBD" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_us-gaap_DebtInstrumentFaceAmount_1BC2DAA44598CAE9FA67E5CAD949BDBD" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_DebtInstrumentVariableInterestRateFloor" xlink:label="loc_nmih_DebtInstrumentVariableInterestRateFloor_82661C3497D80329B74CE5CAD949FC2B" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_nmih_DebtInstrumentVariableInterestRateFloor_82661C3497D80329B74CE5CAD949FC2B" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentBasisSpreadOnVariableRate1" xlink:label="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_E76FB80860DA6DE52533E5CAD949EFA2" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_E76FB80860DA6DE52533E5CAD949EFA2" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentPeriodicPaymentPrincipal" xlink:label="loc_us-gaap_DebtInstrumentPeriodicPaymentPrincipal_A1B1AE760AC5E058379DE5CAD9495A42" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_us-gaap_DebtInstrumentPeriodicPaymentPrincipal_A1B1AE760AC5E058379DE5CAD9495A42" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtInstrumentCarryingAmount" xlink:label="loc_us-gaap_DebtInstrumentCarryingAmount_A3D4BB7DB46A57E950CDE60E14394FCA" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_us-gaap_DebtInstrumentCarryingAmount_A3D4BB7DB46A57E950CDE60E14394FCA" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_DebtIssuanceCosts" xlink:label="loc_us-gaap_DebtIssuanceCosts_084AEA84728A3FC792D2E5CAD94935F5" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_us-gaap_DebtIssuanceCosts_084AEA84728A3FC792D2E5CAD94935F5" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_DebtDiscountPremiumPercentage" xlink:label="loc_nmih_DebtDiscountPremiumPercentage_E0554B310850FCE1C0C9E5CAD94994DF" xlink:type="locator" />
    <definitionArc order="8" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_nmih_DebtDiscountPremiumPercentage_E0554B310850FCE1C0C9E5CAD94994DF" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_InterestExpense" xlink:label="loc_us-gaap_InterestExpense_778609A2576B97104D5CE5CAD94ADD40" xlink:type="locator" />
    <definitionArc order="9" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_us-gaap_InterestExpense_778609A2576B97104D5CE5CAD94ADD40" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_DebtInstrumentCovenantDebttoTotalCapitalizationRatioMaximum" xlink:label="loc_nmih_DebtInstrumentCovenantDebttoTotalCapitalizationRatioMaximum_B06FA5E73BA1BEA6AA8BE5CAD94AE352" xlink:type="locator" />
    <definitionArc order="10" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_nmih_DebtInstrumentCovenantDebttoTotalCapitalizationRatioMaximum_B06FA5E73BA1BEA6AA8BE5CAD94AE352" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_DebtInstrumentCovenantRisktoCapitalRatioMaximum" xlink:label="loc_nmih_DebtInstrumentCovenantRisktoCapitalRatioMaximum_6826A615987A5A86C899E5CAD94A6E7B" xlink:type="locator" />
    <definitionArc order="11" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_nmih_DebtInstrumentCovenantRisktoCapitalRatioMaximum_6826A615987A5A86C899E5CAD94A6E7B" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_DebtInstrumentCovenantLiquidityRequirementMinimum" xlink:label="loc_nmih_DebtInstrumentCovenantLiquidityRequirementMinimum_DD9E50920345242C42EDE5CAD94A4FE7" xlink:type="locator" />
    <definitionArc order="12" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_E2B8564E328A7F141978E5CAD9498094" xlink:to="loc_nmih_DebtInstrumentCovenantLiquidityRequirementMinimum_DD9E50920345242C42EDE5CAD94A4FE7" xlink:type="arc" />
  </definitionLink>
  <definitionLink xlink:role="http://www.nationalmi.com/role/TermLoanScheduleOfFuturePrincipalPaymentsDetails" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/TermLoanTables" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/Warrants" xlink:type="extended" />
  <definitionLink xlink:role="http://www.nationalmi.com/role/WarrantsDetails" xlink:type="extended">
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LineOfCreditFacilityLineItems" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_62E6DE25CF0AADBD3D7DE67FA6653547" xlink:type="locator" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_LineOfCreditFacilityTable" xlink:label="loc_us-gaap_LineOfCreditFacilityTable_50C9FD99CB7C3ACFCEB3E67FA665813C" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_62E6DE25CF0AADBD3D7DE67FA6653547" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_50C9FD99CB7C3ACFCEB3E67FA665813C" xlink:type="arc" xbrldt:closed="true" xbrldt:contextElement="segment" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementEquityComponentsAxis" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_93DC50C8E39ACABBC805E67FA66595A7" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_50C9FD99CB7C3ACFCEB3E67FA665813C" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_93DC50C8E39ACABBC805E67FA66595A7" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_F9BC5C1C133A76134521E67FA665ECB4_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_93DC50C8E39ACABBC805E67FA66595A7" xlink:to="loc_us-gaap_EquityComponentDomain_F9BC5C1C133A76134521E67FA665ECB4_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_EquityComponentDomain" xlink:label="loc_us-gaap_EquityComponentDomain_F9BC5C1C133A76134521E67FA665ECB4" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_93DC50C8E39ACABBC805E67FA66595A7" xlink:to="loc_us-gaap_EquityComponentDomain_F9BC5C1C133A76134521E67FA665ECB4" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonStockMember" xlink:label="loc_us-gaap_CommonStockMember_12D1840016957D30CCB4E67FA6650D92" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_F9BC5C1C133A76134521E67FA665ECB4" xlink:to="loc_us-gaap_CommonStockMember_12D1840016957D30CCB4E67FA6650D92" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StatementClassOfStockAxis" xlink:label="loc_us-gaap_StatementClassOfStockAxis_0B203A3631903D9386B6E67FA66598E9" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_50C9FD99CB7C3ACFCEB3E67FA665813C" xlink:to="loc_us-gaap_StatementClassOfStockAxis_0B203A3631903D9386B6E67FA66598E9" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_518BE754D00BFFC78F4DE67FA665E065_default" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_0B203A3631903D9386B6E67FA66598E9" xlink:to="loc_us-gaap_ClassOfStockDomain_518BE754D00BFFC78F4DE67FA665E065_default" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfStockDomain" xlink:label="loc_us-gaap_ClassOfStockDomain_518BE754D00BFFC78F4DE67FA665E065" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_0B203A3631903D9386B6E67FA66598E9" xlink:to="loc_us-gaap_ClassOfStockDomain_518BE754D00BFFC78F4DE67FA665E065" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_CommonClassAMember" xlink:label="loc_us-gaap_CommonClassAMember_6CB45ED1CDA3FB168D69E67FA66534A0" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_518BE754D00BFFC78F4DE67FA665E065" xlink:to="loc_us-gaap_CommonClassAMember_6CB45ED1CDA3FB168D69E67FA66534A0" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights" xlink:label="loc_us-gaap_ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights_947A8D2C43873F05E264E67FA665AC0A" xlink:type="locator" />
    <definitionArc order="1" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_62E6DE25CF0AADBD3D7DE67FA6653547" xlink:to="loc_us-gaap_ClassOfWarrantOrRightNumberOfSecuritiesCalledByWarrantsOrRights_947A8D2C43873F05E264E67FA665AC0A" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_NumberOfSharesRightToPurchasePerWarrant" xlink:label="loc_nmih_NumberOfSharesRightToPurchasePerWarrant_09A1BE1AF75D3AE65E8EE67FA6660053" xlink:type="locator" />
    <definitionArc order="2" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_62E6DE25CF0AADBD3D7DE67FA6653547" xlink:to="loc_nmih_NumberOfSharesRightToPurchasePerWarrant_09A1BE1AF75D3AE65E8EE67FA6660053" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1" xlink:label="loc_us-gaap_ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1_C730138C6F157C3961F1E67FA6667E34" xlink:type="locator" />
    <definitionArc order="3" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_62E6DE25CF0AADBD3D7DE67FA6653547" xlink:to="loc_us-gaap_ClassOfWarrantOrRightExercisePriceOfWarrantsOrRights1_C730138C6F157C3961F1E67FA6667E34" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_WarrantsAndRightsOutstanding" xlink:label="loc_us-gaap_WarrantsAndRightsOutstanding_C523504BF51D587B5912E67FA6661E94" xlink:type="locator" />
    <definitionArc order="4" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_62E6DE25CF0AADBD3D7DE67FA6653547" xlink:to="loc_us-gaap_WarrantsAndRightsOutstanding_C523504BF51D587B5912E67FA6661E94" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_ClassofWarrantorRightNumberofWarrantsExercisedDuringPeriod" xlink:label="loc_nmih_ClassofWarrantorRightNumberofWarrantsExercisedDuringPeriod_98E27B2F19A765C96F7EE67FA66631D1" xlink:type="locator" />
    <definitionArc order="5" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_62E6DE25CF0AADBD3D7DE67FA6653547" xlink:to="loc_nmih_ClassofWarrantorRightNumberofWarrantsExercisedDuringPeriod_98E27B2F19A765C96F7EE67FA66631D1" xlink:type="arc" />
    <loc xlink:href="http://xbrl.fasb.org/us-gaap/2014/elts/us-gaap-2014-01-31.xsd#us-gaap_StockIssuedDuringPeriodSharesOther" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesOther_45D7673C4BE0A27B61FFE67FA666CD9D" xlink:type="locator" />
    <definitionArc order="6" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_62E6DE25CF0AADBD3D7DE67FA6653547" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesOther_45D7673C4BE0A27B61FFE67FA666CD9D" xlink:type="arc" />
    <loc xlink:href="nmih-20151231.xsd#nmih_GainLossFromSettlementofWarrants" xlink:label="loc_nmih_GainLossFromSettlementofWarrants_AB45BA5C5FF811AF724FE67FA6665822" xlink:type="locator" />
    <definitionArc order="7" xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_62E6DE25CF0AADBD3D7DE67FA6653547" xlink:to="loc_nmih_GainLossFromSettlementofWarrants_AB45BA5C5FF811AF724FE67FA6665822" xlink:type="arc" />
  </definitionLink>
</linkbase>
