<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2024 Workiva-->
<!--r:edc14ca0-2ff0-4110-a4d3-5555955d07b1,g:abb121f0-1665-49e9-98bb-62aa4b83b6d1-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member"/>
  <link:roleRef roleURI="http://www.mgic.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="mtg-20231231.xsd#CONSOLIDATEDBALANCESHEETS"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_66135608-86e7-4c59-a0b3-870dcf5bbc74" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_31dc598d-47fe-4134-b901-f711b737eaa3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_66135608-86e7-4c59-a0b3-870dcf5bbc74" xlink:to="loc_us-gaap_StatementTable_31dc598d-47fe-4134-b901-f711b737eaa3" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_d5ae1622-94c5-4b59-8019-794cf4d17fb8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_31dc598d-47fe-4134-b901-f711b737eaa3" xlink:to="loc_us-gaap_FinancialInstrumentAxis_d5ae1622-94c5-4b59-8019-794cf4d17fb8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d5ae1622-94c5-4b59-8019-794cf4d17fb8_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_d5ae1622-94c5-4b59-8019-794cf4d17fb8" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_d5ae1622-94c5-4b59-8019-794cf4d17fb8_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_9f00a263-7ceb-4d98-8867-d4c04a8f1f97" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_d5ae1622-94c5-4b59-8019-794cf4d17fb8" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_9f00a263-7ceb-4d98-8867-d4c04a8f1f97" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FixedMaturitiesMember_067c2020-5381-4f2b-b62a-ecaa35a7fc44" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FixedMaturitiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_9f00a263-7ceb-4d98-8867-d4c04a8f1f97" xlink:to="loc_us-gaap_FixedMaturitiesMember_067c2020-5381-4f2b-b62a-ecaa35a7fc44" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermInvestmentsMember_c9fd3807-2348-406f-996d-7c18c17ceeb3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShortTermInvestmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_9f00a263-7ceb-4d98-8867-d4c04a8f1f97" xlink:to="loc_us-gaap_ShortTermInvestmentsMember_c9fd3807-2348-406f-996d-7c18c17ceeb3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_66135608-86e7-4c59-a0b3-870dcf5bbc74" xlink:to="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentsAbstract_26c8b488-3ade-4e2a-9132-3e6875054ab9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_InvestmentsAbstract_26c8b488-3ade-4e2a-9132-3e6875054ab9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_678d884e-ad00-454b-a0ca-0126c85ff22d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentsAbstract_26c8b488-3ade-4e2a-9132-3e6875054ab9" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_678d884e-ad00-454b-a0ca-0126c85ff22d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNi_35cde89e-69b5-40c7-9be0-21464b103f94" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNi"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentsAbstract_26c8b488-3ade-4e2a-9132-3e6875054ab9" xlink:to="loc_us-gaap_EquitySecuritiesFvNi_35cde89e-69b5-40c7-9be0-21464b103f94" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherInvestments_13ff2255-723f-45ac-9663-a9d3d8dd4b01" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherInvestments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentsAbstract_26c8b488-3ade-4e2a-9132-3e6875054ab9" xlink:to="loc_us-gaap_OtherInvestments_13ff2255-723f-45ac-9663-a9d3d8dd4b01" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Investments_04466f17-d5ff-4875-8fe3-fa7e4d9c3769" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Investments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentsAbstract_26c8b488-3ade-4e2a-9132-3e6875054ab9" xlink:to="loc_us-gaap_Investments_04466f17-d5ff-4875-8fe3-fa7e4d9c3769" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_f206f588-b7f8-4385-87a7-3e79c776f976" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_f206f588-b7f8-4385-87a7-3e79c776f976" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedCashAndCashEquivalents_c3b48839-4539-4dac-8d42-5f1929f6c9a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedCashAndCashEquivalents"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_RestrictedCashAndCashEquivalents_c3b48839-4539-4dac-8d42-5f1929f6c9a2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_dad27677-2655-4d0e-80e2-881cb70a6f3f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedInvestmentIncomeReceivable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_dad27677-2655-4d0e-80e2-881cb70a6f3f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverableForUnpaidClaimsAndClaimsAdjustments_8162bdf3-f037-49c1-a4eb-4a69c84c17b7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceRecoverableForUnpaidClaimsAndClaimsAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_ReinsuranceRecoverableForUnpaidClaimsAndClaimsAdjustments_8162bdf3-f037-49c1-a4eb-4a69c84c17b7" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverablesOnPaidLosses_829e50a9-faa4-4b7c-bc9c-48a7ff323b7f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceRecoverablesOnPaidLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_ReinsuranceRecoverablesOnPaidLosses_829e50a9-faa4-4b7c-bc9c-48a7ff323b7f" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsReceivableAtCarryingValue_6d130d3a-d42c-4bc3-af60-9640d92797c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PremiumsReceivableAtCarryingValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_PremiumsReceivableAtCarryingValue_6d130d3a-d42c-4bc3-af60-9640d92797c2" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_8123e253-2683-4e11-851f-d24ccf5c3d5c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_8123e253-2683-4e11-851f-d24ccf5c3d5c" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredPolicyAcquisitionCosts_80d1a4e9-1590-4050-88c1-9d1ec1f2e013" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredPolicyAcquisitionCosts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_DeferredPolicyAcquisitionCosts_80d1a4e9-1590-4050-88c1-9d1ec1f2e013" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_106c731b-cc4f-4495-b42a-f04d246e43fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_106c731b-cc4f-4495-b42a-f04d246e43fd" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssets_4f108c8e-d207-4466-8294-f110211c52d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_OtherAssets_4f108c8e-d207-4466-8294-f110211c52d3" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_1f84fc4b-a8df-4d44-94a4-5b57ecad6408" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_3f1c1235-e181-4ad4-a817-e4992087ed6c" xlink:to="loc_us-gaap_Assets_1f84fc4b-a8df-4d44-94a4-5b57ecad6408" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_b696027b-6d60-4807-8d30-56ff454b9673" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_66135608-86e7-4c59-a0b3-870dcf5bbc74" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_b696027b-6d60-4807-8d30-56ff454b9673" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAbstract_864422c9-892c-4c0a-97fb-732ce127f0ba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_b696027b-6d60-4807-8d30-56ff454b9673" xlink:to="loc_us-gaap_LiabilitiesAbstract_864422c9-892c-4c0a-97fb-732ce127f0ba" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpensePropertyCasualtyLiability_6e5c27c6-f0c0-4c13-a81d-07c8d5e821bf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpensePropertyCasualtyLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_864422c9-892c-4c0a-97fb-732ce127f0ba" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpensePropertyCasualtyLiability_6e5c27c6-f0c0-4c13-a81d-07c8d5e821bf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UnearnedPremiums_0f8b6807-b803-40a1-abb8-bfe1eff87608" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UnearnedPremiums"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_864422c9-892c-4c0a-97fb-732ce127f0ba" xlink:to="loc_us-gaap_UnearnedPremiums_0f8b6807-b803-40a1-abb8-bfe1eff87608" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeniorNotes_f145e5e9-4707-4e36-b9c3-e53bd54d4057" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeniorNotes"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_864422c9-892c-4c0a-97fb-732ce127f0ba" xlink:to="loc_us-gaap_SeniorNotes_f145e5e9-4707-4e36-b9c3-e53bd54d4057" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConvertibleSubordinatedDebt_fd81ba0c-1aab-41dd-bf46-4d2ce434e6a1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConvertibleSubordinatedDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_864422c9-892c-4c0a-97fb-732ce127f0ba" xlink:to="loc_us-gaap_ConvertibleSubordinatedDebt_fd81ba0c-1aab-41dd-bf46-4d2ce434e6a1" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_eea3dad1-e6d1-41c9-acc1-c750df0e07f6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_864422c9-892c-4c0a-97fb-732ce127f0ba" xlink:to="loc_us-gaap_OtherLiabilities_eea3dad1-e6d1-41c9-acc1-c750df0e07f6" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_ac2fb588-bc9e-4885-bc22-c75a26307ee5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_864422c9-892c-4c0a-97fb-732ce127f0ba" xlink:to="loc_us-gaap_Liabilities_ac2fb588-bc9e-4885-bc22-c75a26307ee5" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommitmentsAndContingencies_ca66306f-b226-4049-8b34-ab8b3a8f3b83" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommitmentsAndContingencies"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_b696027b-6d60-4807-8d30-56ff454b9673" xlink:to="loc_us-gaap_CommitmentsAndContingencies_ca66306f-b226-4049-8b34-ab8b3a8f3b83" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityAbstract_2beb0cce-1cfe-49b2-880c-6e68aa55fa2b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_b696027b-6d60-4807-8d30-56ff454b9673" xlink:to="loc_us-gaap_StockholdersEquityAbstract_2beb0cce-1cfe-49b2-880c-6e68aa55fa2b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_2491b5cb-dfaa-49b6-b03b-26a43be1667e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_2beb0cce-1cfe-49b2-880c-6e68aa55fa2b" xlink:to="loc_us-gaap_CommonStockValue_2491b5cb-dfaa-49b6-b03b-26a43be1667e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalCommonStock_3f136fd5-f116-4191-9610-5f8606889706" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_2beb0cce-1cfe-49b2-880c-6e68aa55fa2b" xlink:to="loc_us-gaap_AdditionalPaidInCapitalCommonStock_3f136fd5-f116-4191-9610-5f8606889706" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_e5c5a12c-215e-4662-9843-8b5cbb5dc017" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_2beb0cce-1cfe-49b2-880c-6e68aa55fa2b" xlink:to="loc_us-gaap_TreasuryStockValue_e5c5a12c-215e-4662-9843-8b5cbb5dc017" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_4fcf56c9-e1c4-4ef3-8365-88edc7dd76f8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_2beb0cce-1cfe-49b2-880c-6e68aa55fa2b" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_4fcf56c9-e1c4-4ef3-8365-88edc7dd76f8" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_cba917b7-9288-432c-baa0-f1cfea841641" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_2beb0cce-1cfe-49b2-880c-6e68aa55fa2b" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_cba917b7-9288-432c-baa0-f1cfea841641" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_3247ce4c-fcfb-444c-baea-f0dad126915d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_2beb0cce-1cfe-49b2-880c-6e68aa55fa2b" xlink:to="loc_us-gaap_StockholdersEquity_3247ce4c-fcfb-444c-baea-f0dad126915d" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_30c06c3a-77cd-460b-a2c2-7dbfd7593dc8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_b696027b-6d60-4807-8d30-56ff454b9673" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_30c06c3a-77cd-460b-a2c2-7dbfd7593dc8" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/CONSOLIDATEDBALANCESHEETSParenthetical" xlink:type="simple" xlink:href="mtg-20231231.xsd#CONSOLIDATEDBALANCESHEETSParenthetical"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/CONSOLIDATEDBALANCESHEETSParenthetical" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_1de4d26a-2119-40c0-873f-91e7011071b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_52770302-4c43-4aa3-b451-fa038278d103" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_1de4d26a-2119-40c0-873f-91e7011071b9" xlink:to="loc_us-gaap_StatementTable_52770302-4c43-4aa3-b451-fa038278d103" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_9a739693-f402-4bbb-a69a-455bebc98574" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_52770302-4c43-4aa3-b451-fa038278d103" xlink:to="loc_us-gaap_FinancialInstrumentAxis_9a739693-f402-4bbb-a69a-455bebc98574" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_9a739693-f402-4bbb-a69a-455bebc98574_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_9a739693-f402-4bbb-a69a-455bebc98574" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_9a739693-f402-4bbb-a69a-455bebc98574_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f09942a7-827b-4c6d-9628-ea92de8567ca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_9a739693-f402-4bbb-a69a-455bebc98574" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f09942a7-827b-4c6d-9628-ea92de8567ca" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FixedMaturitiesMember_0867dc9e-c997-4b54-af70-925947b2cacd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FixedMaturitiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f09942a7-827b-4c6d-9628-ea92de8567ca" xlink:to="loc_us-gaap_FixedMaturitiesMember_0867dc9e-c997-4b54-af70-925947b2cacd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermInvestmentsMember_8b0a27c1-9978-405d-8a73-7e0555b97522" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShortTermInvestmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f09942a7-827b-4c6d-9628-ea92de8567ca" xlink:to="loc_us-gaap_ShortTermInvestmentsMember_8b0a27c1-9978-405d-8a73-7e0555b97522" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesMember_3ee89fe5-b4e7-4225-a897-ad0f09e3d31d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_f09942a7-827b-4c6d-9628-ea92de8567ca" xlink:to="loc_us-gaap_EquitySecuritiesMember_3ee89fe5-b4e7-4225-a897-ad0f09e3d31d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_cf892c16-097a-4068-b272-298cab675ec8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1de4d26a-2119-40c0-873f-91e7011071b9" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_cf892c16-097a-4068-b272-298cab675ec8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNiCost_e98e560b-a3ed-4587-80ea-0fe51681a442" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNiCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1de4d26a-2119-40c0-873f-91e7011071b9" xlink:to="loc_us-gaap_EquitySecuritiesFvNiCost_e98e560b-a3ed-4587-80ea-0fe51681a442" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityAbstract_80568665-fc71-4fb9-bc39-812ee0d501ef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_1de4d26a-2119-40c0-873f-91e7011071b9" xlink:to="loc_us-gaap_StockholdersEquityAbstract_80568665-fc71-4fb9-bc39-812ee0d501ef" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_816b111a-8ce6-437c-810b-579bdfd884e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockParOrStatedValuePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_80568665-fc71-4fb9-bc39-812ee0d501ef" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_816b111a-8ce6-437c-810b-579bdfd884e2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesAuthorized_32ab44e8-1de8-4eb3-8949-a8d5956ccc29" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesAuthorized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_80568665-fc71-4fb9-bc39-812ee0d501ef" xlink:to="loc_us-gaap_CommonStockSharesAuthorized_32ab44e8-1de8-4eb3-8949-a8d5956ccc29" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesIssued_2e848329-a345-4ba7-8206-641686a8487e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_80568665-fc71-4fb9-bc39-812ee0d501ef" xlink:to="loc_us-gaap_CommonStockSharesIssued_2e848329-a345-4ba7-8206-641686a8487e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_14eec92c-e66a-44fc-8a18-d20e4136ef85" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_80568665-fc71-4fb9-bc39-812ee0d501ef" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_14eec92c-e66a-44fc-8a18-d20e4136ef85" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonShares_4b13af0b-61cd-476d-a9c1-f4d265027d99" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_80568665-fc71-4fb9-bc39-812ee0d501ef" xlink:to="loc_us-gaap_TreasuryStockCommonShares_4b13af0b-61cd-476d-a9c1-f4d265027d99" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/CONSOLIDATEDSTATEMENTSOFSHAREHOLDERSEQUITY" xlink:type="simple" xlink:href="mtg-20231231.xsd#CONSOLIDATEDSTATEMENTSOFSHAREHOLDERSEQUITY"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/CONSOLIDATEDSTATEMENTSOFSHAREHOLDERSEQUITY" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_e8bbea72-0728-4b51-a14a-b5b99092e601" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_aa36e3e7-d0f9-44ee-b2ee-c1055c4692de" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_e8bbea72-0728-4b51-a14a-b5b99092e601" xlink:to="loc_us-gaap_StatementTable_aa36e3e7-d0f9-44ee-b2ee-c1055c4692de" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_6a51a76a-3257-4c54-879c-8d1591fc38fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_aa36e3e7-d0f9-44ee-b2ee-c1055c4692de" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_6a51a76a-3257-4c54-879c-8d1591fc38fa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_6a51a76a-3257-4c54-879c-8d1591fc38fa_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_6a51a76a-3257-4c54-879c-8d1591fc38fa" xlink:to="loc_us-gaap_EquityComponentDomain_6a51a76a-3257-4c54-879c-8d1591fc38fa_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_ee20494d-9047-4dd9-98ac-4daed66ef147" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_6a51a76a-3257-4c54-879c-8d1591fc38fa" xlink:to="loc_us-gaap_EquityComponentDomain_ee20494d-9047-4dd9-98ac-4daed66ef147" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_e968a9c1-cae3-4807-bca3-14b804335245" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_ee20494d-9047-4dd9-98ac-4daed66ef147" xlink:to="loc_us-gaap_CommonStockMember_e968a9c1-cae3-4807-bca3-14b804335245" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_324abed2-f115-419b-8970-99a0f4d8b732" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_ee20494d-9047-4dd9-98ac-4daed66ef147" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_324abed2-f115-419b-8970-99a0f4d8b732" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonMember_fda43520-8c4f-4de7-8ea7-9b922b26d6c6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_ee20494d-9047-4dd9-98ac-4daed66ef147" xlink:to="loc_us-gaap_TreasuryStockCommonMember_fda43520-8c4f-4de7-8ea7-9b922b26d6c6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_6512eb48-9526-41d2-a66b-cc02d669f031" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_ee20494d-9047-4dd9-98ac-4daed66ef147" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_6512eb48-9526-41d2-a66b-cc02d669f031" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsMember_02bd6938-4307-4f69-9a6e-b94c0805001c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_ee20494d-9047-4dd9-98ac-4daed66ef147" xlink:to="loc_us-gaap_RetainedEarningsMember_02bd6938-4307-4f69-9a6e-b94c0805001c" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CumulativeEffectPeriodOfAdoptionAxis_1533daf1-89ac-4583-b59d-03b9e350a0fd" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CumulativeEffectPeriodOfAdoptionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_aa36e3e7-d0f9-44ee-b2ee-c1055c4692de" xlink:to="loc_srt_CumulativeEffectPeriodOfAdoptionAxis_1533daf1-89ac-4583-b59d-03b9e350a0fd" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_1533daf1-89ac-4583-b59d-03b9e350a0fd_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CumulativeEffectPeriodOfAdoptionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_CumulativeEffectPeriodOfAdoptionAxis_1533daf1-89ac-4583-b59d-03b9e350a0fd" xlink:to="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_1533daf1-89ac-4583-b59d-03b9e350a0fd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_e003e32e-8c20-4183-836b-dba6b54959b8" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CumulativeEffectPeriodOfAdoptionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_CumulativeEffectPeriodOfAdoptionAxis_1533daf1-89ac-4583-b59d-03b9e350a0fd" xlink:to="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_e003e32e-8c20-4183-836b-dba6b54959b8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember_18b87c51-439a-4f39-a02b-f27fd169bb41" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_e003e32e-8c20-4183-836b-dba6b54959b8" xlink:to="loc_srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember_18b87c51-439a-4f39-a02b-f27fd169bb41" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CumulativeEffectPeriodOfAdoptionAdjustedBalanceMember_871d940c-c29f-481b-8ec1-e0e284eeb6df" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CumulativeEffectPeriodOfAdoptionAdjustedBalanceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_e003e32e-8c20-4183-836b-dba6b54959b8" xlink:to="loc_srt_CumulativeEffectPeriodOfAdoptionAdjustedBalanceMember_871d940c-c29f-481b-8ec1-e0e284eeb6df" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_700e4f90-3193-4393-808d-cf7500b99d42" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_e8bbea72-0728-4b51-a14a-b5b99092e601" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_700e4f90-3193-4393-808d-cf7500b99d42" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_72e06693-c0e4-435e-af0d-67e7fa5e872d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_700e4f90-3193-4393-808d-cf7500b99d42" xlink:to="loc_us-gaap_StockholdersEquity_72e06693-c0e4-435e-af0d-67e7fa5e872d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AdjustmentsToAdditionalPaidInCapitalConversionOfConvertibleDebt_091b6a2e-fa87-4780-a1d4-0ec5029fdb7a" xlink:href="mtg-20231231.xsd#mtg_AdjustmentsToAdditionalPaidInCapitalConversionOfConvertibleDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_700e4f90-3193-4393-808d-cf7500b99d42" xlink:to="loc_mtg_AdjustmentsToAdditionalPaidInCapitalConversionOfConvertibleDebt_091b6a2e-fa87-4780-a1d4-0ec5029fdb7a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_StockIssuedDuringPeriodValueTreasuryStockReissuedForShareBasedCompensation_b91f79fc-9be3-47ae-9337-e3ce965362cb" xlink:href="mtg-20231231.xsd#mtg_StockIssuedDuringPeriodValueTreasuryStockReissuedForShareBasedCompensation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_700e4f90-3193-4393-808d-cf7500b99d42" xlink:to="loc_mtg_StockIssuedDuringPeriodValueTreasuryStockReissuedForShareBasedCompensation_b91f79fc-9be3-47ae-9337-e3ce965362cb" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_eab6ea60-9570-44ae-837f-7ac409973591" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_700e4f90-3193-4393-808d-cf7500b99d42" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_eab6ea60-9570-44ae-837f-7ac409973591" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_33e49aeb-650c-485b-974c-df25bce2c351" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockValueAcquiredCostMethod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_700e4f90-3193-4393-808d-cf7500b99d42" xlink:to="loc_us-gaap_TreasuryStockValueAcquiredCostMethod_33e49aeb-650c-485b-974c-df25bce2c351" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_f44ef3eb-55a9-4556-99d6-cf9dea90883a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_700e4f90-3193-4393-808d-cf7500b99d42" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_f44ef3eb-55a9-4556-99d6-cf9dea90883a" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_6ba084b4-09cc-42fb-b2bc-d926567490dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_700e4f90-3193-4393-808d-cf7500b99d42" xlink:to="loc_us-gaap_NetIncomeLoss_6ba084b4-09cc-42fb-b2bc-d926567490dd" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsCash_2617e1be-ad3e-47f0-a0af-8340bf0bbe38" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DividendsCash"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_700e4f90-3193-4393-808d-cf7500b99d42" xlink:to="loc_us-gaap_DividendsCash_2617e1be-ad3e-47f0-a0af-8340bf0bbe38" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_23ef2862-24db-4875-91af-8b5e0ecad81f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountingStandardsUpdateExtensibleList_0ee928e1-da72-48ef-a767-7029ea4ef95d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountingStandardsUpdateExtensibleList"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_e8bbea72-0728-4b51-a14a-b5b99092e601" xlink:to="loc_us-gaap_AccountingStandardsUpdateExtensibleList_0ee928e1-da72-48ef-a767-7029ea4ef95d" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansTables" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansTables"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansTables" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansDisclosuresTable_7629b9fa-ea94-42f3-83c8-98d609c55b8f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansDisclosuresTable_7629b9fa-ea94-42f3-83c8-98d609c55b8f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_cd3c7cb0-bcca-4768-9822-317117c57be4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansDisclosuresTable_7629b9fa-ea94-42f3-83c8-98d609c55b8f" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_cd3c7cb0-bcca-4768-9822-317117c57be4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_cd3c7cb0-bcca-4768-9822-317117c57be4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_cd3c7cb0-bcca-4768-9822-317117c57be4" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_cd3c7cb0-bcca-4768-9822-317117c57be4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_25632957-b5e3-4ade-a43e-6a73323ae522" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_cd3c7cb0-bcca-4768-9822-317117c57be4" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_25632957-b5e3-4ade-a43e-6a73323ae522" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_26880f0b-7191-4313-b2a5-00470a984443" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PensionPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_25632957-b5e3-4ade-a43e-6a73323ae522" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_26880f0b-7191-4313-b2a5-00470a984443" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_21aa69a5-9b55-4c10-a424-3ff2d2f68761" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_25632957-b5e3-4ade-a43e-6a73323ae522" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_21aa69a5-9b55-4c10-a424-3ff2d2f68761" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfNetBenefitCostsTableTextBlock_fa18cee9-3f61-418e-b48f-5ded537dd9f9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfNetBenefitCostsTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_us-gaap_ScheduleOfNetBenefitCostsTableTextBlock_fa18cee9-3f61-418e-b48f-5ded537dd9f9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DevelopmentOfFundedStatusTableTextBlock_f69e6fec-24a2-4b0d-a87f-564eda49a598" xlink:href="mtg-20231231.xsd#mtg_DevelopmentOfFundedStatusTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_mtg_DevelopmentOfFundedStatusTableTextBlock_f69e6fec-24a2-4b0d-a87f-564eda49a598" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfChangesInProjectedBenefitObligationsTableTextBlock_58b33f52-bf0e-4f41-8287-8638781faebc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfChangesInProjectedBenefitObligationsTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_us-gaap_ScheduleOfChangesInProjectedBenefitObligationsTableTextBlock_58b33f52-bf0e-4f41-8287-8638781faebc" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ScheduleOfChangesInFairValueOfPlanAssetsAndOtherComprehensiveIncomeLossTableTextBlock_0b6424e3-e1f5-4858-a038-0c191037002b" xlink:href="mtg-20231231.xsd#mtg_ScheduleOfChangesInFairValueOfPlanAssetsAndOtherComprehensiveIncomeLossTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_mtg_ScheduleOfChangesInFairValueOfPlanAssetsAndOtherComprehensiveIncomeLossTableTextBlock_0b6424e3-e1f5-4858-a038-0c191037002b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAssumptionsUsedTableTextBlock_e223d2fd-c8e5-479b-9b5d-b3a23bbc4fb6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAssumptionsUsedTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_us-gaap_ScheduleOfAssumptionsUsedTableTextBlock_e223d2fd-c8e5-479b-9b5d-b3a23bbc4fb6" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAllocationOfPlanAssetsTableTextBlock_0ee9bd93-d5e2-4c96-a1a7-6535711b605c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAllocationOfPlanAssetsTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_us-gaap_ScheduleOfAllocationOfPlanAssetsTableTextBlock_0ee9bd93-d5e2-4c96-a1a7-6535711b605c" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTextBlock_4734164a-9835-450b-b846-9414e0ee2081" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTextBlock_4734164a-9835-450b-b846-9414e0ee2081" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ScheduleofInvestmentAllocationStrategiesTableTextBlock_d3afd52b-b7ce-4efc-8f97-f8a47ec2a133" xlink:href="mtg-20231231.xsd#mtg_ScheduleofInvestmentAllocationStrategiesTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_mtg_ScheduleofInvestmentAllocationStrategiesTableTextBlock_d3afd52b-b7ce-4efc-8f97-f8a47ec2a133" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_MinimumAndMaximumAllocationRangesForFixedIncomeSecuritiesAndEquitySecuritiesTableTextBlock_3a9ee7c4-f7b1-4b6a-bd21-2efd09888f92" xlink:href="mtg-20231231.xsd#mtg_MinimumAndMaximumAllocationRangesForFixedIncomeSecuritiesAndEquitySecuritiesTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_mtg_MinimumAndMaximumAllocationRangesForFixedIncomeSecuritiesAndEquitySecuritiesTableTextBlock_3a9ee7c4-f7b1-4b6a-bd21-2efd09888f92" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfExpectedBenefitPaymentsTableTextBlock_639b2ea5-2e93-43dd-8769-406af3792d24" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfExpectedBenefitPaymentsTableTextBlock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlansAndOtherPostretirementBenefitPlansTableTextBlockLineItems_5758c7f4-2282-4258-9c18-65910a30fd1b" xlink:to="loc_us-gaap_ScheduleOfExpectedBenefitPaymentsTableTextBlock_639b2ea5-2e93-43dd-8769-406af3792d24" xlink:type="arc" order="9"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/SignificantAccountingPoliciesHomeOfficeandEquipmentDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#SignificantAccountingPoliciesHomeOfficeandEquipmentDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/SignificantAccountingPoliciesHomeOfficeandEquipmentDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_mtg_SignificantAccountingPoliciesLineItems_c35be501-203b-4be4-b07b-a029b457c8b6" xlink:href="mtg-20231231.xsd#mtg_SignificantAccountingPoliciesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_SignificantAccountingPoliciesTable_a9c24bb4-d41d-4421-931b-ed692da01b27" xlink:href="mtg-20231231.xsd#mtg_SignificantAccountingPoliciesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_mtg_SignificantAccountingPoliciesLineItems_c35be501-203b-4be4-b07b-a029b457c8b6" xlink:to="loc_mtg_SignificantAccountingPoliciesTable_a9c24bb4-d41d-4421-931b-ed692da01b27" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_2b1aa6e7-c624-45d6-8b25-bff643d3b755" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_mtg_SignificantAccountingPoliciesTable_a9c24bb4-d41d-4421-931b-ed692da01b27" xlink:to="loc_srt_RangeAxis_2b1aa6e7-c624-45d6-8b25-bff643d3b755" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_2b1aa6e7-c624-45d6-8b25-bff643d3b755_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_2b1aa6e7-c624-45d6-8b25-bff643d3b755" xlink:to="loc_srt_RangeMember_2b1aa6e7-c624-45d6-8b25-bff643d3b755_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_54cb2764-9fa2-4abb-b294-238e014f5853" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_2b1aa6e7-c624-45d6-8b25-bff643d3b755" xlink:to="loc_srt_RangeMember_54cb2764-9fa2-4abb-b294-238e014f5853" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_62a78183-3b11-4ef6-a35d-7fde2cfb6553" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_54cb2764-9fa2-4abb-b294-238e014f5853" xlink:to="loc_srt_MinimumMember_62a78183-3b11-4ef6-a35d-7fde2cfb6553" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_d0738584-3e75-4eeb-bccb-f9f9ef41408a" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_54cb2764-9fa2-4abb-b294-238e014f5853" xlink:to="loc_srt_MaximumMember_d0738584-3e75-4eeb-bccb-f9f9ef41408a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_19f9d6f9-2d5a-4a9e-8dd0-852f6624d329" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PropertyPlantAndEquipmentUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_SignificantAccountingPoliciesLineItems_c35be501-203b-4be4-b07b-a029b457c8b6" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentUsefulLife_19f9d6f9-2d5a-4a9e-8dd0-852f6624d329" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_ebaff1f6-b781-485b-9171-24d67635d889" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_SignificantAccountingPoliciesLineItems_c35be501-203b-4be4-b07b-a029b457c8b6" xlink:to="loc_us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment_ebaff1f6-b781-485b-9171-24d67635d889" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Depreciation_66af0073-a9d4-4d31-8c25-5cedc719e314" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Depreciation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_SignificantAccountingPoliciesLineItems_c35be501-203b-4be4-b07b-a029b457c8b6" xlink:to="loc_us-gaap_Depreciation_66af0073-a9d4-4d31-8c25-5cedc719e314" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/SignificantAccountingPoliciesAdditionalInformationDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#SignificantAccountingPoliciesAdditionalInformationDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/SignificantAccountingPoliciesAdditionalInformationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_mtg_SignificantAccountingPoliciesLineItems_749db6c4-34f3-4ad4-8622-9ea58433df80" xlink:href="mtg-20231231.xsd#mtg_SignificantAccountingPoliciesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_SignificantAccountingPoliciesTable_0779e2e7-63f0-4002-b3e2-542c05c6ba2a" xlink:href="mtg-20231231.xsd#mtg_SignificantAccountingPoliciesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_mtg_SignificantAccountingPoliciesLineItems_749db6c4-34f3-4ad4-8622-9ea58433df80" xlink:to="loc_mtg_SignificantAccountingPoliciesTable_0779e2e7-63f0-4002-b3e2-542c05c6ba2a" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_ffc0dba3-ee69-43b5-91b1-2bf28885585e" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_mtg_SignificantAccountingPoliciesTable_0779e2e7-63f0-4002-b3e2-542c05c6ba2a" xlink:to="loc_srt_RangeAxis_ffc0dba3-ee69-43b5-91b1-2bf28885585e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_ffc0dba3-ee69-43b5-91b1-2bf28885585e_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_ffc0dba3-ee69-43b5-91b1-2bf28885585e" xlink:to="loc_srt_RangeMember_ffc0dba3-ee69-43b5-91b1-2bf28885585e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_791b6cef-051e-4fb1-a70a-00fba9e96627" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_ffc0dba3-ee69-43b5-91b1-2bf28885585e" xlink:to="loc_srt_RangeMember_791b6cef-051e-4fb1-a70a-00fba9e96627" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_2b049ddf-86d7-4ccb-a194-86aa212021d3" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_791b6cef-051e-4fb1-a70a-00fba9e96627" xlink:to="loc_srt_MinimumMember_2b049ddf-86d7-4ccb-a194-86aa212021d3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_39b64be0-31be-4c7c-855f-ddd36996ff51" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_791b6cef-051e-4fb1-a70a-00fba9e96627" xlink:to="loc_srt_MaximumMember_39b64be0-31be-4c7c-855f-ddd36996ff51" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_MinimumNumberOfPaymentsPastDueToBeInDefault_b8f6a664-9c44-4c06-958a-fbd57b7f175e" xlink:href="mtg-20231231.xsd#mtg_MinimumNumberOfPaymentsPastDueToBeInDefault"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_SignificantAccountingPoliciesLineItems_749db6c4-34f3-4ad4-8622-9ea58433df80" xlink:to="loc_mtg_MinimumNumberOfPaymentsPastDueToBeInDefault_b8f6a664-9c44-4c06-958a-fbd57b7f175e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_addc71d8-b9b3-4306-97c7-c239dd33401a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_SignificantAccountingPoliciesLineItems_749db6c4-34f3-4ad4-8622-9ea58433df80" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_addc71d8-b9b3-4306-97c7-c239dd33401a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionAmountsOfTransaction_8c2c21e2-3c16-469a-be72-985f5720d800" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionAmountsOfTransaction"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_SignificantAccountingPoliciesLineItems_749db6c4-34f3-4ad4-8622-9ea58433df80" xlink:to="loc_us-gaap_RelatedPartyTransactionAmountsOfTransaction_8c2c21e2-3c16-469a-be72-985f5720d800" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/EarningsperShareDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#EarningsperShareDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/EarningsperShareDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_e21afe52-1208-4c4d-be0e-64081a36885e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_40acb493-f886-4bec-a44e-e88c00210907" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_e21afe52-1208-4c4d-be0e-64081a36885e" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_40acb493-f886-4bec-a44e-e88c00210907" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_3d7aead1-afac-43f1-a991-c6a23f564fab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_40acb493-f886-4bec-a44e-e88c00210907" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_3d7aead1-afac-43f1-a991-c6a23f564fab" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_3d7aead1-afac-43f1-a991-c6a23f564fab_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_3d7aead1-afac-43f1-a991-c6a23f564fab" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_3d7aead1-afac-43f1-a991-c6a23f564fab_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_473e6f37-ec19-4ead-9e07-1caa99ddbd91" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_3d7aead1-afac-43f1-a991-c6a23f564fab" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_473e6f37-ec19-4ead-9e07-1caa99ddbd91" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ConvertibleJuniorDebenturesat9perannumDue2063Member_eefd4348-7dbd-44a4-b01f-fac5c8ccbddb" xlink:href="mtg-20231231.xsd#mtg_ConvertibleJuniorDebenturesat9perannumDue2063Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_473e6f37-ec19-4ead-9e07-1caa99ddbd91" xlink:to="loc_mtg_ConvertibleJuniorDebenturesat9perannumDue2063Member_eefd4348-7dbd-44a4-b01f-fac5c8ccbddb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_UnvestedRestrictedStockUnitsMember_382309b8-afc7-4199-b97a-73bbe8a19898" xlink:href="mtg-20231231.xsd#mtg_UnvestedRestrictedStockUnitsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_473e6f37-ec19-4ead-9e07-1caa99ddbd91" xlink:to="loc_mtg_UnvestedRestrictedStockUnitsMember_382309b8-afc7-4199-b97a-73bbe8a19898" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasicAbstract_ab19bda1-6bc6-4809-978d-66d53b6fbe06" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarningsPerShareBasicAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_e21afe52-1208-4c4d-be0e-64081a36885e" xlink:to="loc_us-gaap_EarningsPerShareBasicAbstract_ab19bda1-6bc6-4809-978d-66d53b6fbe06" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_37b15d02-c06a-49bd-8e6b-41fa6e46b7f7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicAbstract_ab19bda1-6bc6-4809-978d-66d53b6fbe06" xlink:to="loc_us-gaap_NetIncomeLoss_37b15d02-c06a-49bd-8e6b-41fa6e46b7f7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_d8cdfdd8-0d9c-4ff0-adce-15112406e973" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicAbstract_ab19bda1-6bc6-4809-978d-66d53b6fbe06" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_d8cdfdd8-0d9c-4ff0-adce-15112406e973" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasic_8403cd3f-fb06-448b-99ee-d68c42fedaa0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarningsPerShareBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicAbstract_ab19bda1-6bc6-4809-978d-66d53b6fbe06" xlink:to="loc_us-gaap_EarningsPerShareBasic_8403cd3f-fb06-448b-99ee-d68c42fedaa0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDilutedAbstract_5a8c38e2-dc0d-4f15-8698-f420c52bd0b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarningsPerShareDilutedAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_e21afe52-1208-4c4d-be0e-64081a36885e" xlink:to="loc_us-gaap_EarningsPerShareDilutedAbstract_5a8c38e2-dc0d-4f15-8698-f420c52bd0b5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_3a9b67ea-2ab7-4b33-beb8-e3b370214247" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DilutiveSecurities_430625c7-0a87-460d-90b6-2092238c63b6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DilutiveSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_5a8c38e2-dc0d-4f15-8698-f420c52bd0b5" xlink:to="loc_us-gaap_DilutiveSecurities_430625c7-0a87-460d-90b6-2092238c63b6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_d9914045-6951-4612-bbb0-5fe8a0b3f090" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_5a8c38e2-dc0d-4f15-8698-f420c52bd0b5" xlink:to="loc_us-gaap_NetIncomeLossAvailableToCommonStockholdersDiluted_d9914045-6951-4612-bbb0-5fe8a0b3f090" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_9a7e7a1d-7878-4ded-997c-29e50c89f7b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DilutiveSecuritiesAbstract_046c42e8-b092-419e-accf-2067e59e4eed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DilutiveSecuritiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_5a8c38e2-dc0d-4f15-8698-f420c52bd0b5" xlink:to="loc_us-gaap_DilutiveSecuritiesAbstract_046c42e8-b092-419e-accf-2067e59e4eed" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_a5fa598c-1489-4eda-bd7f-3bfcad49ef5b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DilutiveSecuritiesAbstract_046c42e8-b092-419e-accf-2067e59e4eed" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_a5fa598c-1489-4eda-bd7f-3bfcad49ef5b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_a6d01c13-ac9c-4875-8d51-17aafd19f0e9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DilutiveSecuritiesAbstract_046c42e8-b092-419e-accf-2067e59e4eed" xlink:to="loc_us-gaap_WeightedAverageNumberDilutedSharesOutstandingAdjustment_a6d01c13-ac9c-4875-8d51-17aafd19f0e9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_c1088205-37ee-4e0b-85a2-025d8f49f7db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_5a8c38e2-dc0d-4f15-8698-f420c52bd0b5" xlink:to="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_c1088205-37ee-4e0b-85a2-025d8f49f7db" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDiluted_4e8cff0d-882f-4be7-9ed0-8e799e64c000" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarningsPerShareDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_5a8c38e2-dc0d-4f15-8698-f420c52bd0b5" xlink:to="loc_us-gaap_EarningsPerShareDiluted_4e8cff0d-882f-4be7-9ed0-8e799e64c000" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_fb7272ac-58bc-4878-b7a3-00a42ccaa2cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_e21afe52-1208-4c4d-be0e-64081a36885e" xlink:to="loc_us-gaap_EffectiveIncomeTaxRateReconciliationAtFederalStatutoryIncomeTaxRate_fb7272ac-58bc-4878-b7a3-00a42ccaa2cf" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_033c1874-15cd-4b0e-bbc3-05166f8f4d84" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_e21afe52-1208-4c4d-be0e-64081a36885e" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_033c1874-15cd-4b0e-bbc3-05166f8f4d84" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/InvestmentsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#InvestmentsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/InvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_23e3248c-d611-41c4-8199-2d018f3f677c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_e85f50f8-2511-48c0-9464-19c197babfed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_23e3248c-d611-41c4-8199-2d018f3f677c" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_e85f50f8-2511-48c0-9464-19c197babfed" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_36015f8f-c0ce-4610-b168-74b0a8bc036b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_e85f50f8-2511-48c0-9464-19c197babfed" xlink:to="loc_us-gaap_FinancialInstrumentAxis_36015f8f-c0ce-4610-b168-74b0a8bc036b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_36015f8f-c0ce-4610-b168-74b0a8bc036b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_36015f8f-c0ce-4610-b168-74b0a8bc036b" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_36015f8f-c0ce-4610-b168-74b0a8bc036b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_a12180e0-b93b-4a4d-9162-51eb8a07705c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_36015f8f-c0ce-4610-b168-74b0a8bc036b" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_a12180e0-b93b-4a4d-9162-51eb8a07705c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_a12180e0-b93b-4a4d-9162-51eb8a07705c" xlink:to="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_68f03ee2-e136-45ee-8e47-bc48ef7ba378" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasuryAndGovernmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_68f03ee2-e136-45ee-8e47-bc48ef7ba378" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_9f1834ef-675e-49bb-8f21-4045ecb9ce7c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_9f1834ef-675e-49bb-8f21-4045ecb9ce7c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_10f96846-2e6c-48ab-8de8-8575cc226213" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CorporateDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_10f96846-2e6c-48ab-8de8-8575cc226213" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_dfaf44de-e887-4f38-96e4-083bfab1ca56" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_dfaf44de-e887-4f38-96e4-083bfab1ca56" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResidentialMortgageBackedSecuritiesMember_b3190ca6-842f-40ca-9940-bf8f76db2d06" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ResidentialMortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:to="loc_us-gaap_ResidentialMortgageBackedSecuritiesMember_b3190ca6-842f-40ca-9940-bf8f76db2d06" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialMortgageBackedSecuritiesMember_fa05d23d-0729-4494-95b9-ae5d1cbd189e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommercialMortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:to="loc_us-gaap_CommercialMortgageBackedSecuritiesMember_fa05d23d-0729-4494-95b9-ae5d1cbd189e" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CollateralizedLoanObligationsMember_7fbd5a08-1acb-4bbe-9f67-d27aa97d2739" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CollateralizedLoanObligationsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:to="loc_us-gaap_CollateralizedLoanObligationsMember_7fbd5a08-1acb-4bbe-9f67-d27aa97d2739" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignGovernmentDebtSecuritiesMember_9fe9d49e-ec5c-4814-986b-aeb86ab17840" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ForeignGovernmentDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:to="loc_us-gaap_ForeignGovernmentDebtSecuritiesMember_9fe9d49e-ec5c-4814-986b-aeb86ab17840" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialPaperMember_388da66b-6f60-4cd6-9fd4-c4c47bcfbb3e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommercialPaperMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_a95df2dc-1f79-4ded-979f-5d2c8cea3c33" xlink:to="loc_us-gaap_CommercialPaperMember_388da66b-6f60-4cd6-9fd4-c4c47bcfbb3e" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_79b71fd8-2ed5-44c8-bdec-bbb3cf8e1647" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_23e3248c-d611-41c4-8199-2d018f3f677c" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_79b71fd8-2ed5-44c8-bdec-bbb3cf8e1647" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_ece039fb-27f2-41fe-b3e1-90735742f340" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_23e3248c-d611-41c4-8199-2d018f3f677c" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedGainBeforeTax_ece039fb-27f2-41fe-b3e1-90735742f340" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_f3f40c47-118d-48bf-b000-c48d4cfcd76b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_23e3248c-d611-41c4-8199-2d018f3f677c" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAccumulatedGrossUnrealizedLossBeforeTax_f3f40c47-118d-48bf-b000-c48d4cfcd76b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_7c589cef-08e2-4cb5-87d7-77733c8a4903" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_23e3248c-d611-41c4-8199-2d018f3f677c" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_7c589cef-08e2-4cb5-87d7-77733c8a4903" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsHeldByInsuranceRegulators_6d9a3fbf-c065-4c45-a62c-c88fc7297f45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsHeldByInsuranceRegulators"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_23e3248c-d611-41c4-8199-2d018f3f677c" xlink:to="loc_us-gaap_AssetsHeldByInsuranceRegulators_6d9a3fbf-c065-4c45-a62c-c88fc7297f45" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsHeldInTrust_b683dbdb-b253-4a2b-87ff-30daaf8f917b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsHeldInTrust"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_23e3248c-d611-41c4-8199-2d018f3f677c" xlink:to="loc_us-gaap_AssetsHeldInTrust_b683dbdb-b253-4a2b-87ff-30daaf8f917b" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/InvestmentsAmortizedCostandFairValuesofDebtSecuritiesDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#InvestmentsAmortizedCostandFairValuesofDebtSecuritiesDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/InvestmentsAmortizedCostandFairValuesofDebtSecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_009f7e96-360c-440e-978e-dbac29c0ca3b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_2d926664-ce23-41ee-81ae-28f95af1e9b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_009f7e96-360c-440e-978e-dbac29c0ca3b" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_2d926664-ce23-41ee-81ae-28f95af1e9b4" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_92a78d4f-5002-4f36-af36-aee20c34ecb2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtSecuritiesAvailableForSaleTable_2d926664-ce23-41ee-81ae-28f95af1e9b4" xlink:to="loc_us-gaap_FinancialInstrumentAxis_92a78d4f-5002-4f36-af36-aee20c34ecb2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_92a78d4f-5002-4f36-af36-aee20c34ecb2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_92a78d4f-5002-4f36-af36-aee20c34ecb2" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_92a78d4f-5002-4f36-af36-aee20c34ecb2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_2c89b1ea-89ba-48c7-88ab-598c39feb030" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_92a78d4f-5002-4f36-af36-aee20c34ecb2" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_2c89b1ea-89ba-48c7-88ab-598c39feb030" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_dab8bf28-a417-4247-96f8-4d0e05253b4c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_2c89b1ea-89ba-48c7-88ab-598c39feb030" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_dab8bf28-a417-4247-96f8-4d0e05253b4c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResidentialMortgageBackedSecuritiesMember_30b6a854-d4ac-49ee-aa90-9de3579a702d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ResidentialMortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_2c89b1ea-89ba-48c7-88ab-598c39feb030" xlink:to="loc_us-gaap_ResidentialMortgageBackedSecuritiesMember_30b6a854-d4ac-49ee-aa90-9de3579a702d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialMortgageBackedSecuritiesMember_8e2b851d-fdc4-4071-993f-050059f69512" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommercialMortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_2c89b1ea-89ba-48c7-88ab-598c39feb030" xlink:to="loc_us-gaap_CommercialMortgageBackedSecuritiesMember_8e2b851d-fdc4-4071-993f-050059f69512" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CollateralizedLoanObligationsMember_f6a2e125-0833-4923-a59e-060a13da3f1e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CollateralizedLoanObligationsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_2c89b1ea-89ba-48c7-88ab-598c39feb030" xlink:to="loc_us-gaap_CollateralizedLoanObligationsMember_f6a2e125-0833-4923-a59e-060a13da3f1e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_29d55923-e76a-405d-bc66-67ad7467fd73" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_2c89b1ea-89ba-48c7-88ab-598c39feb030" xlink:to="loc_us-gaap_DebtSecuritiesMember_29d55923-e76a-405d-bc66-67ad7467fd73" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAmortizedCostAbstract_5d6c2cfc-307c-47d6-ad86-a6213996dad8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAmortizedCostAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_009f7e96-360c-440e-978e-dbac29c0ca3b" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAmortizedCostAbstract_5d6c2cfc-307c-47d6-ad86-a6213996dad8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_ea9612df-dd50-4fa3-81fe-4e681fa530d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAmortizedCostAbstract_5d6c2cfc-307c-47d6-ad86-a6213996dad8" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearAmortizedCost_ea9612df-dd50-4fa3-81fe-4e681fa530d4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_34579978-4e60-4257-a1c4-16aa59132fd4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAmortizedCostAbstract_5d6c2cfc-307c-47d6-ad86-a6213996dad8" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsAmortizedCost_34579978-4e60-4257-a1c4-16aa59132fd4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_268a9296-b2e3-4188-85cc-20a816040c79" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAmortizedCostAbstract_5d6c2cfc-307c-47d6-ad86-a6213996dad8" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsAmortizedCost_268a9296-b2e3-4188-85cc-20a816040c79" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_7eb477a9-0204-4656-a0df-2c104231bd63" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAmortizedCostAbstract_5d6c2cfc-307c-47d6-ad86-a6213996dad8" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsAmortizedCost_7eb477a9-0204-4656-a0df-2c104231bd63" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost_a1793ddd-5389-4769-887b-eb900adb567e" xlink:href="mtg-20231231.xsd#mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAmortizedCostAbstract_5d6c2cfc-307c-47d6-ad86-a6213996dad8" xlink:to="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateAmortizedCost_a1793ddd-5389-4769-887b-eb900adb567e" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_cb63e91b-bd3d-4f4c-9ddb-6fe276422911" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAmortizedCostAbstract_5d6c2cfc-307c-47d6-ad86-a6213996dad8" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateAmortizedCost_cb63e91b-bd3d-4f4c-9ddb-6fe276422911" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_8af2bcc1-489a-4424-ad7c-3e4eaebfabe9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAmortizedCostAbstract_5d6c2cfc-307c-47d6-ad86-a6213996dad8" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_8af2bcc1-489a-4424-ad7c-3e4eaebfabe9" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesFairValueAbstract_f6e3f7e2-1654-4ca1-983a-1471d9a3d006" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesFairValueAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfAvailableForSaleSecuritiesLineItems_009f7e96-360c-440e-978e-dbac29c0ca3b" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesFairValueAbstract_f6e3f7e2-1654-4ca1-983a-1471d9a3d006" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_24cd6a2e-45af-4722-9feb-b5a7f2377a88" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesFairValueAbstract_f6e3f7e2-1654-4ca1-983a-1471d9a3d006" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithinOneYearFairValue_24cd6a2e-45af-4722-9feb-b5a7f2377a88" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_6bc2589b-1ece-42e0-9b49-b9e22bc80c95" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesFairValueAbstract_f6e3f7e2-1654-4ca1-983a-1471d9a3d006" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterOneThroughFiveYearsFairValue_6bc2589b-1ece-42e0-9b49-b9e22bc80c95" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_98aed88a-ebc0-4efd-ba7e-8c17e1e6a4a4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesFairValueAbstract_f6e3f7e2-1654-4ca1-983a-1471d9a3d006" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterFiveThroughTenYearsFairValue_98aed88a-ebc0-4efd-ba7e-8c17e1e6a4a4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_60d4e7ec-4d74-4b00-91ed-258fa6462fb9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesFairValueAbstract_f6e3f7e2-1654-4ca1-983a-1471d9a3d006" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesAfterTenYearsFairValue_60d4e7ec-4d74-4b00-91ed-258fa6462fb9" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue_54b701a9-d8ff-482d-82de-c1c963e4a62b" xlink:href="mtg-20231231.xsd#mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesFairValueAbstract_f6e3f7e2-1654-4ca1-983a-1471d9a3d006" xlink:to="loc_mtg_AvailableForSaleSecuritiesDebtMaturitiesWithSingleMaturityDateFairValue_54b701a9-d8ff-482d-82de-c1c963e4a62b" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_ac3f3d7a-e744-4da2-9b7c-2a1e8b0e1aa6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesFairValueAbstract_f6e3f7e2-1654-4ca1-983a-1471d9a3d006" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesWithoutSingleMaturityDateFairValue_ac3f3d7a-e744-4da2-9b7c-2a1e8b0e1aa6" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_4174e180-7099-458f-9260-b1808ce5ea84" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AvailableForSaleSecuritiesDebtMaturitiesFairValueAbstract_f6e3f7e2-1654-4ca1-983a-1471d9a3d006" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_4174e180-7099-458f-9260-b1808ce5ea84" xlink:type="arc" order="7"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/InvestmentsEquitySecuritiesDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#InvestmentsEquitySecuritiesDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/InvestmentsEquitySecuritiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfTradingSecuritiesAndOtherTradingAssetsLineItems_185e3c2d-0627-4f4a-bf7c-6014d1c8c7ee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfTradingSecuritiesAndOtherTradingAssetsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfTradingSecuritiesAndOtherTradingAssetsTable_5f322f64-4788-4ff1-8779-704e4e149f19" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfTradingSecuritiesAndOtherTradingAssetsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfTradingSecuritiesAndOtherTradingAssetsLineItems_185e3c2d-0627-4f4a-bf7c-6014d1c8c7ee" xlink:to="loc_us-gaap_ScheduleOfTradingSecuritiesAndOtherTradingAssetsTable_5f322f64-4788-4ff1-8779-704e4e149f19" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_4ac39738-12d6-41b5-b251-fe44fa579543" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfTradingSecuritiesAndOtherTradingAssetsTable_5f322f64-4788-4ff1-8779-704e4e149f19" xlink:to="loc_us-gaap_FinancialInstrumentAxis_4ac39738-12d6-41b5-b251-fe44fa579543" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_4ac39738-12d6-41b5-b251-fe44fa579543_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_4ac39738-12d6-41b5-b251-fe44fa579543" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_4ac39738-12d6-41b5-b251-fe44fa579543_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_7e133b9e-3f6c-410f-9eae-ffe81f47ff63" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_4ac39738-12d6-41b5-b251-fe44fa579543" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_7e133b9e-3f6c-410f-9eae-ffe81f47ff63" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesMember_6a06f1de-d94e-4ccb-818e-289d18c1108f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_7e133b9e-3f6c-410f-9eae-ffe81f47ff63" xlink:to="loc_us-gaap_EquitySecuritiesMember_6a06f1de-d94e-4ccb-818e-289d18c1108f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNiGainLossAbstract_4c8d6faa-d69d-499c-9d0e-8cda8d1c0afd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNiGainLossAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfTradingSecuritiesAndOtherTradingAssetsLineItems_185e3c2d-0627-4f4a-bf7c-6014d1c8c7ee" xlink:to="loc_us-gaap_EquitySecuritiesFvNiGainLossAbstract_4c8d6faa-d69d-499c-9d0e-8cda8d1c0afd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNiCost_3c7ce747-b697-43b6-819f-dffb5d7a3c31" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNiCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquitySecuritiesFvNiGainLossAbstract_4c8d6faa-d69d-499c-9d0e-8cda8d1c0afd" xlink:to="loc_us-gaap_EquitySecuritiesFvNiCost_3c7ce747-b697-43b6-819f-dffb5d7a3c31" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNiUnrealizedGain_bd55d7a9-28f3-46ba-9c15-1c1d4f1b78b5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNiUnrealizedGain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquitySecuritiesFvNiGainLossAbstract_4c8d6faa-d69d-499c-9d0e-8cda8d1c0afd" xlink:to="loc_us-gaap_EquitySecuritiesFvNiUnrealizedGain_bd55d7a9-28f3-46ba-9c15-1c1d4f1b78b5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNiUnrealizedLoss_cb589aa3-719f-40b0-9ab5-b57dd8fc5436" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNiUnrealizedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquitySecuritiesFvNiGainLossAbstract_4c8d6faa-d69d-499c-9d0e-8cda8d1c0afd" xlink:to="loc_us-gaap_EquitySecuritiesFvNiUnrealizedLoss_cb589aa3-719f-40b0-9ab5-b57dd8fc5436" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNi_61aaf129-504e-4e84-98f4-a44000170de7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNi"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquitySecuritiesFvNiGainLossAbstract_4c8d6faa-d69d-499c-9d0e-8cda8d1c0afd" xlink:to="loc_us-gaap_EquitySecuritiesFvNi_61aaf129-504e-4e84-98f4-a44000170de7" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/InvestmentsSecuritiesInUnrealizedLossPositionDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#InvestmentsSecuritiesInUnrealizedLossPositionDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/InvestmentsSecuritiesInUnrealizedLossPositionDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfInvestmentsLineItems_dbba6f1c-fa10-446d-9d8c-ab504b4c5c46" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfInvestmentsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfInvestmentsTable_a8dcc3e9-8c70-4fb0-bfe4-1c12d54143d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfInvestmentsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_dbba6f1c-fa10-446d-9d8c-ab504b4c5c46" xlink:to="loc_us-gaap_ScheduleOfInvestmentsTable_a8dcc3e9-8c70-4fb0-bfe4-1c12d54143d5" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_fdd30044-fba1-40de-8a87-b052eb656b3c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfInvestmentsTable_a8dcc3e9-8c70-4fb0-bfe4-1c12d54143d5" xlink:to="loc_us-gaap_FinancialInstrumentAxis_fdd30044-fba1-40de-8a87-b052eb656b3c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fdd30044-fba1-40de-8a87-b052eb656b3c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_fdd30044-fba1-40de-8a87-b052eb656b3c" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fdd30044-fba1-40de-8a87-b052eb656b3c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_fdd30044-fba1-40de-8a87-b052eb656b3c" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_f1df76c2-6df3-4fc0-a934-383aa2bfb270" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasuryAndGovernmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_f1df76c2-6df3-4fc0-a934-383aa2bfb270" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_f1c3ff2c-7e78-486d-b64f-137c475139dc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_f1c3ff2c-7e78-486d-b64f-137c475139dc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_3624fa17-9997-4ddf-a07d-13d119d47a04" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CorporateDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_3624fa17-9997-4ddf-a07d-13d119d47a04" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_85e80a1e-130a-4087-8acc-89a749cb6852" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_85e80a1e-130a-4087-8acc-89a749cb6852" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResidentialMortgageBackedSecuritiesMember_635797cc-d940-466f-bbeb-b6341298348c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ResidentialMortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:to="loc_us-gaap_ResidentialMortgageBackedSecuritiesMember_635797cc-d940-466f-bbeb-b6341298348c" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialMortgageBackedSecuritiesMember_2322c190-005f-4faf-a042-15de9cdd40a7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommercialMortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:to="loc_us-gaap_CommercialMortgageBackedSecuritiesMember_2322c190-005f-4faf-a042-15de9cdd40a7" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CollateralizedLoanObligationsMember_821c65e6-857c-4b5d-bf55-6e90d1c293cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CollateralizedLoanObligationsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:to="loc_us-gaap_CollateralizedLoanObligationsMember_821c65e6-857c-4b5d-bf55-6e90d1c293cf" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignGovernmentDebtSecuritiesMember_185328b7-7771-404d-a2f1-3ec97d23290d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ForeignGovernmentDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:to="loc_us-gaap_ForeignGovernmentDebtSecuritiesMember_185328b7-7771-404d-a2f1-3ec97d23290d" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialPaperMember_c0af5da3-6c48-44d3-b9c9-1d4d22eab0b6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommercialPaperMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0891fe84-2edd-40a6-a352-70edcc694ba1" xlink:to="loc_us-gaap_CommercialPaperMember_c0af5da3-6c48-44d3-b9c9-1d4d22eab0b6" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_af6b47f6-938b-4030-b5be-54b773c956f6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_dbba6f1c-fa10-446d-9d8c-ab504b4c5c46" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12Months_af6b47f6-938b-4030-b5be-54b773c956f6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_c0aa0bca-bddc-44fd-9c16-0c988cac69d1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_dbba6f1c-fa10-446d-9d8c-ab504b4c5c46" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLonger_c0aa0bca-bddc-44fd-9c16-0c988cac69d1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_5d529640-4dd3-4d5f-b59e-102d675c3056" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_dbba6f1c-fa10-446d-9d8c-ab504b4c5c46" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPosition_5d529640-4dd3-4d5f-b59e-102d675c3056" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_5b5c5511-3faf-4271-af5a-32a84349456f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_dbba6f1c-fa10-446d-9d8c-ab504b4c5c46" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPositionLessThan12MonthsAccumulatedLoss_5b5c5511-3faf-4271-af5a-32a84349456f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_365ad064-52fa-4273-bd4a-d3571cfb1e25" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_dbba6f1c-fa10-446d-9d8c-ab504b4c5c46" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleContinuousUnrealizedLossPosition12MonthsOrLongerAccumulatedLoss_365ad064-52fa-4273-bd4a-d3571cfb1e25" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_2f9b46c5-8375-4b56-ad86-1176c33279f8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_dbba6f1c-fa10-446d-9d8c-ab504b4c5c46" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionAccumulatedLoss_2f9b46c5-8375-4b56-ad86-1176c33279f8" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_3d622cda-490b-4b7d-a0d8-f7f204bd61c7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_dbba6f1c-fa10-446d-9d8c-ab504b4c5c46" xlink:to="loc_us-gaap_DebtSecuritiesAvailableForSaleUnrealizedLossPositionNumberOfPositions_3d622cda-490b-4b7d-a0d8-f7f204bd61c7" xlink:type="arc" order="6"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/InvestmentsNetUnrealizedGainsLossesofInvestmentsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#InvestmentsNetUnrealizedGainsLossesofInvestmentsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/InvestmentsNetUnrealizedGainsLossesofInvestmentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfInvestmentsLineItems_f3c30248-d214-4af2-85d8-9cf2f795d7cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfInvestmentsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfInvestmentsTable_837634fe-51ae-4aff-a127-4cf4b7e25865" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfInvestmentsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_f3c30248-d214-4af2-85d8-9cf2f795d7cf" xlink:to="loc_us-gaap_ScheduleOfInvestmentsTable_837634fe-51ae-4aff-a127-4cf4b7e25865" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentTypeAxis_0635035b-0928-4786-9573-f6fc52f79d73" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfInvestmentsTable_837634fe-51ae-4aff-a127-4cf4b7e25865" xlink:to="loc_us-gaap_InvestmentTypeAxis_0635035b-0928-4786-9573-f6fc52f79d73" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentTypeCategorizationMember_0635035b-0928-4786-9573-f6fc52f79d73_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentTypeCategorizationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InvestmentTypeAxis_0635035b-0928-4786-9573-f6fc52f79d73" xlink:to="loc_us-gaap_InvestmentTypeCategorizationMember_0635035b-0928-4786-9573-f6fc52f79d73_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentTypeCategorizationMember_ac020c7e-9023-4af5-a661-4da5fc978e15" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentTypeCategorizationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InvestmentTypeAxis_0635035b-0928-4786-9573-f6fc52f79d73" xlink:to="loc_us-gaap_InvestmentTypeCategorizationMember_ac020c7e-9023-4af5-a661-4da5fc978e15" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FixedMaturitiesMember_3aea00a2-115a-4c23-859d-787296685735" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FixedMaturitiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_ac020c7e-9023-4af5-a661-4da5fc978e15" xlink:to="loc_us-gaap_FixedMaturitiesMember_3aea00a2-115a-4c23-859d-787296685735" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentBeforeTax_545e9913-c835-4b32-8e4d-7a94fbee5666" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_f3c30248-d214-4af2-85d8-9cf2f795d7cf" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentBeforeTax_545e9913-c835-4b32-8e4d-7a94fbee5666" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#InvestmentsNetInvestmentIncomeDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/InvestmentsNetInvestmentIncomeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfInvestmentsLineItems_8af3c55a-380e-43bd-b1e3-c3a6977b1d48" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfInvestmentsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfInvestmentsTable_5b979a09-377b-4ef6-a06e-6a3e58999683" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfInvestmentsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_8af3c55a-380e-43bd-b1e3-c3a6977b1d48" xlink:to="loc_us-gaap_ScheduleOfInvestmentsTable_5b979a09-377b-4ef6-a06e-6a3e58999683" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentTypeAxis_68306b59-f4c6-42a5-b5ce-bb1cda9e7589" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfInvestmentsTable_5b979a09-377b-4ef6-a06e-6a3e58999683" xlink:to="loc_us-gaap_InvestmentTypeAxis_68306b59-f4c6-42a5-b5ce-bb1cda9e7589" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentTypeCategorizationMember_68306b59-f4c6-42a5-b5ce-bb1cda9e7589_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentTypeCategorizationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InvestmentTypeAxis_68306b59-f4c6-42a5-b5ce-bb1cda9e7589" xlink:to="loc_us-gaap_InvestmentTypeCategorizationMember_68306b59-f4c6-42a5-b5ce-bb1cda9e7589_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentTypeCategorizationMember_bfda3e33-04d8-4940-a42f-631f309d0669" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentTypeCategorizationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InvestmentTypeAxis_68306b59-f4c6-42a5-b5ce-bb1cda9e7589" xlink:to="loc_us-gaap_InvestmentTypeCategorizationMember_bfda3e33-04d8-4940-a42f-631f309d0669" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_f33bcbf8-f26c-4a56-959d-ed2a61a1006d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_bfda3e33-04d8-4940-a42f-631f309d0669" xlink:to="loc_us-gaap_DebtSecuritiesMember_f33bcbf8-f26c-4a56-959d-ed2a61a1006d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesMember_e3ee9d5e-8308-4d6c-af17-c0457675b151" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_bfda3e33-04d8-4940-a42f-631f309d0669" xlink:to="loc_us-gaap_EquitySecuritiesMember_e3ee9d5e-8308-4d6c-af17-c0457675b151" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsMember_fe4e028d-016d-43e7-beb7-a13f1bf67bf8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_bfda3e33-04d8-4940-a42f-631f309d0669" xlink:to="loc_us-gaap_CashAndCashEquivalentsMember_fe4e028d-016d-43e7-beb7-a13f1bf67bf8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherDebtSecuritiesMember_e15626c9-94d2-4cc0-a17c-697b8ef7c0ee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_bfda3e33-04d8-4940-a42f-631f309d0669" xlink:to="loc_us-gaap_OtherDebtSecuritiesMember_e15626c9-94d2-4cc0-a17c-697b8ef7c0ee" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossInvestmentIncomeOperating_50f8bb39-3529-4fa2-a0f4-b3b9fec04fc5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GrossInvestmentIncomeOperating"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_8af3c55a-380e-43bd-b1e3-c3a6977b1d48" xlink:to="loc_us-gaap_GrossInvestmentIncomeOperating_50f8bb39-3529-4fa2-a0f4-b3b9fec04fc5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentIncomeInvestmentExpense_2f554db3-eec5-4bfb-9591-91e390f2a5bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentIncomeInvestmentExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_8af3c55a-380e-43bd-b1e3-c3a6977b1d48" xlink:to="loc_us-gaap_InvestmentIncomeInvestmentExpense_2f554db3-eec5-4bfb-9591-91e390f2a5bd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetInvestmentIncome_4dd10ef9-a35b-49a6-bac1-b25cbffc7971" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetInvestmentIncome"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ScheduleOfInvestmentsLineItems_8af3c55a-380e-43bd-b1e3-c3a6977b1d48" xlink:to="loc_us-gaap_NetInvestmentIncome_4dd10ef9-a35b-49a6-bac1-b25cbffc7971" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/FairValueMeasurementsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#FairValueMeasurementsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/FairValueMeasurementsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_472c19c6-215c-47e7-baaa-c5c9491a9bb2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_8d2a9e12-8e02-4c01-b246-133d19d98ba0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_472c19c6-215c-47e7-baaa-c5c9491a9bb2" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_8d2a9e12-8e02-4c01-b246-133d19d98ba0" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_a5682b7f-4779-4fe6-8da0-58ed3b4aca84" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_8d2a9e12-8e02-4c01-b246-133d19d98ba0" xlink:to="loc_us-gaap_FinancialInstrumentAxis_a5682b7f-4779-4fe6-8da0-58ed3b4aca84" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_a5682b7f-4779-4fe6-8da0-58ed3b4aca84_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_a5682b7f-4779-4fe6-8da0-58ed3b4aca84" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_a5682b7f-4779-4fe6-8da0-58ed3b4aca84_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_51cb49f8-36eb-4d71-8d8e-688f044ffdc4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_a5682b7f-4779-4fe6-8da0-58ed3b4aca84" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_51cb49f8-36eb-4d71-8d8e-688f044ffdc4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_51cb49f8-36eb-4d71-8d8e-688f044ffdc4" xlink:to="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_07f62f87-51eb-49ec-85a8-f8b08f5dd9da" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasuryAndGovernmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_07f62f87-51eb-49ec-85a8-f8b08f5dd9da" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_03697773-4e5c-4da6-97aa-d1af20841cd4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_03697773-4e5c-4da6-97aa-d1af20841cd4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateDebtSecuritiesMember_9f621dd9-e2e0-4188-9446-48b5475bfd77" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CorporateDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:to="loc_us-gaap_CorporateDebtSecuritiesMember_9f621dd9-e2e0-4188-9446-48b5475bfd77" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_635cee9d-8160-4d32-9859-f02b97d136a6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_635cee9d-8160-4d32-9859-f02b97d136a6" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ResidentialMortgageBackedSecuritiesMember_c9a74abc-a723-4b6c-b722-b8397ca84689" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ResidentialMortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:to="loc_us-gaap_ResidentialMortgageBackedSecuritiesMember_c9a74abc-a723-4b6c-b722-b8397ca84689" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialMortgageBackedSecuritiesMember_d8724c0a-4aea-4d19-9390-8d5a93cd38bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommercialMortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:to="loc_us-gaap_CommercialMortgageBackedSecuritiesMember_d8724c0a-4aea-4d19-9390-8d5a93cd38bd" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CollateralizedLoanObligationsMember_45bab264-82ae-4f3f-988c-dc33386695dc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CollateralizedLoanObligationsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:to="loc_us-gaap_CollateralizedLoanObligationsMember_45bab264-82ae-4f3f-988c-dc33386695dc" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignGovernmentDebtSecuritiesMember_72c2b3c5-261c-496c-adec-b4ec8966a919" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ForeignGovernmentDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:to="loc_us-gaap_ForeignGovernmentDebtSecuritiesMember_72c2b3c5-261c-496c-adec-b4ec8966a919" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialPaperMember_36328ef5-da3b-43ea-b5cf-72d53b7beae7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommercialPaperMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtSecuritiesMember_e8b61149-80e3-48ba-9f74-fd64ca96cb6c" xlink:to="loc_us-gaap_CommercialPaperMember_36328ef5-da3b-43ea-b5cf-72d53b7beae7" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesMember_83ab8749-5a07-4901-abe1-bb9017b44f9d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_51cb49f8-36eb-4d71-8d8e-688f044ffdc4" xlink:to="loc_us-gaap_EquitySecuritiesMember_83ab8749-5a07-4901-abe1-bb9017b44f9d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_324eb6eb-d214-41fe-b7a7-5a8666a96b92" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_8d2a9e12-8e02-4c01-b246-133d19d98ba0" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_324eb6eb-d214-41fe-b7a7-5a8666a96b92" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_324eb6eb-d214-41fe-b7a7-5a8666a96b92_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_324eb6eb-d214-41fe-b7a7-5a8666a96b92" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_324eb6eb-d214-41fe-b7a7-5a8666a96b92_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_a1ae240d-6b68-4e89-abad-bc10c59f146b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_324eb6eb-d214-41fe-b7a7-5a8666a96b92" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_a1ae240d-6b68-4e89-abad-bc10c59f146b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_ff8ee2b7-42bd-4f53-8092-1ebb88f604c4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel1Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_a1ae240d-6b68-4e89-abad-bc10c59f146b" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_ff8ee2b7-42bd-4f53-8092-1ebb88f604c4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_2dd25fff-002f-4ed3-8d6f-77af8c7233bb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_a1ae240d-6b68-4e89-abad-bc10c59f146b" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_2dd25fff-002f-4ed3-8d6f-77af8c7233bb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_bef361a6-8e94-4f5b-bf0e-0b0fe6984c61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_a1ae240d-6b68-4e89-abad-bc10c59f146b" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_bef361a6-8e94-4f5b-bf0e-0b0fe6984c61" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByAssetClassAxis_635adabe-f82a-43e0-8bc5-bb0f7d502de9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByAssetClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_8d2a9e12-8e02-4c01-b246-133d19d98ba0" xlink:to="loc_us-gaap_FairValueByAssetClassAxis_635adabe-f82a-43e0-8bc5-bb0f7d502de9" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_635adabe-f82a-43e0-8bc5-bb0f7d502de9_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_635adabe-f82a-43e0-8bc5-bb0f7d502de9" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_635adabe-f82a-43e0-8bc5-bb0f7d502de9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_422e3ac6-3c27-4955-8bdb-996746493d76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByAssetClassAxis_635adabe-f82a-43e0-8bc5-bb0f7d502de9" xlink:to="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_422e3ac6-3c27-4955-8bdb-996746493d76" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_RealEstateAcquiredMember_a55ba4a9-c92e-4005-b170-96aa5b607d18" xlink:href="mtg-20231231.xsd#mtg_RealEstateAcquiredMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsMeasuredOnRecurringBasisUnobservableInputReconciliationByAssetClassDomain_422e3ac6-3c27-4955-8bdb-996746493d76" xlink:to="loc_mtg_RealEstateAcquiredMember_a55ba4a9-c92e-4005-b170-96aa5b607d18" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_b3379a93-0829-4b8e-9a0b-100e7c32da61" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_472c19c6-215c-47e7-baaa-c5c9491a9bb2" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_b3379a93-0829-4b8e-9a0b-100e7c32da61" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesFvNi_984a0e36-ffd3-464d-b593-bdf0ef1e207c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesFvNi"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_472c19c6-215c-47e7-baaa-c5c9491a9bb2" xlink:to="loc_us-gaap_EquitySecuritiesFvNi_984a0e36-ffd3-464d-b593-bdf0ef1e207c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsFairValueDisclosure_e7df7c34-2bff-466c-abcd-1e4af01a1322" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherAssetsFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_472c19c6-215c-47e7-baaa-c5c9491a9bb2" xlink:to="loc_us-gaap_OtherAssetsFairValueDisclosure_e7df7c34-2bff-466c-abcd-1e4af01a1322" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsFairValueDisclosure_c54b22e0-d2e2-4393-b917-76d0e7b3550e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_472c19c6-215c-47e7-baaa-c5c9491a9bb2" xlink:to="loc_us-gaap_AssetsFairValueDisclosure_c54b22e0-d2e2-4393-b917-76d0e7b3550e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmbeddedDerivativeFairValueOfEmbeddedDerivativeNet_4207695b-28e2-45d7-bf5d-b978caea0bd7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmbeddedDerivativeFairValueOfEmbeddedDerivativeNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_472c19c6-215c-47e7-baaa-c5c9491a9bb2" xlink:to="loc_us-gaap_EmbeddedDerivativeFairValueOfEmbeddedDerivativeNet_4207695b-28e2-45d7-bf5d-b978caea0bd7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetPurchases_470dc258-798d-4606-bbef-238e3b68e82e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetPurchases"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_472c19c6-215c-47e7-baaa-c5c9491a9bb2" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetPurchases_470dc258-798d-4606-bbef-238e3b68e82e" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetSales_62f1d138-1d37-46eb-8945-93c1f63b7ce7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetSales"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_472c19c6-215c-47e7-baaa-c5c9491a9bb2" xlink:to="loc_us-gaap_FairValueMeasurementWithUnobservableInputsReconciliationRecurringBasisAssetSales_62f1d138-1d37-46eb-8945-93c1f63b7ce7" xlink:type="arc" order="6"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/FairValueMeasurementsAssetsandLiabilitiesNotMeasuredatFairValueDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#FairValueMeasurementsAssetsandLiabilitiesNotMeasuredatFairValueDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/FairValueMeasurementsAssetsandLiabilitiesNotMeasuredatFairValueDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_9ddfbd94-1062-40f4-b2d7-836fb37bbd89" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_7e3b61bd-7310-4af6-be9d-f835a81b5ffa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_9ddfbd94-1062-40f4-b2d7-836fb37bbd89" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_7e3b61bd-7310-4af6-be9d-f835a81b5ffa" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByMeasurementBasisAxis_2cf1ace7-d68c-49ff-8102-72ed621e80d2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByMeasurementBasisAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_7e3b61bd-7310-4af6-be9d-f835a81b5ffa" xlink:to="loc_us-gaap_FairValueByMeasurementBasisAxis_2cf1ace7-d68c-49ff-8102-72ed621e80d2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_2cf1ace7-d68c-49ff-8102-72ed621e80d2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PortionAtFairValueFairValueDisclosureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByMeasurementBasisAxis_2cf1ace7-d68c-49ff-8102-72ed621e80d2" xlink:to="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_2cf1ace7-d68c-49ff-8102-72ed621e80d2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueDisclosureItemAmountsDomain_79e98157-ba91-4ff2-a3bd-f8633a6e84a2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueDisclosureItemAmountsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByMeasurementBasisAxis_2cf1ace7-d68c-49ff-8102-72ed621e80d2" xlink:to="loc_us-gaap_FairValueDisclosureItemAmountsDomain_79e98157-ba91-4ff2-a3bd-f8633a6e84a2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_8db35fb0-d1d1-4aef-9601-202b893cad6c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PortionAtFairValueFairValueDisclosureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueDisclosureItemAmountsDomain_79e98157-ba91-4ff2-a3bd-f8633a6e84a2" xlink:to="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_8db35fb0-d1d1-4aef-9601-202b893cad6c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CarryingReportedAmountFairValueDisclosureMember_e17615b1-0391-43dd-b933-70a7b00ad793" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CarryingReportedAmountFairValueDisclosureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_8db35fb0-d1d1-4aef-9601-202b893cad6c" xlink:to="loc_us-gaap_CarryingReportedAmountFairValueDisclosureMember_e17615b1-0391-43dd-b933-70a7b00ad793" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EstimateOfFairValueFairValueDisclosureMember_d7a67824-841f-4794-92f0-de826616871d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EstimateOfFairValueFairValueDisclosureMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PortionAtFairValueFairValueDisclosureMember_8db35fb0-d1d1-4aef-9601-202b893cad6c" xlink:to="loc_us-gaap_EstimateOfFairValueFairValueDisclosureMember_d7a67824-841f-4794-92f0-de826616871d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_4b516940-8b73-46f4-847d-42eb064fc655" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_7e3b61bd-7310-4af6-be9d-f835a81b5ffa" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_4b516940-8b73-46f4-847d-42eb064fc655" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4b516940-8b73-46f4-847d-42eb064fc655_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_4b516940-8b73-46f4-847d-42eb064fc655" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_4b516940-8b73-46f4-847d-42eb064fc655_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_bd480701-7b8e-4e89-b687-0f8c19d9ff8e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_4b516940-8b73-46f4-847d-42eb064fc655" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_bd480701-7b8e-4e89-b687-0f8c19d9ff8e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_70091936-4394-4004-8559-5a64aba744d0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_bd480701-7b8e-4e89-b687-0f8c19d9ff8e" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_70091936-4394-4004-8559-5a64aba744d0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_40a3eb0e-0de3-4676-8da8-1002edabe255" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_7e3b61bd-7310-4af6-be9d-f835a81b5ffa" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_40a3eb0e-0de3-4676-8da8-1002edabe255" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_40a3eb0e-0de3-4676-8da8-1002edabe255_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_40a3eb0e-0de3-4676-8da8-1002edabe255" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_40a3eb0e-0de3-4676-8da8-1002edabe255_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_5d423f8e-2778-49a5-8434-b36784a50af0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_40a3eb0e-0de3-4676-8da8-1002edabe255" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_5d423f8e-2778-49a5-8434-b36784a50af0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeniorNotesMember_0e627024-cadc-4774-8f3c-a413d0b7b2f6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeniorNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_5d423f8e-2778-49a5-8434-b36784a50af0" xlink:to="loc_us-gaap_SeniorNotesMember_0e627024-cadc-4774-8f3c-a413d0b7b2f6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ConvertibleJuniorDebenturesat9perannumDue2063Member_821a0bad-bdd8-41dc-9974-6240af20876e" xlink:href="mtg-20231231.xsd#mtg_ConvertibleJuniorDebenturesat9perannumDue2063Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_5d423f8e-2778-49a5-8434-b36784a50af0" xlink:to="loc_mtg_ConvertibleJuniorDebenturesat9perannumDue2063Member_821a0bad-bdd8-41dc-9974-6240af20876e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_03b67219-edee-4d10-a7c5-bbf1f4f69c8b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_7e3b61bd-7310-4af6-be9d-f835a81b5ffa" xlink:to="loc_us-gaap_DebtInstrumentAxis_03b67219-edee-4d10-a7c5-bbf1f4f69c8b" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_03b67219-edee-4d10-a7c5-bbf1f4f69c8b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_03b67219-edee-4d10-a7c5-bbf1f4f69c8b" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_03b67219-edee-4d10-a7c5-bbf1f4f69c8b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_209e456f-8b1d-4864-91f8-a78e1b8278c8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_03b67219-edee-4d10-a7c5-bbf1f4f69c8b" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_209e456f-8b1d-4864-91f8-a78e1b8278c8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_FivePointTwoFivePercentSeniorNotesMember_6fffbdbd-2c49-42a2-8da2-3d426bb78e41" xlink:href="mtg-20231231.xsd#mtg_FivePointTwoFivePercentSeniorNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_209e456f-8b1d-4864-91f8-a78e1b8278c8" xlink:to="loc_mtg_FivePointTwoFivePercentSeniorNotesMember_6fffbdbd-2c49-42a2-8da2-3d426bb78e41" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_a0d34ce4-e4b6-4033-8b9b-ebc7772df1ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_9ddfbd94-1062-40f4-b2d7-836fb37bbd89" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_a0d34ce4-e4b6-4033-8b9b-ebc7772df1ec" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_OtherInvestedAssetsFairValueDisclosure_7b22ae9f-3fb8-475f-b047-3d9238cc2142" xlink:href="mtg-20231231.xsd#mtg_OtherInvestedAssetsFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_9ddfbd94-1062-40f4-b2d7-836fb37bbd89" xlink:to="loc_mtg_OtherInvestedAssetsFairValueDisclosure_7b22ae9f-3fb8-475f-b047-3d9238cc2142" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_SeniorNotesFairValueDisclosure_81fb44c3-a708-4286-81e8-ae45b45e2237" xlink:href="mtg-20231231.xsd#mtg_SeniorNotesFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_9ddfbd94-1062-40f4-b2d7-836fb37bbd89" xlink:to="loc_mtg_SeniorNotesFairValueDisclosure_81fb44c3-a708-4286-81e8-ae45b45e2237" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisSubordinatedDebtObligations_5ee8cd8d-a5b7-4a4f-8240-79308844eaa3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisSubordinatedDebtObligations"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_9ddfbd94-1062-40f4-b2d7-836fb37bbd89" xlink:to="loc_us-gaap_FairValueLiabilitiesMeasuredOnRecurringBasisSubordinatedDebtObligations_5ee8cd8d-a5b7-4a4f-8240-79308844eaa3" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentFairValue_d26b650a-6961-4cca-b434-c64a64302e5b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_9ddfbd94-1062-40f4-b2d7-836fb37bbd89" xlink:to="loc_us-gaap_DebtInstrumentFairValue_d26b650a-6961-4cca-b434-c64a64302e5b" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/DebtSummaryofObligationsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#DebtSummaryofObligationsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/DebtSummaryofObligationsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_d05312f4-fb8d-4f3e-a71a-c8d170e23ee2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_424e86bd-973f-40a4-9ba3-b3011098abea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_d05312f4-fb8d-4f3e-a71a-c8d170e23ee2" xlink:to="loc_us-gaap_DebtInstrumentTable_424e86bd-973f-40a4-9ba3-b3011098abea" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_40c0fdb1-3fa7-49c9-be35-1b593e169e0b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_424e86bd-973f-40a4-9ba3-b3011098abea" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_40c0fdb1-3fa7-49c9-be35-1b593e169e0b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_40c0fdb1-3fa7-49c9-be35-1b593e169e0b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_40c0fdb1-3fa7-49c9-be35-1b593e169e0b" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_40c0fdb1-3fa7-49c9-be35-1b593e169e0b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_7012e73c-e4d9-4f32-b68f-9b0f89cd4855" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_40c0fdb1-3fa7-49c9-be35-1b593e169e0b" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_7012e73c-e4d9-4f32-b68f-9b0f89cd4855" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeniorNotesMember_369d7eb1-44a0-40a1-9cd3-ec308bec580b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeniorNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_7012e73c-e4d9-4f32-b68f-9b0f89cd4855" xlink:to="loc_us-gaap_SeniorNotesMember_369d7eb1-44a0-40a1-9cd3-ec308bec580b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConvertibleSubordinatedDebtMember_d7b15754-968f-4b75-8747-5d2e89b06237" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConvertibleSubordinatedDebtMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_7012e73c-e4d9-4f32-b68f-9b0f89cd4855" xlink:to="loc_us-gaap_ConvertibleSubordinatedDebtMember_d7b15754-968f-4b75-8747-5d2e89b06237" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_d338f675-1c45-4026-9434-7942b60849db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_424e86bd-973f-40a4-9ba3-b3011098abea" xlink:to="loc_us-gaap_DebtInstrumentAxis_d338f675-1c45-4026-9434-7942b60849db" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_d338f675-1c45-4026-9434-7942b60849db_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_d338f675-1c45-4026-9434-7942b60849db" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_d338f675-1c45-4026-9434-7942b60849db_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_543f8af2-fc0e-4748-90e8-a0fbb8dc23b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_d338f675-1c45-4026-9434-7942b60849db" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_543f8af2-fc0e-4748-90e8-a0fbb8dc23b2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_FivePointTwoFivePercentSeniorNotesMember_52d20cd8-6e9b-4109-94d8-18454e8ac603" xlink:href="mtg-20231231.xsd#mtg_FivePointTwoFivePercentSeniorNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_543f8af2-fc0e-4748-90e8-a0fbb8dc23b2" xlink:to="loc_mtg_FivePointTwoFivePercentSeniorNotesMember_52d20cd8-6e9b-4109-94d8-18454e8ac603" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_bfcc645e-b49b-4fad-9b35-e11a649854aa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_d05312f4-fb8d-4f3e-a71a-c8d170e23ee2" xlink:to="loc_us-gaap_LongTermDebt_bfcc645e-b49b-4fad-9b35-e11a649854aa" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/DebtDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#DebtDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/DebtDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_5d68d1ee-d3a8-42de-8e1b-e65e11f458d9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_DebtInstrumentTable_5d68d1ee-d3a8-42de-8e1b-e65e11f458d9" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_8cacc413-9a39-45a9-bb12-3a9efc859471" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_5d68d1ee-d3a8-42de-8e1b-e65e11f458d9" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_8cacc413-9a39-45a9-bb12-3a9efc859471" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_8cacc413-9a39-45a9-bb12-3a9efc859471_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_8cacc413-9a39-45a9-bb12-3a9efc859471" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_8cacc413-9a39-45a9-bb12-3a9efc859471_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_ebcb7cf5-208d-4ab9-97e4-4b6906ba799b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_8cacc413-9a39-45a9-bb12-3a9efc859471" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_ebcb7cf5-208d-4ab9-97e4-4b6906ba799b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConvertibleSubordinatedDebtMember_71755cb4-8a4c-4949-8acf-b545a68f6d34" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConvertibleSubordinatedDebtMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_ebcb7cf5-208d-4ab9-97e4-4b6906ba799b" xlink:to="loc_us-gaap_ConvertibleSubordinatedDebtMember_71755cb4-8a4c-4949-8acf-b545a68f6d34" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalHomeLoanBankAdvancesMember_a9f5b67d-c9be-425d-8b53-1ba4018a2d2c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FederalHomeLoanBankAdvancesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_ebcb7cf5-208d-4ab9-97e4-4b6906ba799b" xlink:to="loc_us-gaap_FederalHomeLoanBankAdvancesMember_a9f5b67d-c9be-425d-8b53-1ba4018a2d2c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeniorNotesMember_10dd88fb-db65-4e02-a328-118647edb8c8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeniorNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_ebcb7cf5-208d-4ab9-97e4-4b6906ba799b" xlink:to="loc_us-gaap_SeniorNotesMember_10dd88fb-db65-4e02-a328-118647edb8c8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_b5f8f183-7d5a-4651-96b6-0de53f13dbc2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_5d68d1ee-d3a8-42de-8e1b-e65e11f458d9" xlink:to="loc_us-gaap_DebtInstrumentAxis_b5f8f183-7d5a-4651-96b6-0de53f13dbc2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_b5f8f183-7d5a-4651-96b6-0de53f13dbc2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_b5f8f183-7d5a-4651-96b6-0de53f13dbc2" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_b5f8f183-7d5a-4651-96b6-0de53f13dbc2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_9c8fc2dc-2527-400d-8561-c84dba1cc00c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_b5f8f183-7d5a-4651-96b6-0de53f13dbc2" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_9c8fc2dc-2527-400d-8561-c84dba1cc00c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_FivePointSevenFivePercentSeniorNotesMember_8daa450a-3cf1-4853-afa2-680219b883d7" xlink:href="mtg-20231231.xsd#mtg_FivePointSevenFivePercentSeniorNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9c8fc2dc-2527-400d-8561-c84dba1cc00c" xlink:to="loc_mtg_FivePointSevenFivePercentSeniorNotesMember_8daa450a-3cf1-4853-afa2-680219b883d7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_FivePointTwoFivePercentSeniorNotesMember_ac05703f-3492-4aff-a922-235574089b99" xlink:href="mtg-20231231.xsd#mtg_FivePointTwoFivePercentSeniorNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_9c8fc2dc-2527-400d-8561-c84dba1cc00c" xlink:to="loc_mtg_FivePointTwoFivePercentSeniorNotesMember_ac05703f-3492-4aff-a922-235574089b99" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodAxis_8bb67e1f-3a62-4ab5-a2bb-2df830aa5449" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_5d68d1ee-d3a8-42de-8e1b-e65e11f458d9" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodAxis_8bb67e1f-3a62-4ab5-a2bb-2df830aa5449" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_8bb67e1f-3a62-4ab5-a2bb-2df830aa5449_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodAxis_8bb67e1f-3a62-4ab5-a2bb-2df830aa5449" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_8bb67e1f-3a62-4ab5-a2bb-2df830aa5449_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_0b2e0de7-b800-4a93-bc5c-a2d82245e992" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodAxis_8bb67e1f-3a62-4ab5-a2bb-2df830aa5449" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_0b2e0de7-b800-4a93-bc5c-a2d82245e992" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodTwoMember_09b4c626-975b-42b3-9126-0d37eb3fce65" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodTwoMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_0b2e0de7-b800-4a93-bc5c-a2d82245e992" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodTwoMember_09b4c626-975b-42b3-9126-0d37eb3fce65" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodThreeMember_1f1241de-aac1-4cc8-8afc-159527383cfd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodThreeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_0b2e0de7-b800-4a93-bc5c-a2d82245e992" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodThreeMember_1f1241de-aac1-4cc8-8afc-159527383cfd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPeriodFourMember_13fd9fd6-1ff7-4f59-a834-02995d982551" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPeriodFourMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentRedemptionPeriodDomain_0b2e0de7-b800-4a93-bc5c-a2d82245e992" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPeriodFourMember_13fd9fd6-1ff7-4f59-a834-02995d982551" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateAxis_1379bd3c-a899-41ea-941b-e0257edb1105" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableRateAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_5d68d1ee-d3a8-42de-8e1b-e65e11f458d9" xlink:to="loc_us-gaap_VariableRateAxis_1379bd3c-a899-41ea-941b-e0257edb1105" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateDomain_1379bd3c-a899-41ea-941b-e0257edb1105_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableRateDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VariableRateAxis_1379bd3c-a899-41ea-941b-e0257edb1105" xlink:to="loc_us-gaap_VariableRateDomain_1379bd3c-a899-41ea-941b-e0257edb1105_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateDomain_6ee15043-e36a-4b12-8a94-48bff2c26656" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableRateDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VariableRateAxis_1379bd3c-a899-41ea-941b-e0257edb1105" xlink:to="loc_us-gaap_VariableRateDomain_6ee15043-e36a-4b12-8a94-48bff2c26656" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UsTreasuryUstInterestRateMember_b429d3fd-7c4a-48cc-9a89-1753c15226bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_UsTreasuryUstInterestRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_6ee15043-e36a-4b12-8a94-48bff2c26656" xlink:to="loc_us-gaap_UsTreasuryUstInterestRateMember_b429d3fd-7c4a-48cc-9a89-1753c15226bc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_70ee7d20-d499-4740-b03e-85a30b4e181e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_70ee7d20-d499-4740-b03e-85a30b4e181e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ExtinguishmentOfDebtAmount_9f04e4ed-a608-4c3f-8c31-dfec17aab549" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ExtinguishmentOfDebtAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_ExtinguishmentOfDebtAmount_9f04e4ed-a608-4c3f-8c31-dfec17aab549" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DebtInstrumentConvertibleNumberOfEquityInstrumentsIfDebtConverted_09c76fbc-7252-4da5-a572-5f3d7340a682" xlink:href="mtg-20231231.xsd#mtg_DebtInstrumentConvertibleNumberOfEquityInstrumentsIfDebtConverted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_mtg_DebtInstrumentConvertibleNumberOfEquityInstrumentsIfDebtConverted_09c76fbc-7252-4da5-a572-5f3d7340a682" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PrincipalAmountOfNotesUsedInDeterminingConversionRate_4528a4fb-1dcf-4957-862c-7e3ed38d9f40" xlink:href="mtg-20231231.xsd#mtg_PrincipalAmountOfNotesUsedInDeterminingConversionRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_mtg_PrincipalAmountOfNotesUsedInDeterminingConversionRate_4528a4fb-1dcf-4957-862c-7e3ed38d9f40" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfLongTermDebt_85851017-31fc-4608-8ad1-9f0f9377f082" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfLongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_RepaymentsOfLongTermDebt_85851017-31fc-4608-8ad1-9f0f9377f082" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AdjustmentsToAdditionalPaidInCapitalConversionOfConvertibleDebt_77c6f587-7f11-42f0-949f-2ad3a8d955fe" xlink:href="mtg-20231231.xsd#mtg_AdjustmentsToAdditionalPaidInCapitalConversionOfConvertibleDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_mtg_AdjustmentsToAdditionalPaidInCapitalConversionOfConvertibleDebt_77c6f587-7f11-42f0-949f-2ad3a8d955fe" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_5bf7582b-72f9-4c65-a824-aa084d06c42a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_5bf7582b-72f9-4c65-a824-aa084d06c42a" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DilutiveSecuritiesReductionInPotentiallyDilutiveSharesDueToDebtExtinguishment_67a1bde5-3e83-4d3f-8aeb-8574711f7c93" xlink:href="mtg-20231231.xsd#mtg_DilutiveSecuritiesReductionInPotentiallyDilutiveSharesDueToDebtExtinguishment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_mtg_DilutiveSecuritiesReductionInPotentiallyDilutiveSharesDueToDebtExtinguishment_67a1bde5-3e83-4d3f-8aeb-8574711f7c93" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalHomeLoanBankAdvancesGeneralDebtObligationsDisclosuresRepaymentAndPenalties_3d71b5ff-5777-4d52-824e-d9f72dd68f25" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FederalHomeLoanBankAdvancesGeneralDebtObligationsDisclosuresRepaymentAndPenalties"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_FederalHomeLoanBankAdvancesGeneralDebtObligationsDisclosuresRepaymentAndPenalties_3d71b5ff-5777-4d52-824e-d9f72dd68f25" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentFaceAmount_9db16af9-8efb-45ce-99c2-a469919391c7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentFaceAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_DebtInstrumentFaceAmount_9db16af9-8efb-45ce-99c2-a469919391c7" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarlyRepaymentOfSeniorDebt_521597e2-c94b-4877-86c1-8f055aec154d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarlyRepaymentOfSeniorDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_EarlyRepaymentOfSeniorDebt_521597e2-c94b-4877-86c1-8f055aec154d" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentRedemptionPricePercentage_dae1d050-e574-43ff-a4b7-d1a3046aadfb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentRedemptionPricePercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_DebtInstrumentRedemptionPricePercentage_dae1d050-e574-43ff-a4b7-d1a3046aadfb" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DebtInstrumentOwnershipPercentageThresholdDeclarationOfDueAndPayable_c0cd4535-fbc0-46e9-8218-b1d965d98dd8" xlink:href="mtg-20231231.xsd#mtg_DebtInstrumentOwnershipPercentageThresholdDeclarationOfDueAndPayable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_mtg_DebtInstrumentOwnershipPercentageThresholdDeclarationOfDueAndPayable_c0cd4535-fbc0-46e9-8218-b1d965d98dd8" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPaid_a63a798a-5aa3-495d-8bc8-46c497a14928" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestPaid"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_InterestPaid_a63a798a-5aa3-495d-8bc8-46c497a14928" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_57b0e176-8586-4dc2-9ef3-207c78d224b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentBasisSpreadOnVariableRate1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_e21e8cb9-ab03-4f2f-bc47-afbe3825f4aa" xlink:to="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_57b0e176-8586-4dc2-9ef3-207c78d224b2" xlink:type="arc" order="14"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/LossReservesNarrativeDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#LossReservesNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/LossReservesNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CausesOfIncreaseDecreaseInLiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseLineItems_a073dec5-6a29-4ba5-9656-a65969c6a82f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CausesOfIncreaseDecreaseInLiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CausesOfIncreaseDecreaseInLiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseTable_022c6177-4ecc-4c2f-9a88-aa025f14994f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CausesOfIncreaseDecreaseInLiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_CausesOfIncreaseDecreaseInLiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseLineItems_a073dec5-6a29-4ba5-9656-a65969c6a82f" xlink:to="loc_us-gaap_CausesOfIncreaseDecreaseInLiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseTable_022c6177-4ecc-4c2f-9a88-aa025f14994f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoncatastrophicEventAxis_8dd0004e-ab58-4273-8618-e2aec809a729" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoncatastrophicEventAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_CausesOfIncreaseDecreaseInLiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseTable_022c6177-4ecc-4c2f-9a88-aa025f14994f" xlink:to="loc_us-gaap_NoncatastrophicEventAxis_8dd0004e-ab58-4273-8618-e2aec809a729" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoncatastrophicEventDomain_8dd0004e-ab58-4273-8618-e2aec809a729_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoncatastrophicEventDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_NoncatastrophicEventAxis_8dd0004e-ab58-4273-8618-e2aec809a729" xlink:to="loc_us-gaap_NoncatastrophicEventDomain_8dd0004e-ab58-4273-8618-e2aec809a729_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoncatastrophicEventDomain_de4ba764-771e-41aa-b4fb-a7374d930320" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoncatastrophicEventDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_NoncatastrophicEventAxis_8dd0004e-ab58-4273-8618-e2aec809a729" xlink:to="loc_us-gaap_NoncatastrophicEventDomain_de4ba764-771e-41aa-b4fb-a7374d930320" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_A1000IncreaseDecreaseInAverageSeverityReserveFactorMember_9036b0ac-3609-4a52-9111-5785ce547c34" xlink:href="mtg-20231231.xsd#mtg_A1000IncreaseDecreaseInAverageSeverityReserveFactorMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NoncatastrophicEventDomain_de4ba764-771e-41aa-b4fb-a7374d930320" xlink:to="loc_mtg_A1000IncreaseDecreaseInAverageSeverityReserveFactorMember_9036b0ac-3609-4a52-9111-5785ce547c34" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_OnePercentagePointIncreaseDecreaseInAverageClaimRateReserveFactorMember_7da09b70-0331-440a-a3ad-ec05c376483c" xlink:href="mtg-20231231.xsd#mtg_OnePercentagePointIncreaseDecreaseInAverageClaimRateReserveFactorMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NoncatastrophicEventDomain_de4ba764-771e-41aa-b4fb-a7374d930320" xlink:to="loc_mtg_OnePercentagePointIncreaseDecreaseInAverageClaimRateReserveFactorMember_7da09b70-0331-440a-a3ad-ec05c376483c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_989bc42f-e727-4b4a-b124-ad30065d9117" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CausesOfIncreaseDecreaseInLiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseLineItems_a073dec5-6a29-4ba5-9656-a65969c6a82f" xlink:to="loc_us-gaap_IncreaseDecreaseInLiabilityForClaimsAndClaimsAdjustmentExpenseReserve_989bc42f-e727-4b4a-b124-ad30065d9117" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_0108e880-542e-40b6-90fd-4fb7366074a8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CausesOfIncreaseDecreaseInLiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseLineItems_a073dec5-6a29-4ba5-9656-a65969c6a82f" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_0108e880-542e-40b6-90fd-4fb7366074a8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PremiumRefundLiabilityExpectedClaimPayments_a0f5451f-f9ce-4271-8bc8-13977c11cf6e" xlink:href="mtg-20231231.xsd#mtg_PremiumRefundLiabilityExpectedClaimPayments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CausesOfIncreaseDecreaseInLiabilityForUnpaidClaimsAndClaimsAdjustmentExpenseLineItems_a073dec5-6a29-4ba5-9656-a65969c6a82f" xlink:to="loc_mtg_PremiumRefundLiabilityExpectedClaimPayments_a0f5451f-f9ce-4271-8bc8-13977c11cf6e" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/LossReservesPriorYearLossReservesDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#LossReservesPriorYearLossReservesDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/LossReservesPriorYearLossReservesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_bd519812-f1cb-4050-9ed7-b9f299d958e7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseTable_b0fc28dc-ccb6-4b48-86f2-d1a25a966a90" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_bd519812-f1cb-4050-9ed7-b9f299d958e7" xlink:to="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseTable_b0fc28dc-ccb6-4b48-86f2-d1a25a966a90" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoncatastrophicEventAxis_e9055ba4-0c27-459e-a74d-7f3760a925c9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoncatastrophicEventAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseTable_b0fc28dc-ccb6-4b48-86f2-d1a25a966a90" xlink:to="loc_us-gaap_NoncatastrophicEventAxis_e9055ba4-0c27-459e-a74d-7f3760a925c9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoncatastrophicEventDomain_e9055ba4-0c27-459e-a74d-7f3760a925c9_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoncatastrophicEventDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_NoncatastrophicEventAxis_e9055ba4-0c27-459e-a74d-7f3760a925c9" xlink:to="loc_us-gaap_NoncatastrophicEventDomain_e9055ba4-0c27-459e-a74d-7f3760a925c9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NoncatastrophicEventDomain_6338f40c-7ed3-4c74-886f-a34fed5b688d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NoncatastrophicEventDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_NoncatastrophicEventAxis_e9055ba4-0c27-459e-a74d-7f3760a925c9" xlink:to="loc_us-gaap_NoncatastrophicEventDomain_6338f40c-7ed3-4c74-886f-a34fed5b688d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_IncreaseDecreaseInExpectedClaimRateMember_00dfb6e3-0a0c-4e19-9db1-9dfa48ae6809" xlink:href="mtg-20231231.xsd#mtg_IncreaseDecreaseInExpectedClaimRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NoncatastrophicEventDomain_6338f40c-7ed3-4c74-886f-a34fed5b688d" xlink:to="loc_mtg_IncreaseDecreaseInExpectedClaimRateMember_00dfb6e3-0a0c-4e19-9db1-9dfa48ae6809" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_IncreaseDecreaseRelatedToPoolReservesLAEReservesAndReinsuranceMember_a00d3b83-c458-4406-b959-bb66d06d4dfd" xlink:href="mtg-20231231.xsd#mtg_IncreaseDecreaseRelatedToPoolReservesLAEReservesAndReinsuranceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NoncatastrophicEventDomain_6338f40c-7ed3-4c74-886f-a34fed5b688d" xlink:to="loc_mtg_IncreaseDecreaseRelatedToPoolReservesLAEReservesAndReinsuranceMember_a00d3b83-c458-4406-b959-bb66d06d4dfd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_b8c9b22a-4f7e-42f9-81a8-2ea51c5783ba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilityForClaimsAndClaimsAdjustmentExpenseLineItems_bd519812-f1cb-4050-9ed7-b9f299d958e7" xlink:to="loc_us-gaap_SupplementalInformationForPropertyCasualtyInsuranceUnderwritersPriorYearClaimsAndClaimsAdjustmentExpense_b8c9b22a-4f7e-42f9-81a8-2ea51c5783ba" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/ReinsuranceSummaryofReinsuranceAgreementsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#ReinsuranceSummaryofReinsuranceAgreementsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/ReinsuranceSummaryofReinsuranceAgreementsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectsOfReinsuranceLineItems_c99639ee-e473-4b16-87b1-080a161bb735" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectsOfReinsuranceLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectsOfReinsuranceTable_60039de4-0976-45dd-9618-345f2d70467d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectsOfReinsuranceTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_c99639ee-e473-4b16-87b1-080a161bb735" xlink:to="loc_us-gaap_EffectsOfReinsuranceTable_60039de4-0976-45dd-9618-345f2d70467d" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductOrServiceAxis_f4a22299-863f-416c-9c4d-6eae4f3cc4b2" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_EffectsOfReinsuranceTable_60039de4-0976-45dd-9618-345f2d70467d" xlink:to="loc_srt_ProductOrServiceAxis_f4a22299-863f-416c-9c4d-6eae4f3cc4b2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_f4a22299-863f-416c-9c4d-6eae4f3cc4b2_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ProductOrServiceAxis_f4a22299-863f-416c-9c4d-6eae4f3cc4b2" xlink:to="loc_srt_ProductsAndServicesDomain_f4a22299-863f-416c-9c4d-6eae4f3cc4b2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ProductsAndServicesDomain_296397e2-324a-4dcf-a26f-bca1262b370d" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ProductsAndServicesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ProductOrServiceAxis_f4a22299-863f-416c-9c4d-6eae4f3cc4b2" xlink:to="loc_srt_ProductsAndServicesDomain_296397e2-324a-4dcf-a26f-bca1262b370d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransactionsMember_bdd9f1b7-db1f-4fc6-9d44-678f29340f51" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransactionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_296397e2-324a-4dcf-a26f-bca1262b370d" xlink:to="loc_mtg_QuotaShareReinsuranceTransactionsMember_bdd9f1b7-db1f-4fc6-9d44-678f29340f51" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ExcessOfLossReinsuranceTransactionsMember_88ab380a-f381-4fd5-95be-40582cb2536c" xlink:href="mtg-20231231.xsd#mtg_ExcessOfLossReinsuranceTransactionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ProductsAndServicesDomain_296397e2-324a-4dcf-a26f-bca1262b370d" xlink:to="loc_mtg_ExcessOfLossReinsuranceTransactionsMember_88ab380a-f381-4fd5-95be-40582cb2536c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsurancePremiumsForInsuranceCompaniesByProductSegmentNetAmountAbstract_8797b594-1cf3-4b56-add9-365d5e785290" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsurancePremiumsForInsuranceCompaniesByProductSegmentNetAmountAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_c99639ee-e473-4b16-87b1-080a161bb735" xlink:to="loc_us-gaap_ReinsurancePremiumsForInsuranceCompaniesByProductSegmentNetAmountAbstract_8797b594-1cf3-4b56-add9-365d5e785290" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DirectPremiumsEarned_db745bb0-e19f-4dbb-861c-b6387ea4831f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DirectPremiumsEarned"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ReinsurancePremiumsForInsuranceCompaniesByProductSegmentNetAmountAbstract_8797b594-1cf3-4b56-add9-365d5e785290" xlink:to="loc_us-gaap_DirectPremiumsEarned_db745bb0-e19f-4dbb-861c-b6387ea4831f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssumedPremiumsEarned_b9e2d945-5149-4b71-8dee-e6201e74d47d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssumedPremiumsEarned"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ReinsurancePremiumsForInsuranceCompaniesByProductSegmentNetAmountAbstract_8797b594-1cf3-4b56-add9-365d5e785290" xlink:to="loc_us-gaap_AssumedPremiumsEarned_b9e2d945-5149-4b71-8dee-e6201e74d47d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededPremiumsEarned_387f1811-35b1-464f-9a5f-5beba25157f0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededPremiumsEarned"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ReinsurancePremiumsForInsuranceCompaniesByProductSegmentNetAmountAbstract_8797b594-1cf3-4b56-add9-365d5e785290" xlink:to="loc_us-gaap_CededPremiumsEarned_387f1811-35b1-464f-9a5f-5beba25157f0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PremiumsEarnedNet_f5bfcb01-0bd3-4f8a-84c5-74a44fe1f9ec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PremiumsEarnedNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ReinsurancePremiumsForInsuranceCompaniesByProductSegmentNetAmountAbstract_8797b594-1cf3-4b56-add9-365d5e785290" xlink:to="loc_us-gaap_PremiumsEarnedNet_f5bfcb01-0bd3-4f8a-84c5-74a44fe1f9ec" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNetAbstract_4d6dd830-a34c-4234-a714-8e1d079dbec9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PolicyholderBenefitsAndClaimsIncurredNetAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_c99639ee-e473-4b16-87b1-080a161bb735" xlink:to="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNetAbstract_4d6dd830-a34c-4234-a714-8e1d079dbec9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredGross_bc543932-c268-4910-a643-8a1b7433c55d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PolicyholderBenefitsAndClaimsIncurredGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNetAbstract_4d6dd830-a34c-4234-a714-8e1d079dbec9" xlink:to="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredGross_bc543932-c268-4910-a643-8a1b7433c55d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountAssumed_c6ba1260-c73c-4cad-b5a8-7f114815b436" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountAssumed"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNetAbstract_4d6dd830-a34c-4234-a714-8e1d079dbec9" xlink:to="loc_us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountAssumed_c6ba1260-c73c-4cad-b5a8-7f114815b436" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountCeded_b37a0172-94cd-4f58-b6e3-102f9932ef5a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountCeded"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNetAbstract_4d6dd830-a34c-4234-a714-8e1d079dbec9" xlink:to="loc_us-gaap_ReinsuranceEffectOnClaimsAndBenefitsIncurredAmountCeded_b37a0172-94cd-4f58-b6e3-102f9932ef5a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNet_f9c5d97b-ae60-492c-ba7a-1bdd4c07d3c0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PolicyholderBenefitsAndClaimsIncurredNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNetAbstract_4d6dd830-a34c-4234-a714-8e1d079dbec9" xlink:to="loc_us-gaap_PolicyholderBenefitsAndClaimsIncurredNet_f9c5d97b-ae60-492c-ba7a-1bdd4c07d3c0" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceProfitCommission_d064f35a-0d15-408f-9046-4ac43e5c9b71" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceProfitCommission"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_c99639ee-e473-4b16-87b1-080a161bb735" xlink:to="loc_mtg_ReinsuranceProfitCommission_d064f35a-0d15-408f-9046-4ac43e5c9b71" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceCedingCommissionEarned_b259e9a2-92ac-46c6-9b23-dcbab80d45a5" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceCedingCommissionEarned"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_c99639ee-e473-4b16-87b1-080a161bb735" xlink:to="loc_mtg_ReinsuranceCedingCommissionEarned_b259e9a2-92ac-46c6-9b23-dcbab80d45a5" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/ReinsuranceNarrativeDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#ReinsuranceNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/ReinsuranceNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectsOfReinsuranceLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectsOfReinsuranceTable_3daebe3f-736b-4cf3-94b3-e2481235f460" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectsOfReinsuranceTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_us-gaap_EffectsOfReinsuranceTable_3daebe3f-736b-4cf3-94b3-e2481235f460" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LegalEntityAxis_74ea3ce7-bb85-4144-bddb-a9f8c4b23117" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_LegalEntityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_EffectsOfReinsuranceTable_3daebe3f-736b-4cf3-94b3-e2481235f460" xlink:to="loc_dei_LegalEntityAxis_74ea3ce7-bb85-4144-bddb-a9f8c4b23117" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_74ea3ce7-bb85-4144-bddb-a9f8c4b23117_default" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_74ea3ce7-bb85-4144-bddb-a9f8c4b23117" xlink:to="loc_dei_EntityDomain_74ea3ce7-bb85-4144-bddb-a9f8c4b23117_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_c600a26f-f723-4115-b9e5-3f5ccec723f5" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_74ea3ce7-bb85-4144-bddb-a9f8c4b23117" xlink:to="loc_dei_EntityDomain_c600a26f-f723-4115-b9e5-3f5ccec723f5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20191Member_13003ac6-addb-455a-a2da-0a2b8f0572eb" xlink:href="mtg-20231231.xsd#mtg_HomeRe20191Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_c600a26f-f723-4115-b9e5-3f5ccec723f5" xlink:to="loc_mtg_HomeRe20191Member_13003ac6-addb-455a-a2da-0a2b8f0572eb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20211Member_21320f62-d660-4db2-90d9-cbebab6653bf" xlink:href="mtg-20231231.xsd#mtg_HomeRe20211Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_c600a26f-f723-4115-b9e5-3f5ccec723f5" xlink:to="loc_mtg_HomeRe20211Member_21320f62-d660-4db2-90d9-cbebab6653bf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20212Member_93c3c4df-161b-4a00-94a5-a4421808577a" xlink:href="mtg-20231231.xsd#mtg_HomeRe20212Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_c600a26f-f723-4115-b9e5-3f5ccec723f5" xlink:to="loc_mtg_HomeRe20212Member_93c3c4df-161b-4a00-94a5-a4421808577a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRespecialpurposeinsurersMember_b6e8080c-1e0b-44f1-83f2-3da4a3e9e96b" xlink:href="mtg-20231231.xsd#mtg_HomeRespecialpurposeinsurersMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_c600a26f-f723-4115-b9e5-3f5ccec723f5" xlink:to="loc_mtg_HomeRespecialpurposeinsurersMember_b6e8080c-1e0b-44f1-83f2-3da4a3e9e96b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededCreditRiskAxis_362fd8dc-1648-40ae-ba8c-a676521c6ec7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededCreditRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_EffectsOfReinsuranceTable_3daebe3f-736b-4cf3-94b3-e2481235f460" xlink:to="loc_us-gaap_CededCreditRiskAxis_362fd8dc-1648-40ae-ba8c-a676521c6ec7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededCreditRiskReinsurerDomain_362fd8dc-1648-40ae-ba8c-a676521c6ec7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededCreditRiskReinsurerDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CededCreditRiskAxis_362fd8dc-1648-40ae-ba8c-a676521c6ec7" xlink:to="loc_us-gaap_CededCreditRiskReinsurerDomain_362fd8dc-1648-40ae-ba8c-a676521c6ec7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededCreditRiskReinsurerDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CededCreditRiskAxis_362fd8dc-1648-40ae-ba8c-a676521c6ec7" xlink:to="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransactionsMember_3638328e-ec7e-4dcf-b7dc-e501cfcb220e" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransactionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:to="loc_mtg_QuotaShareReinsuranceTransactionsMember_3638328e-ec7e-4dcf-b7dc-e501cfcb220e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_CreditUnionQuotaShareReinsuranceTransactionMember_4d4e67fa-ca9b-4d23-9e5c-b5d35f08f284" xlink:href="mtg-20231231.xsd#mtg_CreditUnionQuotaShareReinsuranceTransactionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:to="loc_mtg_CreditUnionQuotaShareReinsuranceTransactionMember_4d4e67fa-ca9b-4d23-9e5c-b5d35f08f284" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransaction2020Member_375fe0c3-0ecf-4dbe-ad04-97b3640ea442" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransaction2020Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:to="loc_mtg_QuotaShareReinsuranceTransaction2020Member_375fe0c3-0ecf-4dbe-ad04-97b3640ea442" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransaction2020And20212020NIWMember_9835c1c9-99d8-4793-bf4d-dea4de440474" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransaction2020And20212020NIWMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:to="loc_mtg_QuotaShareReinsuranceTransaction2020And20212020NIWMember_9835c1c9-99d8-4793-bf4d-dea4de440474" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransaction2019Member_a7bc82fc-09ff-4c95-b10c-261469d02ded" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransaction2019Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:to="loc_mtg_QuotaShareReinsuranceTransaction2019Member_a7bc82fc-09ff-4c95-b10c-261469d02ded" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransactions20152019Member_8db3cdc5-d0aa-431f-8edf-2796fbc98352" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransactions20152019Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:to="loc_mtg_QuotaShareReinsuranceTransactions20152019Member_8db3cdc5-d0aa-431f-8edf-2796fbc98352" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransactions20172018Member_089c6bb9-c5a9-488f-a5cc-25228da39467" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransactions20172018Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:to="loc_mtg_QuotaShareReinsuranceTransactions20172018Member_089c6bb9-c5a9-488f-a5cc-25228da39467" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20191HomeRe20211AndHomeRe20212Member_0fab598d-26eb-49fc-bd24-a006790016bd" xlink:href="mtg-20231231.xsd#mtg_HomeRe20191HomeRe20211AndHomeRe20212Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:to="loc_mtg_HomeRe20191HomeRe20211AndHomeRe20212Member_0fab598d-26eb-49fc-bd24-a006790016bd" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ExcessOfLossReinsuranceTransactionsHomeReTransactionsMember_aca6f105-7191-4a44-ab0e-b18eea80ebd2" xlink:href="mtg-20231231.xsd#mtg_ExcessOfLossReinsuranceTransactionsHomeReTransactionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_397245ce-1973-494a-9298-f26bf0d827bf" xlink:to="loc_mtg_ExcessOfLossReinsuranceTransactionsHomeReTransactionsMember_aca6f105-7191-4a44-ab0e-b18eea80ebd2" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementScenarioAxis_e83a8e4e-36aa-4021-8444-cda2698e5b1b" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_StatementScenarioAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_EffectsOfReinsuranceTable_3daebe3f-736b-4cf3-94b3-e2481235f460" xlink:to="loc_srt_StatementScenarioAxis_e83a8e4e-36aa-4021-8444-cda2698e5b1b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioUnspecifiedDomain_e83a8e4e-36aa-4021-8444-cda2698e5b1b_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScenarioUnspecifiedDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementScenarioAxis_e83a8e4e-36aa-4021-8444-cda2698e5b1b" xlink:to="loc_srt_ScenarioUnspecifiedDomain_e83a8e4e-36aa-4021-8444-cda2698e5b1b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioUnspecifiedDomain_f67de0b8-c2a9-4352-9916-8e8810fe7c9e" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScenarioUnspecifiedDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementScenarioAxis_e83a8e4e-36aa-4021-8444-cda2698e5b1b" xlink:to="loc_srt_ScenarioUnspecifiedDomain_f67de0b8-c2a9-4352-9916-8e8810fe7c9e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioForecastMember_d09b44d3-1286-4963-9d32-8b1216d22543" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScenarioForecastMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ScenarioUnspecifiedDomain_f67de0b8-c2a9-4352-9916-8e8810fe7c9e" xlink:to="loc_srt_ScenarioForecastMember_d09b44d3-1286-4963-9d32-8b1216d22543" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsCedingCommissionPercent_5a5d2423-47fe-479c-94a4-10b888810296" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsCedingCommissionPercent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsCedingCommissionPercent_5a5d2423-47fe-479c-94a4-10b888810296" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsAnnualLossRatioCap_48ee4741-15f3-45de-b4cf-1380ad951f68" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsAnnualLossRatioCap"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsAnnualLossRatioCap_48ee4741-15f3-45de-b4cf-1380ad951f68" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsLifetimeLossRatioCap_723189ec-64be-46a0-a341-af66e1c7856b" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsLifetimeLossRatioCap"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsLifetimeLossRatioCap_723189ec-64be-46a0-a341-af66e1c7856b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsQuotaSharePercent_92ba4d5a-88df-4967-af4b-15a20287558e" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsQuotaSharePercent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsQuotaSharePercent_92ba4d5a-88df-4967-af4b-15a20287558e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossRatio_ae06249b-2aab-4fbd-9a8d-a39e627bedad" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LossRatio"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_us-gaap_LossRatio_ae06249b-2aab-4fbd-9a8d-a39e627bedad" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsThresholdForPrivateMortgageInsurerEligibilityRequirementsForTerminationElection_3b6ba0be-5e8c-4e10-9d40-dbda1359a61e" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsThresholdForPrivateMortgageInsurerEligibilityRequirementsForTerminationElection"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsThresholdForPrivateMortgageInsurerEligibilityRequirementsForTerminationElection_3b6ba0be-5e8c-4e10-9d40-dbda1359a61e" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsContingentTerminationFee_57aae322-600a-42b7-b1a1-2a9d25fb6ac8" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsContingentTerminationFee"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsContingentTerminationFee_57aae322-600a-42b7-b1a1-2a9d25fb6ac8" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverablesOnPaidLosses_a72fef21-61e2-482f-aec8-e6c33b309f67" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceRecoverablesOnPaidLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_us-gaap_ReinsuranceRecoverablesOnPaidLosses_a72fef21-61e2-482f-aec8-e6c33b309f67" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRecoverableForUnpaidClaimsAndClaimsAdjustments_0955ab69-2ba2-43db-b8f6-59614b22ea2c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceRecoverableForUnpaidClaimsAndClaimsAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_us-gaap_ReinsuranceRecoverableForUnpaidClaimsAndClaimsAdjustments_0955ab69-2ba2-43db-b8f6-59614b22ea2c" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceRetentionPolicyReductionInInsuranceLinkedNotes_470471f8-58a6-4e1e-907a-db343f5b3681" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceRetentionPolicyReductionInInsuranceLinkedNotes"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_mtg_ReinsuranceRetentionPolicyReductionInInsuranceLinkedNotes_470471f8-58a6-4e1e-907a-db343f5b3681" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededPremiumsEarned_b4e869fc-1d14-4e87-b7a8-8bab49f88b16" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededPremiumsEarned"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_us-gaap_CededPremiumsEarned_b4e869fc-1d14-4e87-b7a8-8bab49f88b16" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceAgreementOptionalRightPercentOfReinsuranceCoverageThreshold_74a340ab-c6ac-4633-9c02-d3d37b2d9213" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceAgreementOptionalRightPercentOfReinsuranceCoverageThreshold"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_mtg_ReinsuranceAgreementOptionalRightPercentOfReinsuranceCoverageThreshold_74a340ab-c6ac-4633-9c02-d3d37b2d9213" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceRetentionPolicyPercentOfTotalTrustAssetsInvestedInCashOrDirectU.S.FederalGovernmentObligations_c861f8a2-6541-4a3d-bbad-b5f44235cab5" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceRetentionPolicyPercentOfTotalTrustAssetsInvestedInCashOrDirectU.S.FederalGovernmentObligations"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_dda10456-0034-447b-a225-72f63ed279bb" xlink:to="loc_mtg_ReinsuranceRetentionPolicyPercentOfTotalTrustAssetsInvestedInCashOrDirectU.S.FederalGovernmentObligations_c861f8a2-6541-4a3d-bbad-b5f44235cab5" xlink:type="arc" order="12"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/ReinsuranceQuotaShareAgreementTermsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#ReinsuranceQuotaShareAgreementTermsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/ReinsuranceQuotaShareAgreementTermsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectsOfReinsuranceLineItems_24dd048f-3ddb-460d-baf7-a8a45b9aa909" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectsOfReinsuranceLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectsOfReinsuranceTable_79c5a82f-dbb9-4d32-93df-0d66261a7533" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectsOfReinsuranceTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_24dd048f-3ddb-460d-baf7-a8a45b9aa909" xlink:to="loc_us-gaap_EffectsOfReinsuranceTable_79c5a82f-dbb9-4d32-93df-0d66261a7533" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededCreditRiskAxis_9a95324f-0aad-4dab-a782-9021dedf6c50" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededCreditRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_EffectsOfReinsuranceTable_79c5a82f-dbb9-4d32-93df-0d66261a7533" xlink:to="loc_us-gaap_CededCreditRiskAxis_9a95324f-0aad-4dab-a782-9021dedf6c50" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededCreditRiskReinsurerDomain_9a95324f-0aad-4dab-a782-9021dedf6c50_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededCreditRiskReinsurerDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CededCreditRiskAxis_9a95324f-0aad-4dab-a782-9021dedf6c50" xlink:to="loc_us-gaap_CededCreditRiskReinsurerDomain_9a95324f-0aad-4dab-a782-9021dedf6c50_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededCreditRiskReinsurerDomain_95da6aba-00e8-4b56-936a-7ebadb358e6c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededCreditRiskReinsurerDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CededCreditRiskAxis_9a95324f-0aad-4dab-a782-9021dedf6c50" xlink:to="loc_us-gaap_CededCreditRiskReinsurerDomain_95da6aba-00e8-4b56-936a-7ebadb358e6c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransaction2020And20212021NIWMember_b27d3153-4a2d-40a4-a3ec-0a806208cc75" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransaction2020And20212021NIWMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_95da6aba-00e8-4b56-936a-7ebadb358e6c" xlink:to="loc_mtg_QuotaShareReinsuranceTransaction2020And20212021NIWMember_b27d3153-4a2d-40a4-a3ec-0a806208cc75" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransaction2021And20222021NIWMember_d611e7af-59a6-49db-adc2-4183ba5abec2" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransaction2021And20222021NIWMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_95da6aba-00e8-4b56-936a-7ebadb358e6c" xlink:to="loc_mtg_QuotaShareReinsuranceTransaction2021And20222021NIWMember_d611e7af-59a6-49db-adc2-4183ba5abec2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransaction2021And20222022NIWMember_85d7a50a-0994-43b6-88cb-f09a91148922" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransaction2021And20222022NIWMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_95da6aba-00e8-4b56-936a-7ebadb358e6c" xlink:to="loc_mtg_QuotaShareReinsuranceTransaction2021And20222022NIWMember_85d7a50a-0994-43b6-88cb-f09a91148922" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransaction2022And20232022NIWMember_48595abf-a353-4e5e-85fc-f5791f7b939b" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransaction2022And20232022NIWMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_95da6aba-00e8-4b56-936a-7ebadb358e6c" xlink:to="loc_mtg_QuotaShareReinsuranceTransaction2022And20232022NIWMember_48595abf-a353-4e5e-85fc-f5791f7b939b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransaction2022And20232023NIWMember_02e72a80-75e5-4b33-8ed0-f649de9f35f5" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransaction2022And20232023NIWMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_95da6aba-00e8-4b56-936a-7ebadb358e6c" xlink:to="loc_mtg_QuotaShareReinsuranceTransaction2022And20232023NIWMember_02e72a80-75e5-4b33-8ed0-f649de9f35f5" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransaction20232023NIWMember_a906db5e-fd69-4f4d-9efa-d855704d279f" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransaction20232023NIWMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_95da6aba-00e8-4b56-936a-7ebadb358e6c" xlink:to="loc_mtg_QuotaShareReinsuranceTransaction20232023NIWMember_a906db5e-fd69-4f4d-9efa-d855704d279f" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_CreditUnionQuotaShareReinsuranceTransactionMember_c7886f88-4b6d-44c3-b7a7-c3e228cd0115" xlink:href="mtg-20231231.xsd#mtg_CreditUnionQuotaShareReinsuranceTransactionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_95da6aba-00e8-4b56-936a-7ebadb358e6c" xlink:to="loc_mtg_CreditUnionQuotaShareReinsuranceTransactionMember_c7886f88-4b6d-44c3-b7a7-c3e228cd0115" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_QuotaShareReinsuranceTransaction20242024NIWMember_f7818acc-a26a-46d9-a749-c46379466b67" xlink:href="mtg-20231231.xsd#mtg_QuotaShareReinsuranceTransaction20242024NIWMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_95da6aba-00e8-4b56-936a-7ebadb358e6c" xlink:to="loc_mtg_QuotaShareReinsuranceTransaction20242024NIWMember_f7818acc-a26a-46d9-a749-c46379466b67" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementScenarioAxis_ecb2f757-b74b-4f1e-8595-06ba4a996bcf" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_StatementScenarioAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_EffectsOfReinsuranceTable_79c5a82f-dbb9-4d32-93df-0d66261a7533" xlink:to="loc_srt_StatementScenarioAxis_ecb2f757-b74b-4f1e-8595-06ba4a996bcf" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioUnspecifiedDomain_ecb2f757-b74b-4f1e-8595-06ba4a996bcf_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScenarioUnspecifiedDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementScenarioAxis_ecb2f757-b74b-4f1e-8595-06ba4a996bcf" xlink:to="loc_srt_ScenarioUnspecifiedDomain_ecb2f757-b74b-4f1e-8595-06ba4a996bcf_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioUnspecifiedDomain_920fab9f-f010-4060-b05c-23f95b05bb6f" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScenarioUnspecifiedDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementScenarioAxis_ecb2f757-b74b-4f1e-8595-06ba4a996bcf" xlink:to="loc_srt_ScenarioUnspecifiedDomain_920fab9f-f010-4060-b05c-23f95b05bb6f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioForecastMember_64e63d38-01c6-43c6-98fb-3f431d8cbe8b" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScenarioForecastMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ScenarioUnspecifiedDomain_920fab9f-f010-4060-b05c-23f95b05bb6f" xlink:to="loc_srt_ScenarioForecastMember_64e63d38-01c6-43c6-98fb-3f431d8cbe8b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsQuotaSharePercent_189e1834-8d9a-489b-8d56-a51af6faa500" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsQuotaSharePercent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_24dd048f-3ddb-460d-baf7-a8a45b9aa909" xlink:to="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsQuotaSharePercent_189e1834-8d9a-489b-8d56-a51af6faa500" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LossRatio_cb7cd8da-9cba-4899-bfd4-5d39aaa20c01" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LossRatio"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_24dd048f-3ddb-460d-baf7-a8a45b9aa909" xlink:to="loc_us-gaap_LossRatio_cb7cd8da-9cba-4899-bfd4-5d39aaa20c01" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsCedingRatePercentOptionOne_c2a985d9-88aa-49b7-99c4-161e570590c3" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsCedingRatePercentOptionOne"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_24dd048f-3ddb-460d-baf7-a8a45b9aa909" xlink:to="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsCedingRatePercentOptionOne_c2a985d9-88aa-49b7-99c4-161e570590c3" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsCedingRatePercentOptionTwo_8f8de272-4860-4871-861d-39e0f5ef2f74" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsCedingRatePercentOptionTwo"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_24dd048f-3ddb-460d-baf7-a8a45b9aa909" xlink:to="loc_mtg_ReinsuranceQuotaShareReinsuranceAgreementTermsCedingRatePercentOptionTwo_8f8de272-4860-4871-861d-39e0f5ef2f74" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/ReinsuranceExcessofLossReinsuranceDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#ReinsuranceExcessofLossReinsuranceDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/ReinsuranceExcessofLossReinsuranceDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectsOfReinsuranceLineItems_cc4f212c-2023-4141-9712-4632633d48d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectsOfReinsuranceLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectsOfReinsuranceTable_7e704aeb-3526-4b0b-811e-bac0f6a9ea92" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectsOfReinsuranceTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_cc4f212c-2023-4141-9712-4632633d48d5" xlink:to="loc_us-gaap_EffectsOfReinsuranceTable_7e704aeb-3526-4b0b-811e-bac0f6a9ea92" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LegalEntityAxis_8bd99c98-c139-48a5-a829-9fa29dd8f514" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_LegalEntityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_EffectsOfReinsuranceTable_7e704aeb-3526-4b0b-811e-bac0f6a9ea92" xlink:to="loc_dei_LegalEntityAxis_8bd99c98-c139-48a5-a829-9fa29dd8f514" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_8bd99c98-c139-48a5-a829-9fa29dd8f514_default" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_8bd99c98-c139-48a5-a829-9fa29dd8f514" xlink:to="loc_dei_EntityDomain_8bd99c98-c139-48a5-a829-9fa29dd8f514_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_09a75ad7-5484-47ff-82a7-3120ac393885" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_8bd99c98-c139-48a5-a829-9fa29dd8f514" xlink:to="loc_dei_EntityDomain_09a75ad7-5484-47ff-82a7-3120ac393885" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20231Member_f7beb9b3-9d49-4905-8f0c-3d10039fcc08" xlink:href="mtg-20231231.xsd#mtg_HomeRe20231Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_09a75ad7-5484-47ff-82a7-3120ac393885" xlink:to="loc_mtg_HomeRe20231Member_f7beb9b3-9d49-4905-8f0c-3d10039fcc08" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20221Member_a046d6ec-b3d1-426a-af6a-ded8ff4a7cad" xlink:href="mtg-20231231.xsd#mtg_HomeRe20221Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_09a75ad7-5484-47ff-82a7-3120ac393885" xlink:to="loc_mtg_HomeRe20221Member_a046d6ec-b3d1-426a-af6a-ded8ff4a7cad" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20212Member_ec4845fb-ac14-4b5b-8525-0d7a281864c2" xlink:href="mtg-20231231.xsd#mtg_HomeRe20212Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_09a75ad7-5484-47ff-82a7-3120ac393885" xlink:to="loc_mtg_HomeRe20212Member_ec4845fb-ac14-4b5b-8525-0d7a281864c2" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20211Member_ddf6938a-e0eb-449f-92f8-826e0c0e151d" xlink:href="mtg-20231231.xsd#mtg_HomeRe20211Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_09a75ad7-5484-47ff-82a7-3120ac393885" xlink:to="loc_mtg_HomeRe20211Member_ddf6938a-e0eb-449f-92f8-826e0c0e151d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20201Member_12cf498a-9958-4258-98b6-bca425974c45" xlink:href="mtg-20231231.xsd#mtg_HomeRe20201Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_09a75ad7-5484-47ff-82a7-3120ac393885" xlink:to="loc_mtg_HomeRe20201Member_12cf498a-9958-4258-98b6-bca425974c45" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20191Member_fd34d6a1-c2f5-4754-9fe0-9aee9d633cd6" xlink:href="mtg-20231231.xsd#mtg_HomeRe20191Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_09a75ad7-5484-47ff-82a7-3120ac393885" xlink:to="loc_mtg_HomeRe20191Member_fd34d6a1-c2f5-4754-9fe0-9aee9d633cd6" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20181Member_b4b8042b-a5c7-4e17-b928-472c621cf43f" xlink:href="mtg-20231231.xsd#mtg_HomeRe20181Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_09a75ad7-5484-47ff-82a7-3120ac393885" xlink:to="loc_mtg_HomeRe20181Member_b4b8042b-a5c7-4e17-b928-472c621cf43f" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededCreditRiskAxis_2d9f40c0-7e21-406f-a1b2-3a03d9fad988" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededCreditRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_EffectsOfReinsuranceTable_7e704aeb-3526-4b0b-811e-bac0f6a9ea92" xlink:to="loc_us-gaap_CededCreditRiskAxis_2d9f40c0-7e21-406f-a1b2-3a03d9fad988" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededCreditRiskReinsurerDomain_2d9f40c0-7e21-406f-a1b2-3a03d9fad988_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededCreditRiskReinsurerDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CededCreditRiskAxis_2d9f40c0-7e21-406f-a1b2-3a03d9fad988" xlink:to="loc_us-gaap_CededCreditRiskReinsurerDomain_2d9f40c0-7e21-406f-a1b2-3a03d9fad988_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CededCreditRiskReinsurerDomain_a3461e7a-ab49-4672-bf4c-825ea8440339" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CededCreditRiskReinsurerDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CededCreditRiskAxis_2d9f40c0-7e21-406f-a1b2-3a03d9fad988" xlink:to="loc_us-gaap_CededCreditRiskReinsurerDomain_a3461e7a-ab49-4672-bf4c-825ea8440339" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_A2023TraditionalXOLMember_f1f3ec77-4892-4b9b-964e-9d220069e077" xlink:href="mtg-20231231.xsd#mtg_A2023TraditionalXOLMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_a3461e7a-ab49-4672-bf4c-825ea8440339" xlink:to="loc_mtg_A2023TraditionalXOLMember_f1f3ec77-4892-4b9b-964e-9d220069e077" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_A2022TraditionalXOLMember_b4226ded-a802-453f-a005-58d8010b2d43" xlink:href="mtg-20231231.xsd#mtg_A2022TraditionalXOLMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CededCreditRiskReinsurerDomain_a3461e7a-ab49-4672-bf4c-825ea8440339" xlink:to="loc_mtg_A2022TraditionalXOLMember_b4226ded-a802-453f-a005-58d8010b2d43" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AmortizationPeriodExcessofLossReinsuranceCoverage_3c290c37-64fb-4bf5-a0f0-8a7228ffd801" xlink:href="mtg-20231231.xsd#mtg_AmortizationPeriodExcessofLossReinsuranceCoverage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_cc4f212c-2023-4141-9712-4632633d48d5" xlink:to="loc_mtg_AmortizationPeriodExcessofLossReinsuranceCoverage_3c290c37-64fb-4bf5-a0f0-8a7228ffd801" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceRetentionPolicyDebtIssuedToCoverInsuranceTerm_042d2183-7256-4336-b509-dd43b60006a3" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceRetentionPolicyDebtIssuedToCoverInsuranceTerm"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_cc4f212c-2023-4141-9712-4632633d48d5" xlink:to="loc_mtg_ReinsuranceRetentionPolicyDebtIssuedToCoverInsuranceTerm_042d2183-7256-4336-b509-dd43b60006a3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceRetentionPolicyInitialAmountRetained_540ae546-15b2-4c72-bc5a-1be1b1ed16ad" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceRetentionPolicyInitialAmountRetained"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_cc4f212c-2023-4141-9712-4632633d48d5" xlink:to="loc_mtg_ReinsuranceRetentionPolicyInitialAmountRetained_540ae546-15b2-4c72-bc5a-1be1b1ed16ad" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReinsuranceRetentionAmountRetainedPerLife_a68928a0-3cd2-4260-a238-4f137e9d1af6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReinsuranceRetentionAmountRetainedPerLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_cc4f212c-2023-4141-9712-4632633d48d5" xlink:to="loc_us-gaap_ReinsuranceRetentionAmountRetainedPerLife_a68928a0-3cd2-4260-a238-4f137e9d1af6" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceRetentionPolicyExcessOfLossReinsuranceCoverages_fc516523-a8d9-4f9e-a181-86313e7e801f" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceRetentionPolicyExcessOfLossReinsuranceCoverages"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_cc4f212c-2023-4141-9712-4632633d48d5" xlink:to="loc_mtg_ReinsuranceRetentionPolicyExcessOfLossReinsuranceCoverages_fc516523-a8d9-4f9e-a181-86313e7e801f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ReinsuranceRetentionPolicyFundingPercentage_f20da7d2-1cce-48d5-a1fc-f4d9b12f1c5e" xlink:href="mtg-20231231.xsd#mtg_ReinsuranceRetentionPolicyFundingPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_cc4f212c-2023-4141-9712-4632633d48d5" xlink:to="loc_mtg_ReinsuranceRetentionPolicyFundingPercentage_f20da7d2-1cce-48d5-a1fc-f4d9b12f1c5e" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/ReinsuranceHomeReEntitiesTotalAssetsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#ReinsuranceHomeReEntitiesTotalAssetsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/ReinsuranceHomeReEntitiesTotalAssetsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectsOfReinsuranceLineItems_ffa9c173-6502-4916-bfe5-a368ce3572a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectsOfReinsuranceLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EffectsOfReinsuranceTable_74d895fd-2e83-4958-830f-62fd8bb239d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EffectsOfReinsuranceTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_ffa9c173-6502-4916-bfe5-a368ce3572a9" xlink:to="loc_us-gaap_EffectsOfReinsuranceTable_74d895fd-2e83-4958-830f-62fd8bb239d8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LegalEntityAxis_532f1dc5-e7ee-482c-acb7-d0f6d006077d" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_LegalEntityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_EffectsOfReinsuranceTable_74d895fd-2e83-4958-830f-62fd8bb239d8" xlink:to="loc_dei_LegalEntityAxis_532f1dc5-e7ee-482c-acb7-d0f6d006077d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_532f1dc5-e7ee-482c-acb7-d0f6d006077d_default" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_532f1dc5-e7ee-482c-acb7-d0f6d006077d" xlink:to="loc_dei_EntityDomain_532f1dc5-e7ee-482c-acb7-d0f6d006077d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_08222777-3b9f-44a6-b36a-dc794cd3205e" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_532f1dc5-e7ee-482c-acb7-d0f6d006077d" xlink:to="loc_dei_EntityDomain_08222777-3b9f-44a6-b36a-dc794cd3205e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20231Member_ba3ae883-5291-456e-aa62-b346bcb19a19" xlink:href="mtg-20231231.xsd#mtg_HomeRe20231Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_08222777-3b9f-44a6-b36a-dc794cd3205e" xlink:to="loc_mtg_HomeRe20231Member_ba3ae883-5291-456e-aa62-b346bcb19a19" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20221Member_55bcbcda-3001-48f1-87f2-f618b39d8802" xlink:href="mtg-20231231.xsd#mtg_HomeRe20221Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_08222777-3b9f-44a6-b36a-dc794cd3205e" xlink:to="loc_mtg_HomeRe20221Member_55bcbcda-3001-48f1-87f2-f618b39d8802" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20212Member_507230a0-4ac0-4098-8da2-496378f5a5f3" xlink:href="mtg-20231231.xsd#mtg_HomeRe20212Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_08222777-3b9f-44a6-b36a-dc794cd3205e" xlink:to="loc_mtg_HomeRe20212Member_507230a0-4ac0-4098-8da2-496378f5a5f3" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20211Member_d3392068-c1a7-4067-b526-c940e0313334" xlink:href="mtg-20231231.xsd#mtg_HomeRe20211Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_08222777-3b9f-44a6-b36a-dc794cd3205e" xlink:to="loc_mtg_HomeRe20211Member_d3392068-c1a7-4067-b526-c940e0313334" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20201Member_83b733e8-8097-40fa-ac02-c4fa8436d082" xlink:href="mtg-20231231.xsd#mtg_HomeRe20201Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_08222777-3b9f-44a6-b36a-dc794cd3205e" xlink:to="loc_mtg_HomeRe20201Member_83b733e8-8097-40fa-ac02-c4fa8436d082" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20191Member_6466ba88-6cd2-470e-956d-48afda3bf810" xlink:href="mtg-20231231.xsd#mtg_HomeRe20191Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_08222777-3b9f-44a6-b36a-dc794cd3205e" xlink:to="loc_mtg_HomeRe20191Member_6466ba88-6cd2-470e-956d-48afda3bf810" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_HomeRe20181Member_5b1bc87e-dca6-4ecd-8e24-84f7607b9a6e" xlink:href="mtg-20231231.xsd#mtg_HomeRe20181Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_08222777-3b9f-44a6-b36a-dc794cd3205e" xlink:to="loc_mtg_HomeRe20181Member_5b1bc87e-dca6-4ecd-8e24-84f7607b9a6e" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_83d8b110-000c-45d0-97b9-a420698df896" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EffectsOfReinsuranceLineItems_ffa9c173-6502-4916-bfe5-a368ce3572a9" xlink:to="loc_us-gaap_Assets_83d8b110-000c-45d0-97b9-a420698df896" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/OtherComprehensiveIncomeLossPretaxandRelatedIncomeTaxBenefitExpenseComponentsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#OtherComprehensiveIncomeLossPretaxandRelatedIncomeTaxBenefitExpenseComponentsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/OtherComprehensiveIncomeLossPretaxandRelatedIncomeTaxBenefitExpenseComponentsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationAdjustmentOutOfAccumulatedOtherComprehensiveIncomeLineItems_cc848fa8-6741-4c4b-a39a-e1f2ac2c9291" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationAdjustmentOutOfAccumulatedOtherComprehensiveIncomeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable_c78d4911-541b-4619-9406-1affde6225b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ReclassificationAdjustmentOutOfAccumulatedOtherComprehensiveIncomeLineItems_cc848fa8-6741-4c4b-a39a-e1f2ac2c9291" xlink:to="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable_c78d4911-541b-4619-9406-1affde6225b9" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeAxis_cf812aba-f4e8-4a81-946c-386345621b8e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable_c78d4911-541b-4619-9406-1affde6225b9" xlink:to="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeAxis_cf812aba-f4e8-4a81-946c-386345621b8e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeDomain_cf812aba-f4e8-4a81-946c-386345621b8e_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeAxis_cf812aba-f4e8-4a81-946c-386345621b8e" xlink:to="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeDomain_cf812aba-f4e8-4a81-946c-386345621b8e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeDomain_80bf77ec-fafe-4558-8c77-12b252f1f2c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeAxis_cf812aba-f4e8-4a81-946c-386345621b8e" xlink:to="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeDomain_80bf77ec-fafe-4558-8c77-12b252f1f2c1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeMember_37c292ca-26d1-4840-bc95-0125d041ad0f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeDomain_80bf77ec-fafe-4558-8c77-12b252f1f2c1" xlink:to="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeMember_37c292ca-26d1-4840-bc95-0125d041ad0f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_a2fa3c4f-5a9a-48d0-856d-574139ce81db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ReclassificationOutOfAccumulatedOtherComprehensiveIncomeTable_c78d4911-541b-4619-9406-1affde6225b9" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_a2fa3c4f-5a9a-48d0-856d-574139ce81db" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_a2fa3c4f-5a9a-48d0-856d-574139ce81db_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_a2fa3c4f-5a9a-48d0-856d-574139ce81db" xlink:to="loc_us-gaap_EquityComponentDomain_a2fa3c4f-5a9a-48d0-856d-574139ce81db_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_6413665f-666c-4069-99b5-ea00df8ee3ee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_a2fa3c4f-5a9a-48d0-856d-574139ce81db" xlink:to="loc_us-gaap_EquityComponentDomain_6413665f-666c-4069-99b5-ea00df8ee3ee" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_bd313707-4d67-44d4-996e-278462c9f66f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_6413665f-666c-4069-99b5-ea00df8ee3ee" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_bd313707-4d67-44d4-996e-278462c9f66f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember_f0b7dff6-7db2-4312-a92c-37b208bacfa4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_bd313707-4d67-44d4-996e-278462c9f66f" xlink:to="loc_us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember_f0b7dff6-7db2-4312-a92c-37b208bacfa4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDefinedBenefitPlansAdjustmentMember_747c2816-2efb-4554-838d-102b17cb7f52" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedDefinedBenefitPlansAdjustmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_bd313707-4d67-44d4-996e-278462c9f66f" xlink:to="loc_us-gaap_AccumulatedDefinedBenefitPlansAdjustmentMember_747c2816-2efb-4554-838d-102b17cb7f52" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAbstract_be8c628d-ae6b-4b63-95f5-5a5a0bb13c95" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ReclassificationAdjustmentOutOfAccumulatedOtherComprehensiveIncomeLineItems_cc848fa8-6741-4c4b-a39a-e1f2ac2c9291" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAbstract_be8c628d-ae6b-4b63-95f5-5a5a0bb13c95" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_ebb7d693-5fd4-48d9-b377-ed5f046e97e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAbstract_be8c628d-ae6b-4b63-95f5-5a5a0bb13c95" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_ebb7d693-5fd4-48d9-b377-ed5f046e97e8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_830566a7-8b9e-4321-a9d3-9d76b9c3690d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAbstract_be8c628d-ae6b-4b63-95f5-5a5a0bb13c95" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_830566a7-8b9e-4321-a9d3-9d76b9c3690d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_3a6dbf41-2115-4548-a70a-6c173447817f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTaxAbstract_be8c628d-ae6b-4b63-95f5-5a5a0bb13c95" xlink:to="loc_us-gaap_NetIncomeLoss_3a6dbf41-2115-4548-a70a-6c173447817f" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/OtherComprehensiveIncomeLossRollForwardforAOCIDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#OtherComprehensiveIncomeLossRollForwardforAOCIDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/OtherComprehensiveIncomeLossRollForwardforAOCIDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems_82b070e7-878f-4f82-ba1d-2765053a5955" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_790cfe25-63f8-4f10-84f3-8ea4bd81bf44" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems_82b070e7-878f-4f82-ba1d-2765053a5955" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_790cfe25-63f8-4f10-84f3-8ea4bd81bf44" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_f2f2f49a-c392-4a04-bc5d-c79539b2d6e9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossTable_790cfe25-63f8-4f10-84f3-8ea4bd81bf44" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_f2f2f49a-c392-4a04-bc5d-c79539b2d6e9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_f2f2f49a-c392-4a04-bc5d-c79539b2d6e9_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_f2f2f49a-c392-4a04-bc5d-c79539b2d6e9" xlink:to="loc_us-gaap_EquityComponentDomain_f2f2f49a-c392-4a04-bc5d-c79539b2d6e9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_82349c0f-4e64-434d-b1ad-aa35fbc49a44" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_f2f2f49a-c392-4a04-bc5d-c79539b2d6e9" xlink:to="loc_us-gaap_EquityComponentDomain_82349c0f-4e64-434d-b1ad-aa35fbc49a44" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_2bacb1f6-0726-4b0b-9527-d54e6568e061" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_82349c0f-4e64-434d-b1ad-aa35fbc49a44" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_2bacb1f6-0726-4b0b-9527-d54e6568e061" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember_652f305d-f8f8-4af4-8cf7-a8fa10cb8177" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_2bacb1f6-0726-4b0b-9527-d54e6568e061" xlink:to="loc_us-gaap_AccumulatedNetUnrealizedInvestmentGainLossMember_652f305d-f8f8-4af4-8cf7-a8fa10cb8177" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedDefinedBenefitPlansAdjustmentMember_3d7c7dd6-1b80-441a-8514-1a82945a5ee5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedDefinedBenefitPlansAdjustmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_2bacb1f6-0726-4b0b-9527-d54e6568e061" xlink:to="loc_us-gaap_AccumulatedDefinedBenefitPlansAdjustmentMember_3d7c7dd6-1b80-441a-8514-1a82945a5ee5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_41c07d1a-0099-4615-9014-4bcd8a77b675" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AOCIAttributableToParentNetOfTaxRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossLineItems_82b070e7-878f-4f82-ba1d-2765053a5955" xlink:to="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_41c07d1a-0099-4615-9014-4bcd8a77b675" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_ba9f524a-8b47-4565-925e-8d9bfb116190" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_41c07d1a-0099-4615-9014-4bcd8a77b675" xlink:to="loc_us-gaap_StockholdersEquity_ba9f524a-8b47-4565-925e-8d9bfb116190" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OciBeforeReclassificationsNetOfTaxAttributableToParent_e134bc5a-83d8-407e-b68f-272f90dc17f5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OciBeforeReclassificationsNetOfTaxAttributableToParent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_41c07d1a-0099-4615-9014-4bcd8a77b675" xlink:to="loc_us-gaap_OciBeforeReclassificationsNetOfTaxAttributableToParent_e134bc5a-83d8-407e-b68f-272f90dc17f5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAociCurrentPeriodNetOfTaxAttributableToParent_59fd23a1-1799-4597-9c61-6a7b891f45b7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ReclassificationFromAociCurrentPeriodNetOfTaxAttributableToParent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_41c07d1a-0099-4615-9014-4bcd8a77b675" xlink:to="loc_us-gaap_ReclassificationFromAociCurrentPeriodNetOfTaxAttributableToParent_59fd23a1-1799-4597-9c61-6a7b891f45b7" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_3aa042a6-d3eb-4297-ae14-36dc37abee76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansComponentsofNetPeriodicBenefitCostsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansComponentsofNetPeriodicBenefitCostsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansComponentsofNetPeriodicBenefitCostsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_e671444a-6611-458c-b9b4-0ced1f483cc5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_9d863e61-371a-41da-aa70-6c9cb341d2e5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_e671444a-6611-458c-b9b4-0ced1f483cc5" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_9d863e61-371a-41da-aa70-6c9cb341d2e5" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_0d70d400-2a7c-490c-8cb9-595f9b199e2b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_9d863e61-371a-41da-aa70-6c9cb341d2e5" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_0d70d400-2a7c-490c-8cb9-595f9b199e2b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_0d70d400-2a7c-490c-8cb9-595f9b199e2b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_0d70d400-2a7c-490c-8cb9-595f9b199e2b" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_0d70d400-2a7c-490c-8cb9-595f9b199e2b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_e00adcee-0a53-46c6-b919-b725cbe3d553" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_0d70d400-2a7c-490c-8cb9-595f9b199e2b" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_e00adcee-0a53-46c6-b919-b725cbe3d553" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_e040da28-6422-4c0e-9fc5-5110536eaaa4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_e00adcee-0a53-46c6-b919-b725cbe3d553" xlink:to="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_e040da28-6422-4c0e-9fc5-5110536eaaa4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_cc87177b-ea3a-4f9d-aff0-baa81e2922a4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_e00adcee-0a53-46c6-b919-b725cbe3d553" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_cc87177b-ea3a-4f9d-aff0-baa81e2922a4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_7477bb94-33f1-43ad-a7cc-1c21055c2abb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanServiceCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_e671444a-6611-458c-b9b4-0ced1f483cc5" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_7477bb94-33f1-43ad-a7cc-1c21055c2abb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_52b57cc7-9b52-42bc-b970-5e3c796fd40e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanInterestCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_e671444a-6611-458c-b9b4-0ced1f483cc5" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_52b57cc7-9b52-42bc-b970-5e3c796fd40e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_1d86b3f4-89c0-4dd0-9b04-adab34e51aab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_e671444a-6611-458c-b9b4-0ced1f483cc5" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_1d86b3f4-89c0-4dd0-9b04-adab34e51aab" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfTransitionAssetObligation_12ab9b8c-fc43-4646-9da9-8e2b55dfd69c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAmortizationOfTransitionAssetObligation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_e671444a-6611-458c-b9b4-0ced1f483cc5" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfTransitionAssetObligation_12ab9b8c-fc43-4646-9da9-8e2b55dfd69c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_5c58a83c-bd9b-4c14-ab65-931b73235892" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_e671444a-6611-458c-b9b4-0ced1f483cc5" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_5c58a83c-bd9b-4c14-ab65-931b73235892" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_21b0f71d-96b9-47a0-8b4e-cfba6f07e69a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_e671444a-6611-458c-b9b4-0ced1f483cc5" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_21b0f71d-96b9-47a0-8b4e-cfba6f07e69a" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlementsAndCurtailments1_42cab277-1640-4a5f-924e-f636aa248f49" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlementsAndCurtailments1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_e671444a-6611-458c-b9b4-0ced1f483cc5" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlementsAndCurtailments1_42cab277-1640-4a5f-924e-f636aa248f49" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_ab1a2534-fe75-4f02-9299-20e67b2fc3ae" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_e671444a-6611-458c-b9b4-0ced1f483cc5" xlink:to="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_ab1a2534-fe75-4f02-9299-20e67b2fc3ae" xlink:type="arc" order="7"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansDevelopmentofFundedStatusDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansDevelopmentofFundedStatusDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansDevelopmentofFundedStatusDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_12a94a1f-e01e-43f8-a293-3a37c3642ef0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_82d1c4fb-9e48-4f98-9b59-186d75e270a0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_12a94a1f-e01e-43f8-a293-3a37c3642ef0" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_82d1c4fb-9e48-4f98-9b59-186d75e270a0" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_7c2ff025-c9e6-473e-986a-829411151c0a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_82d1c4fb-9e48-4f98-9b59-186d75e270a0" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_7c2ff025-c9e6-473e-986a-829411151c0a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_7c2ff025-c9e6-473e-986a-829411151c0a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_7c2ff025-c9e6-473e-986a-829411151c0a" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_7c2ff025-c9e6-473e-986a-829411151c0a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_e766ba34-cc4c-48e4-bb51-62529c4514db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_7c2ff025-c9e6-473e-986a-829411151c0a" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_e766ba34-cc4c-48e4-bb51-62529c4514db" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_3049cea8-6e2c-4968-8a0b-ac8eca27f61e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_e766ba34-cc4c-48e4-bb51-62529c4514db" xlink:to="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_3049cea8-6e2c-4968-8a0b-ac8eca27f61e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_b25a236a-6fcd-4a06-ae8f-f886808e3135" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_e766ba34-cc4c-48e4-bb51-62529c4514db" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_b25a236a-6fcd-4a06-ae8f-f886808e3135" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedBenefitObligation_84c43924-c749-4aaa-8685-d84c24dd5e0d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedBenefitObligation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_12a94a1f-e01e-43f8-a293-3a37c3642ef0" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedBenefitObligation_84c43924-c749-4aaa-8685-d84c24dd5e0d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligation_fea6d06d-4afe-4cbb-a5d3-54405873b555" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanBenefitObligation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_12a94a1f-e01e-43f8-a293-3a37c3642ef0" xlink:to="loc_us-gaap_DefinedBenefitPlanBenefitObligation_fea6d06d-4afe-4cbb-a5d3-54405873b555" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_697cc847-15cf-40c4-82e1-a59898204430" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanFairValueOfPlanAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_12a94a1f-e01e-43f8-a293-3a37c3642ef0" xlink:to="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_697cc847-15cf-40c4-82e1-a59898204430" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_76f6c570-2274-4b20-925f-4cb245613fef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanFundedStatusOfPlan"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_12a94a1f-e01e-43f8-a293-3a37c3642ef0" xlink:to="loc_us-gaap_DefinedBenefitPlanFundedStatusOfPlan_76f6c570-2274-4b20-925f-4cb245613fef" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansAccumulatedOtherComprehensiveIncomeDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansAccumulatedOtherComprehensiveIncomeDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansAccumulatedOtherComprehensiveIncomeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_5c85ea25-ae72-4861-af6c-c6543b77a499" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_1bdff8fb-02c7-4c04-8b1d-8a4e4ccb48c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_5c85ea25-ae72-4861-af6c-c6543b77a499" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_1bdff8fb-02c7-4c04-8b1d-8a4e4ccb48c1" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_f5b3a1c7-ac12-4ce2-87a5-bf53477f0678" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_1bdff8fb-02c7-4c04-8b1d-8a4e4ccb48c1" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_f5b3a1c7-ac12-4ce2-87a5-bf53477f0678" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_f5b3a1c7-ac12-4ce2-87a5-bf53477f0678_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_f5b3a1c7-ac12-4ce2-87a5-bf53477f0678" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_f5b3a1c7-ac12-4ce2-87a5-bf53477f0678_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_90ed458e-a929-4f44-ad28-d57bf365ee97" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_f5b3a1c7-ac12-4ce2-87a5-bf53477f0678" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_90ed458e-a929-4f44-ad28-d57bf365ee97" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_fe82ecfc-6116-45da-abb5-1c18d142acfa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_90ed458e-a929-4f44-ad28-d57bf365ee97" xlink:to="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_fe82ecfc-6116-45da-abb5-1c18d142acfa" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_003dd376-8ce9-4950-961a-bd5c5605d4be" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_90ed458e-a929-4f44-ad28-d57bf365ee97" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_003dd376-8ce9-4950-961a-bd5c5605d4be" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesBeforeTax_6c7157d0-00d6-41c0-aed9-9255cc59daa0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_5c85ea25-ae72-4861-af6c-c6543b77a499" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetGainsLossesBeforeTax_6c7157d0-00d6-41c0-aed9-9255cc59daa0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax_f10415bd-60c7-455c-aeef-00c68456a32f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_5c85ea25-ae72-4861-af6c-c6543b77a499" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetPriorServiceCostCreditBeforeTax_f10415bd-60c7-455c-aeef-00c68456a32f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetTransitionAssetsObligationsBeforeTax_725c9c1f-58ac-4ca7-89fa-31c55c4c70ab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetTransitionAssetsObligationsBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_5c85ea25-ae72-4861-af6c-c6543b77a499" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeNetTransitionAssetsObligationsBeforeTax_725c9c1f-58ac-4ca7-89fa-31c55c4c70ab" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax_42f8b8f1-64bc-430b-98b6-28686cb9d78d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_5c85ea25-ae72-4861-af6c-c6543b77a499" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax_42f8b8f1-64bc-430b-98b6-28686cb9d78d" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansChangeinProjectBenefitAccumulatedBenefitObligationsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansChangeinProjectBenefitAccumulatedBenefitObligationsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansChangeinProjectBenefitAccumulatedBenefitObligationsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_0b567408-6860-495c-b3e4-00aeab9450e7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_75207644-8239-457b-8bfb-e148c36ba0ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_0b567408-6860-495c-b3e4-00aeab9450e7" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_75207644-8239-457b-8bfb-e148c36ba0ea" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_86888a55-7011-4d53-a28a-4f10ec5af6fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_75207644-8239-457b-8bfb-e148c36ba0ea" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_86888a55-7011-4d53-a28a-4f10ec5af6fa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_86888a55-7011-4d53-a28a-4f10ec5af6fa_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_86888a55-7011-4d53-a28a-4f10ec5af6fa" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_86888a55-7011-4d53-a28a-4f10ec5af6fa_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_f61031cf-f218-4d8e-b3e9-d405a021ae50" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_86888a55-7011-4d53-a28a-4f10ec5af6fa" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_f61031cf-f218-4d8e-b3e9-d405a021ae50" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_0b4af589-b388-4f29-b9d8-4bc9414af7d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_f61031cf-f218-4d8e-b3e9-d405a021ae50" xlink:to="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_0b4af589-b388-4f29-b9d8-4bc9414af7d8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_2718ce4b-a766-4c11-9ddd-3d6adffe50d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_f61031cf-f218-4d8e-b3e9-d405a021ae50" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_2718ce4b-a766-4c11-9ddd-3d6adffe50d5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_0b567408-6860-495c-b3e4-00aeab9450e7" xlink:to="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligation_a96f81f2-3272-40e5-8cfe-ab8e1f23e8b1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanBenefitObligation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_us-gaap_DefinedBenefitPlanBenefitObligation_a96f81f2-3272-40e5-8cfe-ab8e1f23e8b1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_f05b94c3-adf8-403f-bae4-2627f5ce72d1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanServiceCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_f05b94c3-adf8-403f-bae4-2627f5ce72d1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_813aa7ec-a4c1-49db-be09-c398fbeda7b3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanInterestCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_813aa7ec-a4c1-49db-be09-c398fbeda7b3" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligationContributionsByPlanParticipant_bf80d275-43db-4ec6-b0ec-dd5710b30dcf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanBenefitObligationContributionsByPlanParticipant"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_us-gaap_DefinedBenefitPlanBenefitObligationContributionsByPlanParticipant_bf80d275-43db-4ec6-b0ec-dd5710b30dcf" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanActuarialGainLoss_19352234-17c0-4aff-b691-1ab725199cb4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanActuarialGainLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_us-gaap_DefinedBenefitPlanActuarialGainLoss_19352234-17c0-4aff-b691-1ab725199cb4" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligationBenefitsPaid_69f60b73-dec6-454b-85fb-7a097171bb39" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanBenefitObligationBenefitsPaid"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_us-gaap_DefinedBenefitPlanBenefitObligationBenefitsPaid_69f60b73-dec6-454b-85fb-7a097171bb39" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DefinedBenefitPlanBenefitsPaidDirectlyByCompany_74923551-db3a-47cc-a03d-143e8fca0ea9" xlink:href="mtg-20231231.xsd#mtg_DefinedBenefitPlanBenefitsPaidDirectlyByCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_mtg_DefinedBenefitPlanBenefitsPaidDirectlyByCompany_74923551-db3a-47cc-a03d-143e8fca0ea9" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanPlanAmendments_ce932d4e-7535-4e36-9ab8-ba0150b1fa4b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanPlanAmendments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_us-gaap_DefinedBenefitPlanPlanAmendments_ce932d4e-7535-4e36-9ab8-ba0150b1fa4b" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanCurtailments_cd66c101-bdbe-4bee-907d-9149840cc21a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanCurtailments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_us-gaap_DefinedBenefitPlanCurtailments_cd66c101-bdbe-4bee-907d-9149840cc21a" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligationPaymentForSettlement_b0ce2a55-c72e-42f7-8aef-9f517beb41c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanBenefitObligationPaymentForSettlement"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_us-gaap_DefinedBenefitPlanBenefitObligationPaymentForSettlement_b0ce2a55-c72e-42f7-8aef-9f517beb41c2" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanOtherChanges_80f41541-86ef-4e4a-af66-874bd99bac24" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanOtherChanges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInBenefitObligationRollForward_7eb4c0e4-198c-4bfd-8e8a-f512417da0ac" xlink:to="loc_us-gaap_DefinedBenefitPlanOtherChanges_80f41541-86ef-4e4a-af66-874bd99bac24" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanBenefitObligation_905f4c0b-a531-4985-8774-82ea709f4fa9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanBenefitObligation"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansChangeinPlanAssetsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansChangeinPlanAssetsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansChangeinPlanAssetsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c8b0acf3-5f34-4562-860a-71b51a3c680c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_2fed0f5a-a962-4cde-b442-cafab4df0c85" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c8b0acf3-5f34-4562-860a-71b51a3c680c" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_2fed0f5a-a962-4cde-b442-cafab4df0c85" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_30fdec01-51c7-48fb-85a6-2717216bd39e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_2fed0f5a-a962-4cde-b442-cafab4df0c85" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_30fdec01-51c7-48fb-85a6-2717216bd39e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_30fdec01-51c7-48fb-85a6-2717216bd39e_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_30fdec01-51c7-48fb-85a6-2717216bd39e" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_30fdec01-51c7-48fb-85a6-2717216bd39e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_cee60e6d-dc74-4469-aafe-305e25cd90e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_30fdec01-51c7-48fb-85a6-2717216bd39e" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_cee60e6d-dc74-4469-aafe-305e25cd90e8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_3250e536-84b6-4fdc-9470-75ba475dcdc8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_cee60e6d-dc74-4469-aafe-305e25cd90e8" xlink:to="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_3250e536-84b6-4fdc-9470-75ba475dcdc8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_e8e5ac4f-0be8-42e9-96eb-a9fb3f7390e6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_cee60e6d-dc74-4469-aafe-305e25cd90e8" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_e8e5ac4f-0be8-42e9-96eb-a9fb3f7390e6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_36dd2d05-4b6d-4489-8b0b-fcbb2ecdfd73" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c8b0acf3-5f34-4562-860a-71b51a3c680c" xlink:to="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_36dd2d05-4b6d-4489-8b0b-fcbb2ecdfd73" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_1e50d645-1067-487e-baef-ac6be5a8f94a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanFairValueOfPlanAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_36dd2d05-4b6d-4489-8b0b-fcbb2ecdfd73" xlink:to="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_1e50d645-1067-487e-baef-ac6be5a8f94a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanActualReturnOnPlanAssets_9f88834a-c8dd-4ad9-8ae4-b526d54df712" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanActualReturnOnPlanAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_36dd2d05-4b6d-4489-8b0b-fcbb2ecdfd73" xlink:to="loc_us-gaap_DefinedBenefitPlanActualReturnOnPlanAssets_9f88834a-c8dd-4ad9-8ae4-b526d54df712" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_7df85ce3-304d-46c1-8603-f5b324b4e9d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanContributionsByEmployer"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_36dd2d05-4b6d-4489-8b0b-fcbb2ecdfd73" xlink:to="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_7df85ce3-304d-46c1-8603-f5b324b4e9d8" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanPlanAssetsContributionsByPlanParticipant_dd3c851b-4194-4e91-9054-0f2c76be39f7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanPlanAssetsContributionsByPlanParticipant"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_36dd2d05-4b6d-4489-8b0b-fcbb2ecdfd73" xlink:to="loc_us-gaap_DefinedBenefitPlanPlanAssetsContributionsByPlanParticipant_dd3c851b-4194-4e91-9054-0f2c76be39f7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanPlanAssetsBenefitsPaid_630729b2-444e-4bf3-a5e7-17cb02bfa8d6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanPlanAssetsBenefitsPaid"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_36dd2d05-4b6d-4489-8b0b-fcbb2ecdfd73" xlink:to="loc_us-gaap_DefinedBenefitPlanPlanAssetsBenefitsPaid_630729b2-444e-4bf3-a5e7-17cb02bfa8d6" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DefinedBenefitPlanBenefitsPaidDirectlyByCompany_c9701888-0daf-4e00-ae3f-790f48b3657e" xlink:href="mtg-20231231.xsd#mtg_DefinedBenefitPlanBenefitsPaidDirectlyByCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_36dd2d05-4b6d-4489-8b0b-fcbb2ecdfd73" xlink:to="loc_mtg_DefinedBenefitPlanBenefitsPaidDirectlyByCompany_c9701888-0daf-4e00-ae3f-790f48b3657e" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanSettlementsPlanAssets_0bc99991-3c29-47a4-b29f-bac60c1c674b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanSettlementsPlanAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_36dd2d05-4b6d-4489-8b0b-fcbb2ecdfd73" xlink:to="loc_us-gaap_DefinedBenefitPlanSettlementsPlanAssets_0bc99991-3c29-47a4-b29f-bac60c1c674b" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssetsPeriodIncreaseDecrease_d22d8dad-3734-4ad9-90bf-1180e06574fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanFairValueOfPlanAssetsPeriodIncreaseDecrease"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanChangeInFairValueOfPlanAssetsRollForward_36dd2d05-4b6d-4489-8b0b-fcbb2ecdfd73" xlink:to="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssetsPeriodIncreaseDecrease_d22d8dad-3734-4ad9-90bf-1180e06574fc" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_772ba5d5-7eee-4ce2-91fe-732d263467bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanFairValueOfPlanAssets"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansChangeinAccumulatedOtherComprehensiveIncomeAOCIandExpectedAmortizationDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansChangeinAccumulatedOtherComprehensiveIncomeAOCIandExpectedAmortizationDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansChangeinAccumulatedOtherComprehensiveIncomeAOCIandExpectedAmortizationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_159debfa-16ba-4d03-a3db-b2f90a466d6e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_03214e04-e237-48d4-b73c-a0682dd4823e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_159debfa-16ba-4d03-a3db-b2f90a466d6e" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_03214e04-e237-48d4-b73c-a0682dd4823e" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_b4460df7-d0f8-4a42-913d-c81c4d359a1c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_03214e04-e237-48d4-b73c-a0682dd4823e" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_b4460df7-d0f8-4a42-913d-c81c4d359a1c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_b4460df7-d0f8-4a42-913d-c81c4d359a1c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_b4460df7-d0f8-4a42-913d-c81c4d359a1c" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_b4460df7-d0f8-4a42-913d-c81c4d359a1c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_397d6da4-cca5-4f6f-b9f1-3e5374d8e876" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_b4460df7-d0f8-4a42-913d-c81c4d359a1c" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_397d6da4-cca5-4f6f-b9f1-3e5374d8e876" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_21790de4-eb2f-4d6b-ad0b-3b3be972b751" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_397d6da4-cca5-4f6f-b9f1-3e5374d8e876" xlink:to="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_21790de4-eb2f-4d6b-ad0b-3b3be972b751" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_25ede391-a062-4956-94ea-bd6bc83514f8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_397d6da4-cca5-4f6f-b9f1-3e5374d8e876" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_25ede391-a062-4956-94ea-bd6bc83514f8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9630e00f-56c8-4489-bcd8-6eb4370e61dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AOCIAttributableToParentNetOfTaxRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_159debfa-16ba-4d03-a3db-b2f90a466d6e" xlink:to="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9630e00f-56c8-4489-bcd8-6eb4370e61dd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax_3ece0aa5-17b8-4019-9735-b91a8c1516bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9630e00f-56c8-4489-bcd8-6eb4370e61dd" xlink:to="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax_3ece0aa5-17b8-4019-9735-b91a8c1516bc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossAmortizationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetPriorServiceCostCreditBeforeTax_79ee4103-e8cf-4539-9e6c-bcb651237346" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossAmortizationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetPriorServiceCostCreditBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9630e00f-56c8-4489-bcd8-6eb4370e61dd" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossAmortizationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetPriorServiceCostCreditBeforeTax_79ee4103-e8cf-4539-9e6c-bcb651237346" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_ba888c78-1d2d-4688-8ef9-f241e1dd8293" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9630e00f-56c8-4489-bcd8-6eb4370e61dd" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossReclassificationAdjustmentFromAOCIPensionAndOtherPostretirementBenefitPlansForNetGainLossBeforeTax_ba888c78-1d2d-4688-8ef9-f241e1dd8293" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlanNetPriorServiceCostCreditArisingDuringPeriodBeforeTax_f46034b2-42a0-4e57-9057-ac97dfb08660" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeDefinedBenefitPlanNetPriorServiceCostCreditArisingDuringPeriodBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9630e00f-56c8-4489-bcd8-6eb4370e61dd" xlink:to="loc_us-gaap_OtherComprehensiveIncomeDefinedBenefitPlanNetPriorServiceCostCreditArisingDuringPeriodBeforeTax_f46034b2-42a0-4e57-9057-ac97dfb08660" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_f42f24eb-e668-49dd-bdcf-4708026831e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AOCIAttributableToParentNetOfTaxRollForward_9630e00f-56c8-4489-bcd8-6eb4370e61dd" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossPensionAndOtherPostretirementBenefitPlansNetUnamortizedGainLossArisingDuringPeriodBeforeTax_f42f24eb-e668-49dd-bdcf-4708026831e2" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax_ba19ff90-b024-4add-80ee-ea9204027888" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAccumulatedOtherComprehensiveIncomeBeforeTax"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansActuarialAssumptionsandYearEndAssetAllocationsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansActuarialAssumptionsandYearEndAssetAllocationsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansActuarialAssumptionsandYearEndAssetAllocationsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_26e8694f-dea7-43a0-bf1b-db7ccde25fb8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_26e8694f-dea7-43a0-bf1b-db7ccde25fb8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_c3a6cad4-cc07-4c71-9c85-22212cbeae86" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_26e8694f-dea7-43a0-bf1b-db7ccde25fb8" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_c3a6cad4-cc07-4c71-9c85-22212cbeae86" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_c3a6cad4-cc07-4c71-9c85-22212cbeae86_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_c3a6cad4-cc07-4c71-9c85-22212cbeae86" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_c3a6cad4-cc07-4c71-9c85-22212cbeae86_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_09a4fa58-9bdd-4bd2-b096-b35198ce5552" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_c3a6cad4-cc07-4c71-9c85-22212cbeae86" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_09a4fa58-9bdd-4bd2-b096-b35198ce5552" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_b9a034be-5d3c-4248-8805-c03e5560dfbe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_09a4fa58-9bdd-4bd2-b096-b35198ce5552" xlink:to="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_b9a034be-5d3c-4248-8805-c03e5560dfbe" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_5ae9d2a1-e2c3-4718-bf96-6d9cb02c5871" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_09a4fa58-9bdd-4bd2-b096-b35198ce5552" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_5ae9d2a1-e2c3-4718-bf96-6d9cb02c5871" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_00e8d7bb-b06a-45ac-bafc-e0adbbc43846" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PensionPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_09a4fa58-9bdd-4bd2-b096-b35198ce5552" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_00e8d7bb-b06a-45ac-bafc-e0adbbc43846" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_97b6304c-901b-40c3-9ea2-db97b2fa4d07" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_26e8694f-dea7-43a0-bf1b-db7ccde25fb8" xlink:to="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_97b6304c-901b-40c3-9ea2-db97b2fa4d07" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_97b6304c-901b-40c3-9ea2-db97b2fa4d07_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanAssetCategoriesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_97b6304c-901b-40c3-9ea2-db97b2fa4d07" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_97b6304c-901b-40c3-9ea2-db97b2fa4d07_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_b27ae3ce-7af0-4867-988f-b972002a8005" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanAssetCategoriesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_97b6304c-901b-40c3-9ea2-db97b2fa4d07" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_b27ae3ce-7af0-4867-988f-b972002a8005" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanEquitySecuritiesMember_949ee071-bfb5-4ef2-be08-25b53b5d1b7b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanEquitySecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_b27ae3ce-7af0-4867-988f-b972002a8005" xlink:to="loc_us-gaap_DefinedBenefitPlanEquitySecuritiesMember_949ee071-bfb5-4ef2-be08-25b53b5d1b7b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDebtSecurityMember_44f6363d-58e6-4bd3-b62b-162778059721" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDebtSecurityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_b27ae3ce-7af0-4867-988f-b972002a8005" xlink:to="loc_us-gaap_DefinedBenefitPlanDebtSecurityMember_44f6363d-58e6-4bd3-b62b-162778059721" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationDiscountRate_46dc2af6-1070-4d46-830b-549a7f4f5ce7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationDiscountRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationDiscountRate_46dc2af6-1070-4d46-830b-549a7f4f5ce7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationRateOfCompensationIncrease_1d6b52a8-880d-41f9-a5e9-6df529095b2a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationRateOfCompensationIncrease"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationRateOfCompensationIncrease_1d6b52a8-880d-41f9-a5e9-6df529095b2a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationWeightedAverageInterestCreditingRate_9a4b5487-40c0-4a45-b948-ba79e07c4d97" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationWeightedAverageInterestCreditingRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingBenefitObligationWeightedAverageInterestCreditingRate_9a4b5487-40c0-4a45-b948-ba79e07c4d97" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostDiscountRate_e3c604a4-42b0-46f1-8e66-f5892ad18649" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostDiscountRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostDiscountRate_e3c604a4-42b0-46f1-8e66-f5892ad18649" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets_c91c13c9-0c67-418b-af80-e68ad3b9a167" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets_c91c13c9-0c67-418b-af80-e68ad3b9a167" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostRateOfCompensationIncrease_3fe9ba7f-13a1-4b82-a68a-596605386961" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostRateOfCompensationIncrease"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostRateOfCompensationIncrease_3fe9ba7f-13a1-4b82-a68a-596605386961" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanHealthCareCostTrendRateAssumedNextFiscalYear_864d14d1-cd52-4d47-b2d4-b5253c0bcb13" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanHealthCareCostTrendRateAssumedNextFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:to="loc_us-gaap_DefinedBenefitPlanHealthCareCostTrendRateAssumedNextFiscalYear_864d14d1-cd52-4d47-b2d4-b5253c0bcb13" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanUltimateHealthCareCostTrendRate1_6d376fdb-e31d-4973-94b5-923e7988f6ba" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanUltimateHealthCareCostTrendRate1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:to="loc_us-gaap_DefinedBenefitPlanUltimateHealthCareCostTrendRate1_6d376fdb-e31d-4973-94b5-923e7988f6ba" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanWeightedAverageAssetAllocations_3553da79-c7f5-4603-838a-2afbd2b2b5fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanWeightedAverageAssetAllocations"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_efc1be9b-826a-42b2-a1da-aad95bd2aec4" xlink:to="loc_us-gaap_DefinedBenefitPlanWeightedAverageAssetAllocations_3553da79-c7f5-4603-838a-2afbd2b2b5fd" xlink:type="arc" order="8"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansFairValueofPlanAssetsDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansFairValueofPlanAssetsDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansFairValueofPlanAssetsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_3a1c072c-cfc6-4ee4-84b3-358cb14a8cb1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_dc5199a2-fa31-4321-9895-f2811e9bff8f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_3a1c072c-cfc6-4ee4-84b3-358cb14a8cb1" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_dc5199a2-fa31-4321-9895-f2811e9bff8f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_d479e81d-ac3d-4b19-b93e-d13b20a6b40a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_dc5199a2-fa31-4321-9895-f2811e9bff8f" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_d479e81d-ac3d-4b19-b93e-d13b20a6b40a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_d479e81d-ac3d-4b19-b93e-d13b20a6b40a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_d479e81d-ac3d-4b19-b93e-d13b20a6b40a" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_d479e81d-ac3d-4b19-b93e-d13b20a6b40a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_033f76d5-7133-4d51-8711-44db19d88366" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_d479e81d-ac3d-4b19-b93e-d13b20a6b40a" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_033f76d5-7133-4d51-8711-44db19d88366" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_48c83af0-aeec-4912-8ffb-41d599e25aef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PensionPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_033f76d5-7133-4d51-8711-44db19d88366" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_48c83af0-aeec-4912-8ffb-41d599e25aef" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_52a35226-13a1-4779-b9c9-3dd3d41bdf29" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_033f76d5-7133-4d51-8711-44db19d88366" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_52a35226-13a1-4779-b9c9-3dd3d41bdf29" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_9041755f-5252-4c3d-861b-594250effee6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_dc5199a2-fa31-4321-9895-f2811e9bff8f" xlink:to="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_9041755f-5252-4c3d-861b-594250effee6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_9041755f-5252-4c3d-861b-594250effee6_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanAssetCategoriesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_9041755f-5252-4c3d-861b-594250effee6" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_9041755f-5252-4c3d-861b-594250effee6_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_97881fc5-c9ad-4188-abf6-f4ce6eff4bdb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanAssetCategoriesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_9041755f-5252-4c3d-861b-594250effee6" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_97881fc5-c9ad-4188-abf6-f4ce6eff4bdb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DomesticMutualFundsMember_807f6044-1a5b-4671-9f76-767d45c692e2" xlink:href="mtg-20231231.xsd#mtg_DomesticMutualFundsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_97881fc5-c9ad-4188-abf6-f4ce6eff4bdb" xlink:to="loc_mtg_DomesticMutualFundsMember_807f6044-1a5b-4671-9f76-767d45c692e2" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_4e38e971-c990-4e54-a78f-d1451efd51cf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasuryAndGovernmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_97881fc5-c9ad-4188-abf6-f4ce6eff4bdb" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_4e38e971-c990-4e54-a78f-d1451efd51cf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_c6c00e4c-4a88-4a70-8789-9898f2255d51" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DomesticCorporateDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_97881fc5-c9ad-4188-abf6-f4ce6eff4bdb" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_c6c00e4c-4a88-4a70-8789-9898f2255d51" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignCorporateDebtSecuritiesMember_cb5d68a8-3337-4ab1-8391-b515f35b4bf0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ForeignCorporateDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_97881fc5-c9ad-4188-abf6-f4ce6eff4bdb" xlink:to="loc_us-gaap_ForeignCorporateDebtSecuritiesMember_cb5d68a8-3337-4ab1-8391-b515f35b4bf0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_9285b489-f60e-43e6-b1c8-758a03fd3aa7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_97881fc5-c9ad-4188-abf6-f4ce6eff4bdb" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_9285b489-f60e-43e6-b1c8-758a03fd3aa7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PooledEquityAccountsMember_89f59ae8-e04e-4285-9437-e9ffb7e26727" xlink:href="mtg-20231231.xsd#mtg_PooledEquityAccountsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_97881fc5-c9ad-4188-abf6-f4ce6eff4bdb" xlink:to="loc_mtg_PooledEquityAccountsMember_89f59ae8-e04e-4285-9437-e9ffb7e26727" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_InternationalMutualFundsMember_5eac4ce9-8bb4-4524-9d62-3a1e94484943" xlink:href="mtg-20231231.xsd#mtg_InternationalMutualFundsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_97881fc5-c9ad-4188-abf6-f4ce6eff4bdb" xlink:to="loc_mtg_InternationalMutualFundsMember_5eac4ce9-8bb4-4524-9d62-3a1e94484943" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_46802c06-96cc-4552-a7e3-9bfac0f4caf3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_dc5199a2-fa31-4321-9895-f2811e9bff8f" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_46802c06-96cc-4552-a7e3-9bfac0f4caf3" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_46802c06-96cc-4552-a7e3-9bfac0f4caf3_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_46802c06-96cc-4552-a7e3-9bfac0f4caf3" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_46802c06-96cc-4552-a7e3-9bfac0f4caf3_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_890f4ed0-b14a-48fb-a576-da5fdf7c27a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_46802c06-96cc-4552-a7e3-9bfac0f4caf3" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_890f4ed0-b14a-48fb-a576-da5fdf7c27a5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_6206c7a5-12a1-4ef7-8855-3ddab32a8ca9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel1Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_890f4ed0-b14a-48fb-a576-da5fdf7c27a5" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_6206c7a5-12a1-4ef7-8855-3ddab32a8ca9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_abe7d6f1-1e43-4d35-b661-9e98a53f4601" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_890f4ed0-b14a-48fb-a576-da5fdf7c27a5" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_abe7d6f1-1e43-4d35-b661-9e98a53f4601" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_1ea2680a-6f3c-4eeb-a4eb-ddae01cabb23" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanFairValueOfPlanAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_3a1c072c-cfc6-4ee4-84b3-358cb14a8cb1" xlink:to="loc_us-gaap_DefinedBenefitPlanFairValueOfPlanAssets_1ea2680a-6f3c-4eeb-a4eb-ddae01cabb23" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansAdditionalDisclosuresDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansAdditionalDisclosuresDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansAdditionalDisclosuresDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_4fcd024b-e1e6-4459-a629-b5203a54f61d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_02b38526-f8f7-40d0-b80b-7cd0674d26a5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_4fcd024b-e1e6-4459-a629-b5203a54f61d" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_02b38526-f8f7-40d0-b80b-7cd0674d26a5" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_c90e1156-4ceb-4654-8bcd-c6f32ccefa62" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_02b38526-f8f7-40d0-b80b-7cd0674d26a5" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_c90e1156-4ceb-4654-8bcd-c6f32ccefa62" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_c90e1156-4ceb-4654-8bcd-c6f32ccefa62_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_c90e1156-4ceb-4654-8bcd-c6f32ccefa62" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_c90e1156-4ceb-4654-8bcd-c6f32ccefa62_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_8310af9f-e26e-4058-8d5b-346f9b17afb4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_c90e1156-4ceb-4654-8bcd-c6f32ccefa62" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_8310af9f-e26e-4058-8d5b-346f9b17afb4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_3f0147ec-735e-468f-bf33-b8be25622796" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_8310af9f-e26e-4058-8d5b-346f9b17afb4" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_3f0147ec-735e-468f-bf33-b8be25622796" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_4986bd76-c50c-4ed9-873f-3df87f272c64" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_8310af9f-e26e-4058-8d5b-346f9b17afb4" xlink:to="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_4986bd76-c50c-4ed9-873f-3df87f272c64" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_3816418f-8523-4d55-ace4-e094219472b9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PensionPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_8310af9f-e26e-4058-8d5b-346f9b17afb4" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_3816418f-8523-4d55-ace4-e094219472b9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_7898404b-879a-49b0-a958-a22c0233147d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_02b38526-f8f7-40d0-b80b-7cd0674d26a5" xlink:to="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_7898404b-879a-49b0-a958-a22c0233147d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_7898404b-879a-49b0-a958-a22c0233147d_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanAssetCategoriesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_7898404b-879a-49b0-a958-a22c0233147d" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_7898404b-879a-49b0-a958-a22c0233147d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_8eac9566-98ca-4134-9533-32ddcaa3b6c3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanAssetCategoriesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_7898404b-879a-49b0-a958-a22c0233147d" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_8eac9566-98ca-4134-9533-32ddcaa3b6c3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanEquitySecuritiesMember_96bc8e4c-9555-4840-bfbe-cf319b414392" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanEquitySecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_8eac9566-98ca-4134-9533-32ddcaa3b6c3" xlink:to="loc_us-gaap_DefinedBenefitPlanEquitySecuritiesMember_96bc8e4c-9555-4840-bfbe-cf319b414392" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RealEstateMember_79d55c3e-60a1-4fd1-84c8-4ba3352612d4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RealEstateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_8eac9566-98ca-4134-9533-32ddcaa3b6c3" xlink:to="loc_us-gaap_RealEstateMember_79d55c3e-60a1-4fd1-84c8-4ba3352612d4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommoditiesInvestmentMember_4cddf86c-f4a3-4e26-8be7-c8d82e35a351" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommoditiesInvestmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_8eac9566-98ca-4134-9533-32ddcaa3b6c3" xlink:to="loc_us-gaap_CommoditiesInvestmentMember_4cddf86c-f4a3-4e26-8be7-c8d82e35a351" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FixedIncomeFundsMember_38d1758a-0c55-4807-b644-1cfbf6c7d08d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FixedIncomeFundsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_8eac9566-98ca-4134-9533-32ddcaa3b6c3" xlink:to="loc_us-gaap_FixedIncomeFundsMember_38d1758a-0c55-4807-b644-1cfbf6c7d08d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_e01b91df-36f3-43b7-810c-7ab8e1a7f741" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_02b38526-f8f7-40d0-b80b-7cd0674d26a5" xlink:to="loc_srt_RangeAxis_e01b91df-36f3-43b7-810c-7ab8e1a7f741" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_e01b91df-36f3-43b7-810c-7ab8e1a7f741_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_e01b91df-36f3-43b7-810c-7ab8e1a7f741" xlink:to="loc_srt_RangeMember_e01b91df-36f3-43b7-810c-7ab8e1a7f741_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_bbdd003d-daa6-4ad8-99d5-1e0eaa413333" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_e01b91df-36f3-43b7-810c-7ab8e1a7f741" xlink:to="loc_srt_RangeMember_bbdd003d-daa6-4ad8-99d5-1e0eaa413333" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_a4b3f771-a728-4c12-895b-8d3f43181c01" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_bbdd003d-daa6-4ad8-99d5-1e0eaa413333" xlink:to="loc_srt_MinimumMember_a4b3f771-a728-4c12-895b-8d3f43181c01" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_853b7f29-beeb-4af9-9573-27a7cb49499a" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_bbdd003d-daa6-4ad8-99d5-1e0eaa413333" xlink:to="loc_srt_MaximumMember_853b7f29-beeb-4af9-9573-27a7cb49499a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanPlanAssetsTargetAllocationPercentage_86c61142-3d1b-4772-86c2-cb39c162275b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanPlanAssetsTargetAllocationPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_4fcd024b-e1e6-4459-a629-b5203a54f61d" xlink:to="loc_us-gaap_DefinedBenefitPlanPlanAssetsTargetAllocationPercentage_86c61142-3d1b-4772-86c2-cb39c162275b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsNextTwelveMonths_f629e78c-82ae-46ff-8dd2-81faad9cc6fe" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsNextTwelveMonths"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_4fcd024b-e1e6-4459-a629-b5203a54f61d" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsNextTwelveMonths_f629e78c-82ae-46ff-8dd2-81faad9cc6fe" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearTwo_4914d473-65f0-471c-bb81-73e56b7d8ce9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearTwo"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_4fcd024b-e1e6-4459-a629-b5203a54f61d" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearTwo_4914d473-65f0-471c-bb81-73e56b7d8ce9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearThree_98cf3fee-7b76-4985-9727-5d60310b32a7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearThree"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_4fcd024b-e1e6-4459-a629-b5203a54f61d" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearThree_98cf3fee-7b76-4985-9727-5d60310b32a7" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFour_786ddf8d-97af-4f4e-8b8c-6f10fdebd556" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFour"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_4fcd024b-e1e6-4459-a629-b5203a54f61d" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFour_786ddf8d-97af-4f4e-8b8c-6f10fdebd556" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFive_c69f0638-043e-4a11-be12-383d24136e40" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFive"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_4fcd024b-e1e6-4459-a629-b5203a54f61d" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsYearFive_c69f0638-043e-4a11-be12-383d24136e40" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsFiveFiscalYearsThereafter_888a83d4-fb7a-4dee-b577-77e8236b868e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsFiveFiscalYearsThereafter"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_4fcd024b-e1e6-4459-a629-b5203a54f61d" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureBenefitPaymentsFiveFiscalYearsThereafter_888a83d4-fb7a-4dee-b577-77e8236b868e" xlink:type="arc" order="6"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/BenefitPlansNarrativeDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#BenefitPlansNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/BenefitPlansNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_117a869e-e1ad-431c-9aa6-bede485659d1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_117a869e-e1ad-431c-9aa6-bede485659d1" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_9f55d919-58c9-4cb4-b16d-fdbc90072179" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_117a869e-e1ad-431c-9aa6-bede485659d1" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_9f55d919-58c9-4cb4-b16d-fdbc90072179" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_9f55d919-58c9-4cb4-b16d-fdbc90072179_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_9f55d919-58c9-4cb4-b16d-fdbc90072179" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_9f55d919-58c9-4cb4-b16d-fdbc90072179_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_c05370d7-a4a2-41d6-8c3b-b17b80614dc6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_9f55d919-58c9-4cb4-b16d-fdbc90072179" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_c05370d7-a4a2-41d6-8c3b-b17b80614dc6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_fea6040d-6efa-47f4-b82b-a9f6bf0f27cc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_c05370d7-a4a2-41d6-8c3b-b17b80614dc6" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_fea6040d-6efa-47f4-b82b-a9f6bf0f27cc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_2b94074e-f3da-4f19-ad31-ecac0346c1f5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_c05370d7-a4a2-41d6-8c3b-b17b80614dc6" xlink:to="loc_us-gaap_OtherPensionPlansPostretirementOrSupplementalPlansDefinedBenefitMember_2b94074e-f3da-4f19-ad31-ecac0346c1f5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_36877b5a-dcfb-48fb-9612-32ae8572d9b4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PensionPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_c05370d7-a4a2-41d6-8c3b-b17b80614dc6" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_36877b5a-dcfb-48fb-9612-32ae8572d9b4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_95783aa0-e2ec-417d-ae9d-ab90f7cbd080" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_117a869e-e1ad-431c-9aa6-bede485659d1" xlink:to="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_95783aa0-e2ec-417d-ae9d-ab90f7cbd080" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_95783aa0-e2ec-417d-ae9d-ab90f7cbd080_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanAssetCategoriesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_95783aa0-e2ec-417d-ae9d-ab90f7cbd080" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_95783aa0-e2ec-417d-ae9d-ab90f7cbd080_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanAssetCategoriesDomain_df1e10ca-089d-43e1-b1ba-fc7f37c4cfa0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanAssetCategoriesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DefinedBenefitPlanByPlanAssetCategoriesAxis_95783aa0-e2ec-417d-ae9d-ab90f7cbd080" xlink:to="loc_us-gaap_PlanAssetCategoriesDomain_df1e10ca-089d-43e1-b1ba-fc7f37c4cfa0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanEquitySecuritiesMember_65f12259-ee95-47db-bb80-fd16adcda12a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanEquitySecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanAssetCategoriesDomain_df1e10ca-089d-43e1-b1ba-fc7f37c4cfa0" xlink:to="loc_us-gaap_DefinedBenefitPlanEquitySecuritiesMember_65f12259-ee95-47db-bb80-fd16adcda12a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_910b02c7-56a5-40a7-b462-a1bc0035a9f2" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_117a869e-e1ad-431c-9aa6-bede485659d1" xlink:to="loc_srt_RangeAxis_910b02c7-56a5-40a7-b462-a1bc0035a9f2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_910b02c7-56a5-40a7-b462-a1bc0035a9f2_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_910b02c7-56a5-40a7-b462-a1bc0035a9f2" xlink:to="loc_srt_RangeMember_910b02c7-56a5-40a7-b462-a1bc0035a9f2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_1146c17f-b3d0-42b5-858a-5f3c05d28b66" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_910b02c7-56a5-40a7-b462-a1bc0035a9f2" xlink:to="loc_srt_RangeMember_1146c17f-b3d0-42b5-858a-5f3c05d28b66" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_eb2cb231-98da-4d1c-bbe7-51e31f9f3d35" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_1146c17f-b3d0-42b5-858a-5f3c05d28b66" xlink:to="loc_srt_MaximumMember_eb2cb231-98da-4d1c-bbe7-51e31f9f3d35" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_d30c7289-c3e4-4fa1-a7f8-9e5aa1a88889" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_117a869e-e1ad-431c-9aa6-bede485659d1" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_d30c7289-c3e4-4fa1-a7f8-9e5aa1a88889" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_d30c7289-c3e4-4fa1-a7f8-9e5aa1a88889_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_d30c7289-c3e4-4fa1-a7f8-9e5aa1a88889" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_d30c7289-c3e4-4fa1-a7f8-9e5aa1a88889_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_cf1d0adf-4932-4100-8d2b-63fcf4ab59e3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_d30c7289-c3e4-4fa1-a7f8-9e5aa1a88889" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_cf1d0adf-4932-4100-8d2b-63fcf4ab59e3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventMember_89e979e7-b3a9-44a3-9efe-051824683da0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_cf1d0adf-4932-4100-8d2b-63fcf4ab59e3" xlink:to="loc_us-gaap_SubsequentEventMember_89e979e7-b3a9-44a3-9efe-051824683da0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_MinimumPercentagesOfGainLossConsiderForAmortization_325adf6f-27e0-453a-8d64-16666c84e42d" xlink:href="mtg-20231231.xsd#mtg_MinimumPercentagesOfGainLossConsiderForAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_mtg_MinimumPercentagesOfGainLossConsiderForAmortization_325adf6f-27e0-453a-8d64-16666c84e42d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DefinedBenefitPlanMinimumValueOfOutstandingNoncallableBondsUsedInHypotheticalCashFlowBondMatchingExercise_4d962ca2-3eae-4aaa-a9b3-ea723792bec0" xlink:href="mtg-20231231.xsd#mtg_DefinedBenefitPlanMinimumValueOfOutstandingNoncallableBondsUsedInHypotheticalCashFlowBondMatchingExercise"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_mtg_DefinedBenefitPlanMinimumValueOfOutstandingNoncallableBondsUsedInHypotheticalCashFlowBondMatchingExercise_4d962ca2-3eae-4aaa-a9b3-ea723792bec0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DefinedBenefitPlanFutureEarningsPeriodUsedInDeterminingExpectedAverageRateOfEarnings_ae8525cd-a24b-4574-94c8-8ffa423e4128" xlink:href="mtg-20231231.xsd#mtg_DefinedBenefitPlanFutureEarningsPeriodUsedInDeterminingExpectedAverageRateOfEarnings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_mtg_DefinedBenefitPlanFutureEarningsPeriodUsedInDeterminingExpectedAverageRateOfEarnings_ae8525cd-a24b-4574-94c8-8ffa423e4128" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_MinimumPercentageReturnShouldExceedGrowthInConsumerPriceIndexAnnually_cb495f0c-f743-48b6-9154-a17faf1d1bb3" xlink:href="mtg-20231231.xsd#mtg_MinimumPercentageReturnShouldExceedGrowthInConsumerPriceIndexAnnually"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_mtg_MinimumPercentageReturnShouldExceedGrowthInConsumerPriceIndexAnnually_cb495f0c-f743-48b6-9154-a17faf1d1bb3" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DefinedBenefitPlanMaximuminvestmentininternationalmutualfunds_3765554e-53f3-43f9-a98e-1def7b247e2b" xlink:href="mtg-20231231.xsd#mtg_DefinedBenefitPlanMaximuminvestmentininternationalmutualfunds"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_mtg_DefinedBenefitPlanMaximuminvestmentininternationalmutualfunds_3765554e-53f3-43f9-a98e-1def7b247e2b" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_Percentofinternationalmutualfundsequityallocationinemergingmarkets_d518669e-0010-4bef-93a4-6af12f577193" xlink:href="mtg-20231231.xsd#mtg_Percentofinternationalmutualfundsequityallocationinemergingmarkets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_mtg_Percentofinternationalmutualfundsequityallocationinemergingmarkets_d518669e-0010-4bef-93a4-6af12f577193" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PercentofinternationalmutualfundsequityallocationincompaniesprimarilybasedinEuropeandPacificBasin_fccf7290-1e43-4df8-8073-8f669fdb9dc3" xlink:href="mtg-20231231.xsd#mtg_PercentofinternationalmutualfundsequityallocationincompaniesprimarilybasedinEuropeandPacificBasin"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_mtg_PercentofinternationalmutualfundsequityallocationincompaniesprimarilybasedinEuropeandPacificBasin_fccf7290-1e43-4df8-8073-8f669fdb9dc3" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_f0e09872-ae2a-4328-9310-abe15e595892" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanContributionsByEmployer"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_f0e09872-ae2a-4328-9310-abe15e595892" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedFutureEmployerContributionsNextFiscalYear_1dfb1c5e-ec47-41f1-a549-b30add6786fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedBenefitPlanExpectedFutureEmployerContributionsNextFiscalYear"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedFutureEmployerContributionsNextFiscalYear_1dfb1c5e-ec47-41f1-a549-b30add6786fd" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DiscretionaryProfitSharingContributionAsPercentageOfParticipantsEligibleCompensation_035da6b6-5efd-4136-b5bc-81e4887d44fa" xlink:href="mtg-20231231.xsd#mtg_DiscretionaryProfitSharingContributionAsPercentageOfParticipantsEligibleCompensation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_mtg_DiscretionaryProfitSharingContributionAsPercentageOfParticipantsEligibleCompensation_035da6b6-5efd-4136-b5bc-81e4887d44fa" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedContributionPlanEmployerMatchingContributionPercentOfMatch_9c8aefd7-b81c-4f7c-8b09-467b14d5183e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedContributionPlanEmployerMatchingContributionPercentOfMatch"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_us-gaap_DefinedContributionPlanEmployerMatchingContributionPercentOfMatch_9c8aefd7-b81c-4f7c-8b09-467b14d5183e" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedContributionPlanEmployerMatchingContributionPercent_8cbaebf0-8d3d-440e-8f39-1eb9e4c71824" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedContributionPlanEmployerMatchingContributionPercent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_us-gaap_DefinedContributionPlanEmployerMatchingContributionPercent_8cbaebf0-8d3d-440e-8f39-1eb9e4c71824" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DefinedContributionPlanEmployerMatchingContributionPercentOfMatchNextTwoPercentContributed_1390dd31-769f-47cd-a7de-b0f2160f974c" xlink:href="mtg-20231231.xsd#mtg_DefinedContributionPlanEmployerMatchingContributionPercentOfMatchNextTwoPercentContributed"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_mtg_DefinedContributionPlanEmployerMatchingContributionPercentOfMatchNextTwoPercentContributed_1390dd31-769f-47cd-a7de-b0f2160f974c" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DefinedContributionPlanEmployerMatchingContributionPercentOfEmployeesGrossPayNextTwoPercentContributed_9d4ebb74-544b-4714-8fe8-78847514ffb6" xlink:href="mtg-20231231.xsd#mtg_DefinedContributionPlanEmployerMatchingContributionPercentOfEmployeesGrossPayNextTwoPercentContributed"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_mtg_DefinedContributionPlanEmployerMatchingContributionPercentOfEmployeesGrossPayNextTwoPercentContributed_9d4ebb74-544b-4714-8fe8-78847514ffb6" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedContributionPlanCostRecognized_690acd97-7cba-473a-b7d8-633712c78edd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DefinedContributionPlanCostRecognized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_c569a46a-f786-48cf-9d07-0327086ab0ee" xlink:to="loc_us-gaap_DefinedContributionPlanCostRecognized_690acd97-7cba-473a-b7d8-633712c78edd" xlink:type="arc" order="14"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/ShareholdersEquityDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#ShareholdersEquityDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/ShareholdersEquityDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockLineItems_fe231415-c2c7-401b-afbd-3dbc056baec5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ClassOfStockLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfStockByClassTable_dfc207d0-4f8b-4a56-bd04-e135f13ea791" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfStockByClassTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_fe231415-c2c7-401b-afbd-3dbc056baec5" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_dfc207d0-4f8b-4a56-bd04-e135f13ea791" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_63023950-1fa6-4172-8c8b-76cbe59ef234" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_dfc207d0-4f8b-4a56-bd04-e135f13ea791" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_63023950-1fa6-4172-8c8b-76cbe59ef234" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_63023950-1fa6-4172-8c8b-76cbe59ef234_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_63023950-1fa6-4172-8c8b-76cbe59ef234" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_63023950-1fa6-4172-8c8b-76cbe59ef234_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_b9e8a20a-9f6b-44c0-b0a6-320dd43a24dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_63023950-1fa6-4172-8c8b-76cbe59ef234" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_b9e8a20a-9f6b-44c0-b0a6-320dd43a24dd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventMember_cbf8911d-26bb-4e96-a483-9fdc60ac8a86" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_b9e8a20a-9f6b-44c0-b0a6-320dd43a24dd" xlink:to="loc_us-gaap_SubsequentEventMember_cbf8911d-26bb-4e96-a483-9fdc60ac8a86" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CumulativeEffectPeriodOfAdoptionAxis_66a4d735-3711-4612-bd50-485088bee2e5" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CumulativeEffectPeriodOfAdoptionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_dfc207d0-4f8b-4a56-bd04-e135f13ea791" xlink:to="loc_srt_CumulativeEffectPeriodOfAdoptionAxis_66a4d735-3711-4612-bd50-485088bee2e5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_66a4d735-3711-4612-bd50-485088bee2e5_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CumulativeEffectPeriodOfAdoptionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_CumulativeEffectPeriodOfAdoptionAxis_66a4d735-3711-4612-bd50-485088bee2e5" xlink:to="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_66a4d735-3711-4612-bd50-485088bee2e5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_27e810dc-6dfa-40f2-9297-60bebf89fc9d" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CumulativeEffectPeriodOfAdoptionDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_CumulativeEffectPeriodOfAdoptionAxis_66a4d735-3711-4612-bd50-485088bee2e5" xlink:to="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_27e810dc-6dfa-40f2-9297-60bebf89fc9d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember_49eda83c-da0b-4f71-baac-5742e959eda5" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_CumulativeEffectPeriodOfAdoptionDomain_27e810dc-6dfa-40f2-9297-60bebf89fc9d" xlink:to="loc_srt_CumulativeEffectPeriodOfAdoptionAdjustmentMember_49eda83c-da0b-4f71-baac-5742e959eda5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_3c279749-781e-4c2f-9d4f-c85ef0212919" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_fe231415-c2c7-401b-afbd-3dbc056baec5" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_3c279749-781e-4c2f-9d4f-c85ef0212919" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_e8b63b30-3e66-43ab-b38f-afb0c6532ae0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_fe231415-c2c7-401b-afbd-3dbc056baec5" xlink:to="loc_us-gaap_AdditionalPaidInCapital_e8b63b30-3e66-43ab-b38f-afb0c6532ae0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_9a109ec2-3c8d-4db2-9790-7b490e40388e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_fe231415-c2c7-401b-afbd-3dbc056baec5" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_9a109ec2-3c8d-4db2-9790-7b490e40388e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockAcquiredAverageCostPerShare_f4a02d56-2189-4f03-8ad0-18d0e643ef42" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockAcquiredAverageCostPerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_fe231415-c2c7-401b-afbd-3dbc056baec5" xlink:to="loc_us-gaap_TreasuryStockAcquiredAverageCostPerShare_f4a02d56-2189-4f03-8ad0-18d0e643ef42" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1_eb144ebb-d57c-43a8-abe5-4706a8c83a8c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_fe231415-c2c7-401b-afbd-3dbc056baec5" xlink:to="loc_us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1_eb144ebb-d57c-43a8-abe5-4706a8c83a8c" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockDividendsPerShareCashPaid_d654278e-72c5-461d-994a-7cb6adcd9941" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockDividendsPerShareCashPaid"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_fe231415-c2c7-401b-afbd-3dbc056baec5" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_d654278e-72c5-461d-994a-7cb6adcd9941" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsCash_9ee20efe-fea8-4391-b127-c5f85b44b9e7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DividendsCash"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_fe231415-c2c7-401b-afbd-3dbc056baec5" xlink:to="loc_us-gaap_DividendsCash_9ee20efe-fea8-4391-b127-c5f85b44b9e7" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockDividendsPerShareDeclared_dfa5542f-81ff-463f-81ec-0dbacd19d6a0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockDividendsPerShareDeclared"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_fe231415-c2c7-401b-afbd-3dbc056baec5" xlink:to="loc_us-gaap_CommonStockDividendsPerShareDeclared_dfa5542f-81ff-463f-81ec-0dbacd19d6a0" xlink:type="arc" order="7"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/StatutoryInformationNarrativeDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#StatutoryInformationNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/StatutoryInformationNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionLineItems_1661f240-3201-4773-bd58-6d2e26effbb4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_ffb794aa-cec5-4ea1-a440-09d8f26e631b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_1661f240-3201-4773-bd58-6d2e26effbb4" xlink:to="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_ffb794aa-cec5-4ea1-a440-09d8f26e631b" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LegalEntityAxis_af325220-1e9e-4399-bd67-ee199beff50f" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_LegalEntityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_ffb794aa-cec5-4ea1-a440-09d8f26e631b" xlink:to="loc_dei_LegalEntityAxis_af325220-1e9e-4399-bd67-ee199beff50f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_af325220-1e9e-4399-bd67-ee199beff50f_default" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_af325220-1e9e-4399-bd67-ee199beff50f" xlink:to="loc_dei_EntityDomain_af325220-1e9e-4399-bd67-ee199beff50f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_c6545147-6819-479b-8aaa-003e6bad4657" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_af325220-1e9e-4399-bd67-ee199beff50f" xlink:to="loc_dei_EntityDomain_c6545147-6819-479b-8aaa-003e6bad4657" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_MortgageGuarantyInsuranceCorporationMember_22ab0daf-d126-4412-a757-a94743ff2b14" xlink:href="mtg-20231231.xsd#mtg_MortgageGuarantyInsuranceCorporationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_c6545147-6819-479b-8aaa-003e6bad4657" xlink:to="loc_mtg_MortgageGuarantyInsuranceCorporationMember_22ab0daf-d126-4412-a757-a94743ff2b14" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_a840437e-26d0-4fa5-8734-2d7108e830c8" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_ffb794aa-cec5-4ea1-a440-09d8f26e631b" xlink:to="loc_srt_RangeAxis_a840437e-26d0-4fa5-8734-2d7108e830c8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_a840437e-26d0-4fa5-8734-2d7108e830c8_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_a840437e-26d0-4fa5-8734-2d7108e830c8" xlink:to="loc_srt_RangeMember_a840437e-26d0-4fa5-8734-2d7108e830c8_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_94bf1e50-25bd-442b-a734-52ca4b053a0d" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_a840437e-26d0-4fa5-8734-2d7108e830c8" xlink:to="loc_srt_RangeMember_94bf1e50-25bd-442b-a734-52ca4b053a0d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_3ee6abb1-dbfb-4f62-8c0a-8b37f71db7ae" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_94bf1e50-25bd-442b-a734-52ca4b053a0d" xlink:to="loc_srt_MaximumMember_3ee6abb1-dbfb-4f62-8c0a-8b37f71db7ae" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesAxis_9c67072b-7183-484b-9753-89ab29daf86e" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_ffb794aa-cec5-4ea1-a440-09d8f26e631b" xlink:to="loc_srt_ConsolidatedEntitiesAxis_9c67072b-7183-484b-9753-89ab29daf86e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_9c67072b-7183-484b-9753-89ab29daf86e_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidatedEntitiesAxis_9c67072b-7183-484b-9753-89ab29daf86e" xlink:to="loc_srt_ConsolidatedEntitiesDomain_9c67072b-7183-484b-9753-89ab29daf86e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_fde603ef-5114-4a30-b58b-22d3d3ff4b40" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidatedEntitiesAxis_9c67072b-7183-484b-9753-89ab29daf86e" xlink:to="loc_srt_ConsolidatedEntitiesDomain_fde603ef-5114-4a30-b58b-22d3d3ff4b40" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SubsidiariesMember_2a0f8024-56d3-45a8-834a-fc81cf77dd11" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SubsidiariesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidatedEntitiesDomain_fde603ef-5114-4a30-b58b-22d3d3ff4b40" xlink:to="loc_srt_SubsidiariesMember_2a0f8024-56d3-45a8-834a-fc81cf77dd11" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:href="mtg-20231231.xsd#mtg_StatutoryCapitalRequirementsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_1661f240-3201-4773-bd58-6d2e26effbb4" xlink:to="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_NumberOfJurisdictionsWithRiskToCapitalRequirements_4a58c828-c386-4ac9-8f54-cbeab1eee69a" xlink:href="mtg-20231231.xsd#mtg_NumberOfJurisdictionsWithRiskToCapitalRequirements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:to="loc_mtg_NumberOfJurisdictionsWithRiskToCapitalRequirements_4a58c828-c386-4ac9-8f54-cbeab1eee69a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DescriptionOfRegulatoryCapitalRequirementsUnderInsuranceRegulations_aa1c1bee-8bdc-4b62-8af9-67db77668ba6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DescriptionOfRegulatoryCapitalRequirementsUnderInsuranceRegulations"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:to="loc_us-gaap_DescriptionOfRegulatoryCapitalRequirementsUnderInsuranceRegulations_aa1c1bee-8bdc-4b62-8af9-67db77668ba6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_Risktocapitalratioatendofperiod_f76120c9-30a3-4909-8165-be36fc869b03" xlink:href="mtg-20231231.xsd#mtg_Risktocapitalratioatendofperiod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:to="loc_mtg_Risktocapitalratioatendofperiod_f76120c9-30a3-4909-8165-be36fc869b03" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_StatutoryCapitalRequirementsRiskToCapitalRatio_9d2bb55d-a7cc-43a9-9da3-bd0464986cec" xlink:href="mtg-20231231.xsd#mtg_StatutoryCapitalRequirementsRiskToCapitalRatio"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:to="loc_mtg_StatutoryCapitalRequirementsRiskToCapitalRatio_9d2bb55d-a7cc-43a9-9da3-bd0464986cec" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AmountOfPolicyholdersPositionAboveOrBelowRequiredRegulatoryMinimum_65da8c69-94ef-4121-a759-27bead9936fd" xlink:href="mtg-20231231.xsd#mtg_AmountOfPolicyholdersPositionAboveOrBelowRequiredRegulatoryMinimum"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:to="loc_mtg_AmountOfPolicyholdersPositionAboveOrBelowRequiredRegulatoryMinimum_65da8c69-94ef-4121-a759-27bead9936fd" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AmountOfRequiredMpp_516da471-7161-400a-8c9d-cd480347f3e3" xlink:href="mtg-20231231.xsd#mtg_AmountOfRequiredMpp"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:to="loc_mtg_AmountOfRequiredMpp_516da471-7161-400a-8c9d-cd480347f3e3" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PercentageOfStatutoryPolicyholdersSurplusUsedToDetermineMaximumAllowableDividends_c9aa35be-403c-47d4-9eda-285ead28e7ef" xlink:href="mtg-20231231.xsd#mtg_PercentageOfStatutoryPolicyholdersSurplusUsedToDetermineMaximumAllowableDividends"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:to="loc_mtg_PercentageOfStatutoryPolicyholdersSurplusUsedToDetermineMaximumAllowableDividends_c9aa35be-403c-47d4-9eda-285ead28e7ef" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_StatutoryAccountingPracticesStatutoryAmountAvailableForDividendPaymentsWithoutRegulatoryApprovalMeasurementMeasurementPeriod_033fe749-29ed-4122-b72d-747f178cd237" xlink:href="mtg-20231231.xsd#mtg_StatutoryAccountingPracticesStatutoryAmountAvailableForDividendPaymentsWithoutRegulatoryApprovalMeasurementMeasurementPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:to="loc_mtg_StatutoryAccountingPracticesStatutoryAmountAvailableForDividendPaymentsWithoutRegulatoryApprovalMeasurementMeasurementPeriod_033fe749-29ed-4122-b72d-747f178cd237" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_StatutoryAccountingPracticesStatutoryAmountAvailableforDividendPaymentswithoutRegulatoryApprovalMeasurementDividendPaymentPeriod_54f5d08a-a287-4e4c-85cc-5ab3bf870108" xlink:href="mtg-20231231.xsd#mtg_StatutoryAccountingPracticesStatutoryAmountAvailableforDividendPaymentswithoutRegulatoryApprovalMeasurementDividendPaymentPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_StatutoryCapitalRequirementsAbstract_867b28b1-2fb8-45a5-a6a0-4ed1027d7c92" xlink:to="loc_mtg_StatutoryAccountingPracticesStatutoryAmountAvailableforDividendPaymentswithoutRegulatoryApprovalMeasurementDividendPaymentPeriod_54f5d08a-a287-4e4c-85cc-5ab3bf870108" xlink:type="arc" order="9"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/StatutoryInformationSurpluscontributionsanddividendsofinsurancesubsidiariesDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#StatutoryInformationSurpluscontributionsanddividendsofinsurancesubsidiariesDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/StatutoryInformationSurpluscontributionsanddividendsofinsurancesubsidiariesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RelatedPartyTransactionLineItems_04b0b715-f092-4095-ab8e-760934976176" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RelatedPartyTransactionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_a8657822-4b98-48e4-b662-415b0fdd0dd4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_04b0b715-f092-4095-ab8e-760934976176" xlink:to="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_a8657822-4b98-48e4-b662-415b0fdd0dd4" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LegalEntityAxis_9be28a42-f1e7-4df8-9fcb-acfff20843c9" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_LegalEntityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable_a8657822-4b98-48e4-b662-415b0fdd0dd4" xlink:to="loc_dei_LegalEntityAxis_9be28a42-f1e7-4df8-9fcb-acfff20843c9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_9be28a42-f1e7-4df8-9fcb-acfff20843c9_default" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_9be28a42-f1e7-4df8-9fcb-acfff20843c9" xlink:to="loc_dei_EntityDomain_9be28a42-f1e7-4df8-9fcb-acfff20843c9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_4bdda15c-1527-4c50-867e-af12a0d5634e" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_9be28a42-f1e7-4df8-9fcb-acfff20843c9" xlink:to="loc_dei_EntityDomain_4bdda15c-1527-4c50-867e-af12a0d5634e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_MortgageGuarantyInsuranceCorporationMember_e08592a0-ca80-4eb4-be24-5083d0a9976d" xlink:href="mtg-20231231.xsd#mtg_MortgageGuarantyInsuranceCorporationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_4bdda15c-1527-4c50-867e-af12a0d5634e" xlink:to="loc_mtg_MortgageGuarantyInsuranceCorporationMember_e08592a0-ca80-4eb4-be24-5083d0a9976d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromContributionsFromParent_acbda889-3cc0-4f5d-ac1a-15bc64c68eb6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromContributionsFromParent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_04b0b715-f092-4095-ab8e-760934976176" xlink:to="loc_us-gaap_ProceedsFromContributionsFromParent_acbda889-3cc0-4f5d-ac1a-15bc64c68eb6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashDividendsPaidToParentCompany_08b7e9a8-ed64-424c-b8f4-7490508f73f7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashDividendsPaidToParentCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_04b0b715-f092-4095-ab8e-760934976176" xlink:to="loc_us-gaap_CashDividendsPaidToParentCompany_08b7e9a8-ed64-424c-b8f4-7490508f73f7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_DividendDistributionOfInvestmentInSubsidiary_5129b06e-514f-4ab5-998d-a94d6413620c" xlink:href="mtg-20231231.xsd#mtg_DividendDistributionOfInvestmentInSubsidiary"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RelatedPartyTransactionLineItems_04b0b715-f092-4095-ab8e-760934976176" xlink:to="loc_mtg_DividendDistributionOfInvestmentInSubsidiary_5129b06e-514f-4ab5-998d-a94d6413620c" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/SharebasedCompensationPlansDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#SharebasedCompensationPlansDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/SharebasedCompensationPlansDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_15b08f9e-a4c4-45e2-8286-3159124487c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_695db2bb-38de-4579-8e06-6b61cc43d615" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_15b08f9e-a4c4-45e2-8286-3159124487c1" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_695db2bb-38de-4579-8e06-6b61cc43d615" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_236394f1-6bce-4733-addf-bc8b99865ad0" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_695db2bb-38de-4579-8e06-6b61cc43d615" xlink:to="loc_srt_RangeAxis_236394f1-6bce-4733-addf-bc8b99865ad0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_236394f1-6bce-4733-addf-bc8b99865ad0_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_236394f1-6bce-4733-addf-bc8b99865ad0" xlink:to="loc_srt_RangeMember_236394f1-6bce-4733-addf-bc8b99865ad0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_6e48589c-ab05-4e5d-92bf-e80ff4d87757" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_236394f1-6bce-4733-addf-bc8b99865ad0" xlink:to="loc_srt_RangeMember_6e48589c-ab05-4e5d-92bf-e80ff4d87757" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_30743dac-2c86-46a6-9229-fcf71ce18a14" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_6e48589c-ab05-4e5d-92bf-e80ff4d87757" xlink:to="loc_srt_MinimumMember_30743dac-2c86-46a6-9229-fcf71ce18a14" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_9d699af1-4d50-4bb4-83ca-8e0a944bdc52" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_6e48589c-ab05-4e5d-92bf-e80ff4d87757" xlink:to="loc_srt_MaximumMember_9d699af1-4d50-4bb4-83ca-8e0a944bdc52" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameAxis_db6e52a3-69cc-4887-8bf1-8477c6ede3df" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_695db2bb-38de-4579-8e06-6b61cc43d615" xlink:to="loc_us-gaap_PlanNameAxis_db6e52a3-69cc-4887-8bf1-8477c6ede3df" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameDomain_db6e52a3-69cc-4887-8bf1-8477c6ede3df_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_db6e52a3-69cc-4887-8bf1-8477c6ede3df" xlink:to="loc_us-gaap_PlanNameDomain_db6e52a3-69cc-4887-8bf1-8477c6ede3df_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameDomain_82eed179-47c5-4196-95b0-89e413d68890" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_db6e52a3-69cc-4887-8bf1-8477c6ede3df" xlink:to="loc_us-gaap_PlanNameDomain_82eed179-47c5-4196-95b0-89e413d68890" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_A2020PlanMember_54974dc4-1996-4761-8b26-327d4e6d03e2" xlink:href="mtg-20231231.xsd#mtg_A2020PlanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_82eed179-47c5-4196-95b0-89e413d68890" xlink:to="loc_mtg_A2020PlanMember_54974dc4-1996-4761-8b26-327d4e6d03e2" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_0d0429d3-c521-4c76-be71-7b4af3ae58bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_695db2bb-38de-4579-8e06-6b61cc43d615" xlink:to="loc_us-gaap_AwardTypeAxis_0d0429d3-c521-4c76-be71-7b4af3ae58bd" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0d0429d3-c521-4c76-be71-7b4af3ae58bd_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_0d0429d3-c521-4c76-be71-7b4af3ae58bd" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_0d0429d3-c521-4c76-be71-7b4af3ae58bd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_43f5ab42-88f2-4dc9-897c-9671ba10287f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_0d0429d3-c521-4c76-be71-7b4af3ae58bd" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_43f5ab42-88f2-4dc9-897c-9671ba10287f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_RestrictedStockAndRestrictedStockUnitsMember_f4f2a6ec-446d-4a16-986c-d1507fa85347" xlink:href="mtg-20231231.xsd#mtg_RestrictedStockAndRestrictedStockUnitsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_43f5ab42-88f2-4dc9-897c-9671ba10287f" xlink:to="loc_mtg_RestrictedStockAndRestrictedStockUnitsMember_f4f2a6ec-446d-4a16-986c-d1507fa85347" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PerformanceSharesMember_9bc65c02-a93d-4830-bb8b-6330875d96c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PerformanceSharesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_43f5ab42-88f2-4dc9-897c-9671ba10287f" xlink:to="loc_us-gaap_PerformanceSharesMember_9bc65c02-a93d-4830-bb8b-6330875d96c2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_1d2bdc68-b82f-447f-9412-92b3a7b72613" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedStockUnitsRSUMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_43f5ab42-88f2-4dc9-897c-9671ba10287f" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_1d2bdc68-b82f-447f-9412-92b3a7b72613" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_RSUsNonEmployeeDirectorsMember_b1f4770e-43e6-431a-b4b7-1ef200ddaaf4" xlink:href="mtg-20231231.xsd#mtg_RSUsNonEmployeeDirectorsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_43f5ab42-88f2-4dc9-897c-9671ba10287f" xlink:to="loc_mtg_RSUsNonEmployeeDirectorsMember_b1f4770e-43e6-431a-b4b7-1ef200ddaaf4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_SummaryOfRestrictedStockOrRestrictedStockUnitActivityAbstract_61ea2160-84b7-4556-9ded-dbfcd8aea7f6" xlink:href="mtg-20231231.xsd#mtg_SummaryOfRestrictedStockOrRestrictedStockUnitActivityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_15b08f9e-a4c4-45e2-8286-3159124487c1" xlink:to="loc_mtg_SummaryOfRestrictedStockOrRestrictedStockUnitActivityAbstract_61ea2160-84b7-4556-9ded-dbfcd8aea7f6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsAdditionalDisclosuresAbstract_c42dfff5-723c-4991-b5b8-b071277d2f5b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsAdditionalDisclosuresAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_SummaryOfRestrictedStockOrRestrictedStockUnitActivityAbstract_61ea2160-84b7-4556-9ded-dbfcd8aea7f6" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsAdditionalDisclosuresAbstract_c42dfff5-723c-4991-b5b8-b071277d2f5b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_a0d20b61-991b-48ef-8b77-4f899eb6fc18" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsAdditionalDisclosuresAbstract_c42dfff5-723c-4991-b5b8-b071277d2f5b" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_a0d20b61-991b-48ef-8b77-4f899eb6fc18" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_88cef189-66bb-43db-b0b3-4472df08ad5c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsAdditionalDisclosuresAbstract_c42dfff5-723c-4991-b5b8-b071277d2f5b" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_88cef189-66bb-43db-b0b3-4472df08ad5c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_0faa171a-f929-4e58-9b3e-648f7646031b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsAdditionalDisclosuresAbstract_c42dfff5-723c-4991-b5b8-b071277d2f5b" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_0faa171a-f929-4e58-9b3e-648f7646031b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_caa84be2-3cf9-4fcc-8376-d63206bba2cd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsAdditionalDisclosuresAbstract_c42dfff5-723c-4991-b5b8-b071277d2f5b" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_caa84be2-3cf9-4fcc-8376-d63206bba2cd" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_986ecde8-bf30-4696-9854-deaa8de06163" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_d529e6b8-a310-49d5-8396-a5b490e6b0cb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_SummaryOfRestrictedStockOrRestrictedStockUnitActivityAbstract_61ea2160-84b7-4556-9ded-dbfcd8aea7f6" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_d529e6b8-a310-49d5-8396-a5b490e6b0cb" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_6f4b8a5c-c0c9-497d-978e-eb7a8ad94508" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_d529e6b8-a310-49d5-8396-a5b490e6b0cb" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_6f4b8a5c-c0c9-497d-978e-eb7a8ad94508" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_cf451cfc-66b6-48df-84f6-9cca9404c2fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_d529e6b8-a310-49d5-8396-a5b490e6b0cb" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_cf451cfc-66b6-48df-84f6-9cca9404c2fc" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_9baeaa4c-3bac-4e3e-83de-f0b0330d6985" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_d529e6b8-a310-49d5-8396-a5b490e6b0cb" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_9baeaa4c-3bac-4e3e-83de-f0b0330d6985" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_bbe0ab6c-1a93-4b05-8516-64ba048baf24" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward_d529e6b8-a310-49d5-8396-a5b490e6b0cb" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_bbe0ab6c-1a93-4b05-8516-64ba048baf24" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_8318d69e-fcfb-450e-b007-0f9da9cd4a24" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsSubjectToPerformanceConditionsPercent_423b5b60-d766-4a36-ac60-07e7196015ca" xlink:href="mtg-20231231.xsd#mtg_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsSubjectToPerformanceConditionsPercent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_SummaryOfRestrictedStockOrRestrictedStockUnitActivityAbstract_61ea2160-84b7-4556-9ded-dbfcd8aea7f6" xlink:to="loc_mtg_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsSubjectToPerformanceConditionsPercent_423b5b60-d766-4a36-ac60-07e7196015ca" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage_0e969486-f0e7-48a3-8a04-7b66f5cc25cd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_15b08f9e-a4c4-45e2-8286-3159124487c1" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage_0e969486-f0e7-48a3-8a04-7b66f5cc25cd" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/SharebasedCompensationPlansNarrativeDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#SharebasedCompensationPlansNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/SharebasedCompensationPlansNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_5e5ed53f-3523-4f03-a900-096c0bc8e073" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_1e949ad4-760e-43b0-b243-ef90626ce7dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_5e5ed53f-3523-4f03-a900-096c0bc8e073" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_1e949ad4-760e-43b0-b243-ef90626ce7dd" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_2f3ac4b4-ebee-4914-bc38-9892456992ed" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_1e949ad4-760e-43b0-b243-ef90626ce7dd" xlink:to="loc_srt_RangeAxis_2f3ac4b4-ebee-4914-bc38-9892456992ed" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_2f3ac4b4-ebee-4914-bc38-9892456992ed_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_2f3ac4b4-ebee-4914-bc38-9892456992ed" xlink:to="loc_srt_RangeMember_2f3ac4b4-ebee-4914-bc38-9892456992ed_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_05874525-4701-4633-bf1a-5425fa79e8d6" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_2f3ac4b4-ebee-4914-bc38-9892456992ed" xlink:to="loc_srt_RangeMember_05874525-4701-4633-bf1a-5425fa79e8d6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_b99ab4dc-a0b2-4747-a2b2-9f811b3c2856" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_05874525-4701-4633-bf1a-5425fa79e8d6" xlink:to="loc_srt_MinimumMember_b99ab4dc-a0b2-4747-a2b2-9f811b3c2856" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_8f572b20-58e6-47b5-b3df-7d0a35ea23ed" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_05874525-4701-4633-bf1a-5425fa79e8d6" xlink:to="loc_srt_MaximumMember_8f572b20-58e6-47b5-b3df-7d0a35ea23ed" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameAxis_b6468ff5-537a-44db-a2eb-97971649b07f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_1e949ad4-760e-43b0-b243-ef90626ce7dd" xlink:to="loc_us-gaap_PlanNameAxis_b6468ff5-537a-44db-a2eb-97971649b07f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameDomain_b6468ff5-537a-44db-a2eb-97971649b07f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_PlanNameAxis_b6468ff5-537a-44db-a2eb-97971649b07f" xlink:to="loc_us-gaap_PlanNameDomain_b6468ff5-537a-44db-a2eb-97971649b07f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PlanNameDomain_2c74cacc-96cd-41b5-9435-7317fdb5cfed" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_PlanNameAxis_b6468ff5-537a-44db-a2eb-97971649b07f" xlink:to="loc_us-gaap_PlanNameDomain_2c74cacc-96cd-41b5-9435-7317fdb5cfed" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_A2020PlanMember_d7d5d11c-5ccb-44a6-bf28-159294fe9fe2" xlink:href="mtg-20231231.xsd#mtg_A2020PlanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_PlanNameDomain_2c74cacc-96cd-41b5-9435-7317fdb5cfed" xlink:to="loc_mtg_A2020PlanMember_d7d5d11c-5ccb-44a6-bf28-159294fe9fe2" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_2a72474f-fd5e-4fe1-a9c1-b89235e0990c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_1e949ad4-760e-43b0-b243-ef90626ce7dd" xlink:to="loc_us-gaap_AwardTypeAxis_2a72474f-fd5e-4fe1-a9c1-b89235e0990c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_2a72474f-fd5e-4fe1-a9c1-b89235e0990c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_2a72474f-fd5e-4fe1-a9c1-b89235e0990c" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_2a72474f-fd5e-4fe1-a9c1-b89235e0990c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_1937ec93-d0c2-4f3b-8f82-c180c9512dcb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_2a72474f-fd5e-4fe1-a9c1-b89235e0990c" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_1937ec93-d0c2-4f3b-8f82-c180c9512dcb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_RestrictedStockAndRestrictedStockUnitsMember_06e19e5c-e5f5-4f49-bfa0-549ecc462f74" xlink:href="mtg-20231231.xsd#mtg_RestrictedStockAndRestrictedStockUnitsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_1937ec93-d0c2-4f3b-8f82-c180c9512dcb" xlink:to="loc_mtg_RestrictedStockAndRestrictedStockUnitsMember_06e19e5c-e5f5-4f49-bfa0-549ecc462f74" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PerformanceSharesMember_7ba24ab6-5621-494f-830d-c7bde861712a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PerformanceSharesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_1937ec93-d0c2-4f3b-8f82-c180c9512dcb" xlink:to="loc_us-gaap_PerformanceSharesMember_7ba24ab6-5621-494f-830d-c7bde861712a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember_0263a0c0-1537-4478-8ec7-5a2f6775be1a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedStockUnitsRSUMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_1937ec93-d0c2-4f3b-8f82-c180c9512dcb" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember_0263a0c0-1537-4478-8ec7-5a2f6775be1a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_RSUsNonEmployeeDirectorsMember_de65923f-3a26-4d9d-8c21-2e0bed590c3b" xlink:href="mtg-20231231.xsd#mtg_RSUsNonEmployeeDirectorsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_1937ec93-d0c2-4f3b-8f82-c180c9512dcb" xlink:to="loc_mtg_RSUsNonEmployeeDirectorsMember_de65923f-3a26-4d9d-8c21-2e0bed590c3b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_21bdef76-e506-458e-a00d-f472b0169e03" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_5e5ed53f-3523-4f03-a900-096c0bc8e073" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_21bdef76-e506-458e-a00d-f472b0169e03" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_ec80053e-3f23-46f8-9493-8645c83f0b8f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_5e5ed53f-3523-4f03-a900-096c0bc8e073" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant_ec80053e-3f23-46f8-9493-8645c83f0b8f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_6b790398-2d09-40f6-a26b-5e383d4377f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AllocatedShareBasedCompensationExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_5e5ed53f-3523-4f03-a900-096c0bc8e073" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_6b790398-2d09-40f6-a26b-5e383d4377f4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense_9547d91a-4730-4966-bb6c-f40b9e46b90b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_5e5ed53f-3523-4f03-a900-096c0bc8e073" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense_9547d91a-4730-4966-bb6c-f40b9e46b90b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodTotalFairValue_62dc3603-83f1-4c23-acbe-b873c1b9f720" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodTotalFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_5e5ed53f-3523-4f03-a900-096c0bc8e073" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodTotalFairValue_62dc3603-83f1-4c23-acbe-b873c1b9f720" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_2e8a454c-ae90-4dfb-b0ac-e8d5c82144fd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_5e5ed53f-3523-4f03-a900-096c0bc8e073" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_2e8a454c-ae90-4dfb-b0ac-e8d5c82144fd" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_6e7cff23-955b-4db0-954c-252d760e11fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_5e5ed53f-3523-4f03-a900-096c0bc8e073" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_6e7cff23-955b-4db0-954c-252d760e11fa" xlink:type="arc" order="6"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/SCHEDULEISUMMARYOFINVESTMENTSOTHERTHANINVESTMENTSINRELATEDPARTIESDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#SCHEDULEISUMMARYOFINVESTMENTSOTHERTHANINVESTMENTSINRELATEDPARTIESDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/SCHEDULEISUMMARYOFINVESTMENTSOTHERTHANINVESTMENTSINRELATEDPARTIESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_98c3a965-92f8-40b4-ab1a-05d3ef70acf5" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_6ef3346d-e653-4612-9f4e-eb7bb017bd43" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_98c3a965-92f8-40b4-ab1a-05d3ef70acf5" xlink:to="loc_srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_6ef3346d-e653-4612-9f4e-eb7bb017bd43" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentTypeAxis_553c37eb-2a68-4327-9bfa-6545d18dafb4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_6ef3346d-e653-4612-9f4e-eb7bb017bd43" xlink:to="loc_us-gaap_InvestmentTypeAxis_553c37eb-2a68-4327-9bfa-6545d18dafb4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentTypeCategorizationMember_553c37eb-2a68-4327-9bfa-6545d18dafb4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentTypeCategorizationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_InvestmentTypeAxis_553c37eb-2a68-4327-9bfa-6545d18dafb4" xlink:to="loc_us-gaap_InvestmentTypeCategorizationMember_553c37eb-2a68-4327-9bfa-6545d18dafb4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentTypeCategorizationMember_ae88e2cf-53b7-466f-96f4-99c2a84dfb9c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InvestmentTypeCategorizationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_InvestmentTypeAxis_553c37eb-2a68-4327-9bfa-6545d18dafb4" xlink:to="loc_us-gaap_InvestmentTypeCategorizationMember_ae88e2cf-53b7-466f-96f4-99c2a84dfb9c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FixedMaturitiesMember_7f6b42e5-f75e-4f7a-b45c-1148dd045c05" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FixedMaturitiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_ae88e2cf-53b7-466f-96f4-99c2a84dfb9c" xlink:to="loc_us-gaap_FixedMaturitiesMember_7f6b42e5-f75e-4f7a-b45c-1148dd045c05" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySecuritiesInvestmentSummaryMember_4f6c2801-481b-4ff7-bc03-baf747c33428" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquitySecuritiesInvestmentSummaryMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_InvestmentTypeCategorizationMember_ae88e2cf-53b7-466f-96f4-99c2a84dfb9c" xlink:to="loc_us-gaap_EquitySecuritiesInvestmentSummaryMember_4f6c2801-481b-4ff7-bc03-baf747c33428" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_a7c633c5-c7b9-44f4-ad95-ce0b63bd316b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesTable_6ef3346d-e653-4612-9f4e-eb7bb017bd43" xlink:to="loc_us-gaap_FinancialInstrumentAxis_a7c633c5-c7b9-44f4-ad95-ce0b63bd316b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_a7c633c5-c7b9-44f4-ad95-ce0b63bd316b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_a7c633c5-c7b9-44f4-ad95-ce0b63bd316b" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_a7c633c5-c7b9-44f4-ad95-ce0b63bd316b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_a7c633c5-c7b9-44f4-ad95-ce0b63bd316b" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USTreasuryAndGovernmentMember_46f4fa43-e412-4922-a56a-846f14eb1b99" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USTreasuryAndGovernmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:to="loc_us-gaap_USTreasuryAndGovernmentMember_46f4fa43-e412-4922-a56a-846f14eb1b99" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_be124ebb-a5d6-4c27-85e8-db8c6e23fa1a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_USStatesAndPoliticalSubdivisionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:to="loc_us-gaap_USStatesAndPoliticalSubdivisionsMember_be124ebb-a5d6-4c27-85e8-db8c6e23fa1a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignGovernmentDebtSecuritiesMember_bad85b0d-b693-4250-9235-7dcd50f0e40f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ForeignGovernmentDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:to="loc_us-gaap_ForeignGovernmentDebtSecuritiesMember_bad85b0d-b693-4250-9235-7dcd50f0e40f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PublicUtilityBondsMember_7184e3da-691c-41fc-be69-f5e30c747da0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PublicUtilityBondsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:to="loc_us-gaap_PublicUtilityBondsMember_7184e3da-691c-41fc-be69-f5e30c747da0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetBackedSecuritiesMember_3198736e-f032-4343-a225-abc56b71e53f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:to="loc_us-gaap_AssetBackedSecuritiesMember_3198736e-f032-4343-a225-abc56b71e53f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CollateralizedLoanObligationsMember_021970e0-a15e-45f0-9183-3564a5ffe511" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CollateralizedLoanObligationsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:to="loc_us-gaap_CollateralizedLoanObligationsMember_021970e0-a15e-45f0-9183-3564a5ffe511" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MortgageBackedSecuritiesMember_b349ff74-e108-4630-b08f-be5d53e19157" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_MortgageBackedSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:to="loc_us-gaap_MortgageBackedSecuritiesMember_b349ff74-e108-4630-b08f-be5d53e19157" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllOtherCorporateBondsMember_4ba94f11-65da-43bb-887f-be3521d5ae76" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AllOtherCorporateBondsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:to="loc_us-gaap_AllOtherCorporateBondsMember_4ba94f11-65da-43bb-887f-be3521d5ae76" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndustrialMiscellaneousAndAllOthersMember_1b1ab6e8-e898-4902-9523-1c9386627193" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IndustrialMiscellaneousAndAllOthersMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:to="loc_us-gaap_IndustrialMiscellaneousAndAllOthersMember_1b1ab6e8-e898-4902-9523-1c9386627193" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialPaperMember_b90ec618-72ad-491a-accb-73c9e170dcdf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommercialPaperMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_fd0ec545-5b3b-451e-93e1-7a0f66a370fa" xlink:to="loc_us-gaap_CommercialPaperMember_b90ec618-72ad-491a-accb-73c9e170dcdf" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCost_6f91e031-0dc1-41ed-ac08-a811f3f89a46" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_98c3a965-92f8-40b4-ab1a-05d3ef70acf5" xlink:to="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCost_6f91e031-0dc1-41ed-ac08-a811f3f89a46" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesFairValue_91d8e203-4906-4b6c-954b-46fa29c4ddd9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_98c3a965-92f8-40b4-ab1a-05d3ef70acf5" xlink:to="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesFairValue_91d8e203-4906-4b6c-954b-46fa29c4ddd9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCarryingAmount_cb52ffd4-dab1-4466-a1c8-87af46ff4d48" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCarryingAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesReportableDataLineItems_98c3a965-92f8-40b4-ab1a-05d3ef70acf5" xlink:to="loc_us-gaap_SummaryOfInvestmentsOtherThanInvestmentsInRelatedPartiesCarryingAmount_cb52ffd4-dab1-4466-a1c8-87af46ff4d48" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/SCHEDULEIICONDENSEDFINANCIALINFORMATIONOFREGISTRANTDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#SCHEDULEIICONDENSEDFINANCIALINFORMATIONOFREGISTRANTDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/SCHEDULEIICONDENSEDFINANCIALINFORMATIONOFREGISTRANTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_srt_CondensedFinancialStatementsCaptionsLineItems_d225bd2d-1fa9-4511-91eb-4fe118ff70d3" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_CondensedFinancialStatementsCaptionsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScheduleOfCondensedFinancialStatementsTable_b926d8ca-86e3-4832-9019-d69ae2c9d37a" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScheduleOfCondensedFinancialStatementsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_srt_CondensedFinancialStatementsCaptionsLineItems_d225bd2d-1fa9-4511-91eb-4fe118ff70d3" xlink:to="loc_srt_ScheduleOfCondensedFinancialStatementsTable_b926d8ca-86e3-4832-9019-d69ae2c9d37a" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesAxis_ca48ba37-82d2-450e-ade2-beaf4a184a68" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_ScheduleOfCondensedFinancialStatementsTable_b926d8ca-86e3-4832-9019-d69ae2c9d37a" xlink:to="loc_srt_ConsolidatedEntitiesAxis_ca48ba37-82d2-450e-ade2-beaf4a184a68" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_ca48ba37-82d2-450e-ade2-beaf4a184a68_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidatedEntitiesAxis_ca48ba37-82d2-450e-ade2-beaf4a184a68" xlink:to="loc_srt_ConsolidatedEntitiesDomain_ca48ba37-82d2-450e-ade2-beaf4a184a68_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_b50fee34-49db-48d2-abf6-731d435f5473" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidatedEntitiesAxis_ca48ba37-82d2-450e-ade2-beaf4a184a68" xlink:to="loc_srt_ConsolidatedEntitiesDomain_b50fee34-49db-48d2-abf6-731d435f5473" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ParentCompanyMember_9c70c5b8-6f9f-421a-bccb-9f12359ea696" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ParentCompanyMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidatedEntitiesDomain_b50fee34-49db-48d2-abf6-731d435f5473" xlink:to="loc_srt_ParentCompanyMember_9c70c5b8-6f9f-421a-bccb-9f12359ea696" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_57c8bdea-f01c-4ba7-8614-f27e192b4ec4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_ScheduleOfCondensedFinancialStatementsTable_b926d8ca-86e3-4832-9019-d69ae2c9d37a" xlink:to="loc_us-gaap_FinancialInstrumentAxis_57c8bdea-f01c-4ba7-8614-f27e192b4ec4" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_57c8bdea-f01c-4ba7-8614-f27e192b4ec4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_57c8bdea-f01c-4ba7-8614-f27e192b4ec4" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_57c8bdea-f01c-4ba7-8614-f27e192b4ec4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ae301704-4b39-4c99-8db1-59b99e763400" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_57c8bdea-f01c-4ba7-8614-f27e192b4ec4" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ae301704-4b39-4c99-8db1-59b99e763400" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FixedMaturitiesMember_90a4c297-b4a1-41b0-9b92-ebc36747860f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FixedMaturitiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ae301704-4b39-4c99-8db1-59b99e763400" xlink:to="loc_us-gaap_FixedMaturitiesMember_90a4c297-b4a1-41b0-9b92-ebc36747860f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermInvestmentsMember_7ef8320e-adb8-4fa9-bdde-7e155662afee" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShortTermInvestmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_ae301704-4b39-4c99-8db1-59b99e763400" xlink:to="loc_us-gaap_ShortTermInvestmentsMember_7ef8320e-adb8-4fa9-bdde-7e155662afee" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementOfFinancialPositionAbstract_3da88c70-b366-4f43-984e-bbb498e3c10e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementOfFinancialPositionAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_CondensedFinancialStatementsCaptionsLineItems_d225bd2d-1fa9-4511-91eb-4fe118ff70d3" xlink:to="loc_us-gaap_StatementOfFinancialPositionAbstract_3da88c70-b366-4f43-984e-bbb498e3c10e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsAbstract_95e04056-f690-44fa-8daa-de2334903379" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AssetsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementOfFinancialPositionAbstract_3da88c70-b366-4f43-984e-bbb498e3c10e" xlink:to="loc_us-gaap_AssetsAbstract_95e04056-f690-44fa-8daa-de2334903379" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_23630838-e7b5-48ce-96b9-3124d79b220a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleSecuritiesDebtSecurities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_95e04056-f690-44fa-8daa-de2334903379" xlink:to="loc_us-gaap_AvailableForSaleSecuritiesDebtSecurities_23630838-e7b5-48ce-96b9-3124d79b220a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Investments_2e45bf79-4ccc-4a32-93ea-e94ff9a5e266" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Investments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_95e04056-f690-44fa-8daa-de2334903379" xlink:to="loc_us-gaap_Investments_2e45bf79-4ccc-4a32-93ea-e94ff9a5e266" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_0bf7e930-c935-433d-815f-faf56427111d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_95e04056-f690-44fa-8daa-de2334903379" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_0bf7e930-c935-433d-815f-faf56427111d" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_InvestmentInSubsidiariesAtEquityInNetAssets_a546fa77-5565-47f0-9278-f81ecd992607" xlink:href="mtg-20231231.xsd#mtg_InvestmentInSubsidiariesAtEquityInNetAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_95e04056-f690-44fa-8daa-de2334903379" xlink:to="loc_mtg_InvestmentInSubsidiariesAtEquityInNetAssets_a546fa77-5565-47f0-9278-f81ecd992607" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_AccountsReceivableDueFromAffiliates_36fbc95a-5cb5-4359-a544-4b705df5dc4a" xlink:href="mtg-20231231.xsd#mtg_AccountsReceivableDueFromAffiliates"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_95e04056-f690-44fa-8daa-de2334903379" xlink:to="loc_mtg_AccountsReceivableDueFromAffiliates_36fbc95a-5cb5-4359-a544-4b705df5dc4a" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxesAndOtherTaxReceivableCurrent_44b3cfa4-320c-4e6a-9f1d-dfd1cd76fd30" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxesAndOtherTaxReceivableCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_95e04056-f690-44fa-8daa-de2334903379" xlink:to="loc_us-gaap_DeferredIncomeTaxesAndOtherTaxReceivableCurrent_44b3cfa4-320c-4e6a-9f1d-dfd1cd76fd30" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedInvestmentIncomeReceivable_443a4223-29a6-4aec-90c6-04c38e2b4264" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccruedInvestmentIncomeReceivable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_95e04056-f690-44fa-8daa-de2334903379" xlink:to="loc_us-gaap_AccruedInvestmentIncomeReceivable_443a4223-29a6-4aec-90c6-04c38e2b4264" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_910a79aa-3985-4450-ba7a-5cf9bb5d0257" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Assets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_95e04056-f690-44fa-8daa-de2334903379" xlink:to="loc_us-gaap_Assets_910a79aa-3985-4450-ba7a-5cf9bb5d0257" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_1e195910-4612-401c-af18-c40ec80f3d42" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementOfFinancialPositionAbstract_3da88c70-b366-4f43-984e-bbb498e3c10e" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_1e195910-4612-401c-af18-c40ec80f3d42" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAbstract_e5e6d79b-f0e1-4775-b42d-e87e80cfef33" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_1e195910-4612-401c-af18-c40ec80f3d42" xlink:to="loc_us-gaap_LiabilitiesAbstract_e5e6d79b-f0e1-4775-b42d-e87e80cfef33" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeniorNotes_bcae3455-046a-4fbc-b536-8947644bc46f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeniorNotes"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_e5e6d79b-f0e1-4775-b42d-e87e80cfef33" xlink:to="loc_us-gaap_SeniorNotes_bcae3455-046a-4fbc-b536-8947644bc46f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ConvertibleSubordinatedDebt_a3eccfd5-a991-4919-874e-d067e6c308dc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ConvertibleSubordinatedDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_e5e6d79b-f0e1-4775-b42d-e87e80cfef33" xlink:to="loc_us-gaap_ConvertibleSubordinatedDebt_a3eccfd5-a991-4919-874e-d067e6c308dc" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestPayableCurrentAndNoncurrent_c3a4aa72-d508-41a1-bef7-c7f0a8841fcd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestPayableCurrentAndNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_e5e6d79b-f0e1-4775-b42d-e87e80cfef33" xlink:to="loc_us-gaap_InterestPayableCurrentAndNoncurrent_c3a4aa72-d508-41a1-bef7-c7f0a8841fcd" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilities_7d3829ab-c874-4af5-899f-1901f7bf1932" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_e5e6d79b-f0e1-4775-b42d-e87e80cfef33" xlink:to="loc_us-gaap_OtherLiabilities_7d3829ab-c874-4af5-899f-1901f7bf1932" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_e567deb0-da19-4cf5-8be1-58ee59a46b0e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Liabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAbstract_e5e6d79b-f0e1-4775-b42d-e87e80cfef33" xlink:to="loc_us-gaap_Liabilities_e567deb0-da19-4cf5-8be1-58ee59a46b0e" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityAbstract_7a30abd0-7b85-4de3-b030-392bcdc2bb83" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_1e195910-4612-401c-af18-c40ec80f3d42" xlink:to="loc_us-gaap_StockholdersEquityAbstract_7a30abd0-7b85-4de3-b030-392bcdc2bb83" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_14da98dc-298e-41c5-83c2-e0ec05c51e3d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_7a30abd0-7b85-4de3-b030-392bcdc2bb83" xlink:to="loc_us-gaap_CommonStockValue_14da98dc-298e-41c5-83c2-e0ec05c51e3d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalCommonStock_182ecfcb-f582-45ff-871d-317300aa1dc7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdditionalPaidInCapitalCommonStock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_7a30abd0-7b85-4de3-b030-392bcdc2bb83" xlink:to="loc_us-gaap_AdditionalPaidInCapitalCommonStock_182ecfcb-f582-45ff-871d-317300aa1dc7" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockValue_5c27a8b5-e6e3-402d-840e-0098dbb66f70" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_7a30abd0-7b85-4de3-b030-392bcdc2bb83" xlink:to="loc_us-gaap_TreasuryStockValue_5c27a8b5-e6e3-402d-840e-0098dbb66f70" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_77f568d9-c174-49a5-8375-dbea48161ba5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_7a30abd0-7b85-4de3-b030-392bcdc2bb83" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_77f568d9-c174-49a5-8375-dbea48161ba5" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_e627d81f-f975-4bcf-bd18-23a3a5801e12" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_7a30abd0-7b85-4de3-b030-392bcdc2bb83" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_e627d81f-f975-4bcf-bd18-23a3a5801e12" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_0a47363c-51ca-488f-a526-5dc4be1b1b4f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityAbstract_7a30abd0-7b85-4de3-b030-392bcdc2bb83" xlink:to="loc_us-gaap_StockholdersEquity_0a47363c-51ca-488f-a526-5dc4be1b1b4f" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_87fd8995-9537-442a-9fef-0b69144177a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_1e195910-4612-401c-af18-c40ec80f3d42" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_87fd8995-9537-442a-9fef-0b69144177a9" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_ParentheticalInformationAbstract_d26f422b-5897-4a06-9d4f-7e40f58a4f10" xlink:href="mtg-20231231.xsd#mtg_ParentheticalInformationAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementOfFinancialPositionAbstract_3da88c70-b366-4f43-984e-bbb498e3c10e" xlink:to="loc_mtg_ParentheticalInformationAbstract_d26f422b-5897-4a06-9d4f-7e40f58a4f10" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_b0b792c9-5688-429e-a0dd-ed7e69f08703" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_ParentheticalInformationAbstract_d26f422b-5897-4a06-9d4f-7e40f58a4f10" xlink:to="loc_us-gaap_AvailableForSaleDebtSecuritiesAmortizedCostBasis_b0b792c9-5688-429e-a0dd-ed7e69f08703" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockParOrStatedValuePerShare_50698406-f0c0-4e86-89bc-8ae44e768776" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockParOrStatedValuePerShare"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_ParentheticalInformationAbstract_d26f422b-5897-4a06-9d4f-7e40f58a4f10" xlink:to="loc_us-gaap_CommonStockParOrStatedValuePerShare_50698406-f0c0-4e86-89bc-8ae44e768776" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesAuthorized_a163f001-d116-44d4-82e1-a213d75599d5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesAuthorized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_ParentheticalInformationAbstract_d26f422b-5897-4a06-9d4f-7e40f58a4f10" xlink:to="loc_us-gaap_CommonStockSharesAuthorized_a163f001-d116-44d4-82e1-a213d75599d5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesIssued_f99be334-e829-4f10-8ccc-5e110a2548c8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_ParentheticalInformationAbstract_d26f422b-5897-4a06-9d4f-7e40f58a4f10" xlink:to="loc_us-gaap_CommonStockSharesIssued_f99be334-e829-4f10-8ccc-5e110a2548c8" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_9c2078c6-d562-407e-9e11-6c7054b4837d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_ParentheticalInformationAbstract_d26f422b-5897-4a06-9d4f-7e40f58a4f10" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_9c2078c6-d562-407e-9e11-6c7054b4837d" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonShares_d8e300c4-790d-4855-ad47-8363a3349946" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TreasuryStockCommonShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_mtg_ParentheticalInformationAbstract_d26f422b-5897-4a06-9d4f-7e40f58a4f10" xlink:to="loc_us-gaap_TreasuryStockCommonShares_d8e300c4-790d-4855-ad47-8363a3349946" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementAbstract_41e3f137-9cd6-4afb-88a2-2178a7de2acd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_CondensedFinancialStatementsCaptionsLineItems_d225bd2d-1fa9-4511-91eb-4fe118ff70d3" xlink:to="loc_us-gaap_IncomeStatementAbstract_41e3f137-9cd6-4afb-88a2-2178a7de2acd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenuesAbstract_024a34c6-9d15-45ac-a425-eb24bdf14885" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevenuesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_41e3f137-9cd6-4afb-88a2-2178a7de2acd" xlink:to="loc_us-gaap_RevenuesAbstract_024a34c6-9d15-45ac-a425-eb24bdf14885" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetInvestmentIncome_95010548-b5a0-4fdb-8ba4-aeee6a6e6b1c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetInvestmentIncome"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesAbstract_024a34c6-9d15-45ac-a425-eb24bdf14885" xlink:to="loc_us-gaap_NetInvestmentIncome_95010548-b5a0-4fdb-8ba4-aeee6a6e6b1c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainLossOnInvestments_2b8f06a3-6248-4598-8f0e-ee6ee6952225" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainLossOnInvestments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesAbstract_024a34c6-9d15-45ac-a425-eb24bdf14885" xlink:to="loc_us-gaap_GainLossOnInvestments_2b8f06a3-6248-4598-8f0e-ee6ee6952225" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_8924be98-cdf4-41ef-b029-ad8a7c20ea74" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Revenues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RevenuesAbstract_024a34c6-9d15-45ac-a425-eb24bdf14885" xlink:to="loc_us-gaap_Revenues_8924be98-cdf4-41ef-b029-ad8a7c20ea74" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BenefitsLossesAndExpensesAbstract_b88c3dd4-f5e4-4a61-ace1-745a2ec8a9d8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BenefitsLossesAndExpensesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_41e3f137-9cd6-4afb-88a2-2178a7de2acd" xlink:to="loc_us-gaap_BenefitsLossesAndExpensesAbstract_b88c3dd4-f5e4-4a61-ace1-745a2ec8a9d8" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingExpenses_d5638e7d-e2eb-4166-8171-55821a34a116" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingExpenses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BenefitsLossesAndExpensesAbstract_b88c3dd4-f5e4-4a61-ace1-745a2ec8a9d8" xlink:to="loc_us-gaap_OperatingExpenses_d5638e7d-e2eb-4166-8171-55821a34a116" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestExpenseDebt_4e0bd16c-b144-4412-883c-f1848ddb686a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestExpenseDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BenefitsLossesAndExpensesAbstract_b88c3dd4-f5e4-4a61-ace1-745a2ec8a9d8" xlink:to="loc_us-gaap_InterestExpenseDebt_4e0bd16c-b144-4412-883c-f1848ddb686a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_3a8abf5c-8a89-43c8-87b3-0a9393e2233a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BenefitsLossesAndExpensesAbstract_b88c3dd4-f5e4-4a61-ace1-745a2ec8a9d8" xlink:to="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_3a8abf5c-8a89-43c8-87b3-0a9393e2233a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BenefitsLossesAndExpenses_4a8ae2f1-3628-432f-86fd-e8de7acf400a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BenefitsLossesAndExpenses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BenefitsLossesAndExpensesAbstract_b88c3dd4-f5e4-4a61-ace1-745a2ec8a9d8" xlink:to="loc_us-gaap_BenefitsLossesAndExpenses_4a8ae2f1-3628-432f-86fd-e8de7acf400a" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_1df346a9-5ce8-497e-93e9-abb81e5eab72" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_41e3f137-9cd6-4afb-88a2-2178a7de2acd" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_1df346a9-5ce8-497e-93e9-abb81e5eab72" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_9cdc1d31-b6ca-440d-8105-65b8518bddea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_41e3f137-9cd6-4afb-88a2-2178a7de2acd" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_9cdc1d31-b6ca-440d-8105-65b8518bddea" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromSubsidiariesNetOfTax_0dcba2f3-3f2c-4763-bdd2-3fa365543052" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromSubsidiariesNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_41e3f137-9cd6-4afb-88a2-2178a7de2acd" xlink:to="loc_us-gaap_IncomeLossFromSubsidiariesNetOfTax_0dcba2f3-3f2c-4763-bdd2-3fa365543052" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_ee9b1e7b-b0b3-414c-a0e1-7a99a8e5ad1a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_41e3f137-9cd6-4afb-88a2-2178a7de2acd" xlink:to="loc_us-gaap_NetIncomeLoss_ee9b1e7b-b0b3-414c-a0e1-7a99a8e5ad1a" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_d10d1de6-c672-4420-8ef2-0d0443d7cbc6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_41e3f137-9cd6-4afb-88a2-2178a7de2acd" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent_d10d1de6-c672-4420-8ef2-0d0443d7cbc6" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ComprehensiveIncomeNetOfTax_afeb8c3a-93f8-4a28-86ec-a191b9dce19a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ComprehensiveIncomeNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementAbstract_41e3f137-9cd6-4afb-88a2-2178a7de2acd" xlink:to="loc_us-gaap_ComprehensiveIncomeNetOfTax_afeb8c3a-93f8-4a28-86ec-a191b9dce19a" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementOfCashFlowsAbstract_d33587e5-2fe6-4744-8ceb-ab7289be7db6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementOfCashFlowsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_CondensedFinancialStatementsCaptionsLineItems_d225bd2d-1fa9-4511-91eb-4fe118ff70d3" xlink:to="loc_us-gaap_StatementOfCashFlowsAbstract_d33587e5-2fe6-4744-8ceb-ab7289be7db6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract_dcd1c36c-b0c2-4a4b-ab88-777d1dea4185" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementOfCashFlowsAbstract_d33587e5-2fe6-4744-8ceb-ab7289be7db6" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract_dcd1c36c-b0c2-4a4b-ab88-777d1dea4185" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_fe8901fc-af3b-410f-9a2b-271641069f9d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_4818db88-7bd2-41a6-ad76-b914aeefc661" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract_dcd1c36c-b0c2-4a4b-ab88-777d1dea4185" xlink:to="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_4818db88-7bd2-41a6-ad76-b914aeefc661" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromSubsidiariesNetOfTax_d0202a0f-0dca-43e8-9051-701e54e36cfc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeLossFromSubsidiariesNetOfTax"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashDividendsPaidToParentCompanyByConsolidatedSubsidiaries_d36bc82a-5124-48be-b8cc-29e6f690f52c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashDividendsPaidToParentCompanyByConsolidatedSubsidiaries"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_4818db88-7bd2-41a6-ad76-b914aeefc661" xlink:to="loc_us-gaap_CashDividendsPaidToParentCompanyByConsolidatedSubsidiaries_d36bc82a-5124-48be-b8cc-29e6f690f52c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_710c9a7b-f227-46c0-90f1-9d7e0000c24c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DeferredIncomeTaxExpenseBenefit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_4818db88-7bd2-41a6-ad76-b914aeefc661" xlink:to="loc_us-gaap_DeferredIncomeTaxExpenseBenefit_710c9a7b-f227-46c0-90f1-9d7e0000c24c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GainsLossesOnExtinguishmentOfDebt_c61244bb-a118-4603-85ef-136597a464e3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_GainsLossesOnExtinguishmentOfDebt"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncashIncomeExpense_ea301dae-baa8-4095-8eba-32fda8e2499e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherNoncashIncomeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_4818db88-7bd2-41a6-ad76-b914aeefc661" xlink:to="loc_us-gaap_OtherNoncashIncomeExpense_ea301dae-baa8-4095-8eba-32fda8e2499e" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_7fe4b219-5fc0-438c-b193-00556873c2b2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInOperatingCapitalAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract_4818db88-7bd2-41a6-ad76-b914aeefc661" xlink:to="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_7fe4b219-5fc0-438c-b193-00556873c2b2" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccountsReceivableRelatedParties_67aae4d3-b419-46cf-86b6-08b7a1daa848" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccountsReceivableRelatedParties"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_7fe4b219-5fc0-438c-b193-00556873c2b2" xlink:to="loc_us-gaap_IncreaseDecreaseInAccountsReceivableRelatedParties_67aae4d3-b419-46cf-86b6-08b7a1daa848" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInIncomeTaxesReceivable_fc08b6e1-5b18-4f53-9ef7-a45f8f095115" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInIncomeTaxesReceivable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_7fe4b219-5fc0-438c-b193-00556873c2b2" xlink:to="loc_us-gaap_IncreaseDecreaseInIncomeTaxesReceivable_fc08b6e1-5b18-4f53-9ef7-a45f8f095115" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_c7cd976a-9893-4411-aa4d-c7e0a305209f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_7fe4b219-5fc0-438c-b193-00556873c2b2" xlink:to="loc_us-gaap_IncreaseDecreaseInAccruedInvestmentIncomeReceivable_c7cd976a-9893-4411-aa4d-c7e0a305209f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInInterestPayableNet_e1a84cc4-016f-45e7-8f63-e0ce4bb07a2d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInInterestPayableNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInOperatingCapitalAbstract_7fe4b219-5fc0-438c-b193-00556873c2b2" xlink:to="loc_us-gaap_IncreaseDecreaseInInterestPayableNet_e1a84cc4-016f-45e7-8f63-e0ce4bb07a2d" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_41d528e7-bb1b-4af6-8fc7-22f6b484c0c7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInOperatingActivities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperationsAbstract_dcd1c36c-b0c2-4a4b-ab88-777d1dea4185" xlink:to="loc_us-gaap_NetCashProvidedByUsedInOperatingActivities_41d528e7-bb1b-4af6-8fc7-22f6b484c0c7" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesContinuingOperationsAbstract_baed912d-38f7-4253-9f49-fa4ca13ca498" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivitiesContinuingOperationsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementOfCashFlowsAbstract_d33587e5-2fe6-4744-8ceb-ab7289be7db6" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesContinuingOperationsAbstract_baed912d-38f7-4253-9f49-fa4ca13ca498" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsToAcquireInvestments_3216ff4f-95f2-4202-a746-0a9919915d26" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsToAcquireInvestments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesContinuingOperationsAbstract_baed912d-38f7-4253-9f49-fa4ca13ca498" xlink:to="loc_us-gaap_PaymentsToAcquireInvestments_3216ff4f-95f2-4202-a746-0a9919915d26" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_b81b9826-e398-475c-9efd-d678265a6a96" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesContinuingOperationsAbstract_baed912d-38f7-4253-9f49-fa4ca13ca498" xlink:to="loc_us-gaap_ProceedsFromSaleMaturityAndCollectionsOfInvestments_b81b9826-e398-475c-9efd-d678265a6a96" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_ecba23b1-d1a5-4227-9dd8-a0a7fbe9b687" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInInvestingActivities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInInvestingActivitiesContinuingOperationsAbstract_baed912d-38f7-4253-9f49-fa4ca13ca498" xlink:to="loc_us-gaap_NetCashProvidedByUsedInInvestingActivities_ecba23b1-d1a5-4227-9dd8-a0a7fbe9b687" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract_9248246d-636c-4ef1-b4e4-a3708263b643" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementOfCashFlowsAbstract_d33587e5-2fe6-4744-8ceb-ab7289be7db6" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract_9248246d-636c-4ef1-b4e4-a3708263b643" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarlyRepaymentOfSubordinatedDebt_5b7c1db0-d7e6-4fba-9ce6-9c6996052f3d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EarlyRepaymentOfSubordinatedDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract_9248246d-636c-4ef1-b4e4-a3708263b643" xlink:to="loc_us-gaap_EarlyRepaymentOfSubordinatedDebt_5b7c1db0-d7e6-4fba-9ce6-9c6996052f3d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RepaymentsOfSeniorDebt_ecac59f5-2be3-44d2-8543-18824982a123" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RepaymentsOfSeniorDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract_9248246d-636c-4ef1-b4e4-a3708263b643" xlink:to="loc_us-gaap_RepaymentsOfSeniorDebt_ecac59f5-2be3-44d2-8543-18824982a123" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_GainLossOnDebtExtinghuishmentCashPortion_218b305f-a462-407e-bf77-db23b66f553b" xlink:href="mtg-20231231.xsd#mtg_GainLossOnDebtExtinghuishmentCashPortion"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract_9248246d-636c-4ef1-b4e4-a3708263b643" xlink:to="loc_mtg_GainLossOnDebtExtinghuishmentCashPortion_218b305f-a462-407e-bf77-db23b66f553b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_01e210ad-97f9-43b3-8466-3f0902481325" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsForRepurchaseOfCommonStock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract_9248246d-636c-4ef1-b4e4-a3708263b643" xlink:to="loc_us-gaap_PaymentsForRepurchaseOfCommonStock_01e210ad-97f9-43b3-8466-3f0902481325" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsOfDividendsCommonStock_5c7a2f55-0217-4efb-878e-b8f40060544c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsOfDividendsCommonStock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract_9248246d-636c-4ef1-b4e4-a3708263b643" xlink:to="loc_us-gaap_PaymentsOfDividendsCommonStock_5c7a2f55-0217-4efb-878e-b8f40060544c" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_0e7a10b7-89ec-4522-9f50-1c2e4e4168a8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract_9248246d-636c-4ef1-b4e4-a3708263b643" xlink:to="loc_us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation_0e7a10b7-89ec-4522-9f50-1c2e4e4168a8" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1bf064bd-38f7-4d24-a152-06c5cf340333" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetCashProvidedByUsedInFinancingActivities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperationsAbstract_9248246d-636c-4ef1-b4e4-a3708263b643" xlink:to="loc_us-gaap_NetCashProvidedByUsedInFinancingActivities_1bf064bd-38f7-4d24-a152-06c5cf340333" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_5c37d994-618c-45c9-bc5c-6f3edf498bbf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementOfCashFlowsAbstract_d33587e5-2fe6-4744-8ceb-ab7289be7db6" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseExcludingExchangeRateEffect_5c37d994-618c-45c9-bc5c-6f3edf498bbf" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_30e74082-df49-4e98-a7c9-071941db38d3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementOfCashFlowsAbstract_d33587e5-2fe6-4744-8ceb-ab7289be7db6" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_30e74082-df49-4e98-a7c9-071941db38d3" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_a0f09590-57a7-4e21-9e45-65c6baab4bf6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.mgic.com/role/SCHEDULEIICONDENSEDFINANCIALINFORMATIONOFREGISTRANTSUPPLEMENTARYNOTESDetails" xlink:type="simple" xlink:href="mtg-20231231.xsd#SCHEDULEIICONDENSEDFINANCIALINFORMATIONOFREGISTRANTSUPPLEMENTARYNOTESDetails"/>
  <link:definitionLink xlink:role="http://www.mgic.com/role/SCHEDULEIICONDENSEDFINANCIALINFORMATIONOFREGISTRANTSUPPLEMENTARYNOTESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_srt_SupplementaryInsuranceInformationBySegmentLineItems_56989343-252b-4ec0-98d4-e41a48f99901" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SupplementaryInsuranceInformationBySegmentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SupplementaryInsuranceInformationBySegmentTable_5f6964e0-34c0-4a10-a900-adf18c4699d9" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SupplementaryInsuranceInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentLineItems_56989343-252b-4ec0-98d4-e41a48f99901" xlink:to="loc_srt_SupplementaryInsuranceInformationBySegmentTable_5f6964e0-34c0-4a10-a900-adf18c4699d9" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LegalEntityAxis_582c5b15-bc65-49f9-9214-4e1c60b723db" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_LegalEntityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentTable_5f6964e0-34c0-4a10-a900-adf18c4699d9" xlink:to="loc_dei_LegalEntityAxis_582c5b15-bc65-49f9-9214-4e1c60b723db" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_582c5b15-bc65-49f9-9214-4e1c60b723db_default" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_dei_LegalEntityAxis_582c5b15-bc65-49f9-9214-4e1c60b723db" xlink:to="loc_dei_EntityDomain_582c5b15-bc65-49f9-9214-4e1c60b723db_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityDomain_37bc174e-b56f-413a-8ce4-e82b8b633825" xlink:href="https://xbrl.sec.gov/dei/2023/dei-2023.xsd#dei_EntityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_dei_LegalEntityAxis_582c5b15-bc65-49f9-9214-4e1c60b723db" xlink:to="loc_dei_EntityDomain_37bc174e-b56f-413a-8ce4-e82b8b633825" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_MortgageGuarantyInsuranceCorporationMember_59b7356a-6870-4d79-8eac-c63c84bfff51" xlink:href="mtg-20231231.xsd#mtg_MortgageGuarantyInsuranceCorporationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityDomain_37bc174e-b56f-413a-8ce4-e82b8b633825" xlink:to="loc_mtg_MortgageGuarantyInsuranceCorporationMember_59b7356a-6870-4d79-8eac-c63c84bfff51" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesAxis_1f059a94-80ef-47b2-a3af-9b2f272f2ff0" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentTable_5f6964e0-34c0-4a10-a900-adf18c4699d9" xlink:to="loc_srt_ConsolidatedEntitiesAxis_1f059a94-80ef-47b2-a3af-9b2f272f2ff0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_1f059a94-80ef-47b2-a3af-9b2f272f2ff0_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidatedEntitiesAxis_1f059a94-80ef-47b2-a3af-9b2f272f2ff0" xlink:to="loc_srt_ConsolidatedEntitiesDomain_1f059a94-80ef-47b2-a3af-9b2f272f2ff0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidatedEntitiesDomain_3f021a90-b032-486a-972b-58e82c5de485" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ConsolidatedEntitiesDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidatedEntitiesAxis_1f059a94-80ef-47b2-a3af-9b2f272f2ff0" xlink:to="loc_srt_ConsolidatedEntitiesDomain_3f021a90-b032-486a-972b-58e82c5de485" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SubsidiariesMember_8ac55143-e4ae-4be6-acbf-c249b46cdbee" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_SubsidiariesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidatedEntitiesDomain_3f021a90-b032-486a-972b-58e82c5de485" xlink:to="loc_srt_SubsidiariesMember_8ac55143-e4ae-4be6-acbf-c249b46cdbee" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_4376f84f-cc9e-4e66-b9f6-9dad8e8e6876" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentTable_5f6964e0-34c0-4a10-a900-adf18c4699d9" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_4376f84f-cc9e-4e66-b9f6-9dad8e8e6876" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_4376f84f-cc9e-4e66-b9f6-9dad8e8e6876_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_4376f84f-cc9e-4e66-b9f6-9dad8e8e6876" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_4376f84f-cc9e-4e66-b9f6-9dad8e8e6876_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_aa4d3bea-5cd0-47e9-a97f-fcfc1c14022a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_4376f84f-cc9e-4e66-b9f6-9dad8e8e6876" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_aa4d3bea-5cd0-47e9-a97f-fcfc1c14022a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SeniorNotesMember_70170c1c-9311-497a-a03d-251fe50d84fc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SeniorNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_aa4d3bea-5cd0-47e9-a97f-fcfc1c14022a" xlink:to="loc_us-gaap_SeniorNotesMember_70170c1c-9311-497a-a03d-251fe50d84fc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_d35dcaed-e03b-4e02-b0b4-7542903d36a4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentTable_5f6964e0-34c0-4a10-a900-adf18c4699d9" xlink:to="loc_us-gaap_DebtInstrumentAxis_d35dcaed-e03b-4e02-b0b4-7542903d36a4" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_d35dcaed-e03b-4e02-b0b4-7542903d36a4_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_d35dcaed-e03b-4e02-b0b4-7542903d36a4" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_d35dcaed-e03b-4e02-b0b4-7542903d36a4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_a880dca9-e7dc-4a16-ad88-b250eb5c682e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_d35dcaed-e03b-4e02-b0b4-7542903d36a4" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_a880dca9-e7dc-4a16-ad88-b250eb5c682e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_FivePointTwoFivePercentSeniorNotesMember_86fa7699-22c8-4999-aa5a-e2245044d59d" xlink:href="mtg-20231231.xsd#mtg_FivePointTwoFivePercentSeniorNotesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_a880dca9-e7dc-4a16-ad88-b250eb5c682e" xlink:to="loc_mtg_FivePointTwoFivePercentSeniorNotesMember_86fa7699-22c8-4999-aa5a-e2245044d59d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_PercentageOfStatutoryPolicyholdersSurplusUsedToDetermineMaximumAllowableDividends_0971ce75-5b2b-4aa8-aa42-7f3a8bfe2d8f" xlink:href="mtg-20231231.xsd#mtg_PercentageOfStatutoryPolicyholdersSurplusUsedToDetermineMaximumAllowableDividends"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentLineItems_56989343-252b-4ec0-98d4-e41a48f99901" xlink:to="loc_mtg_PercentageOfStatutoryPolicyholdersSurplusUsedToDetermineMaximumAllowableDividends_0971ce75-5b2b-4aa8-aa42-7f3a8bfe2d8f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_StatutoryAccountingPracticesStatutoryAmountAvailableForDividendPaymentsWithoutRegulatoryApprovalMeasurementMeasurementPeriod_16888ebd-4226-4a4f-b16c-edc1dc6c2f44" xlink:href="mtg-20231231.xsd#mtg_StatutoryAccountingPracticesStatutoryAmountAvailableForDividendPaymentsWithoutRegulatoryApprovalMeasurementMeasurementPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentLineItems_56989343-252b-4ec0-98d4-e41a48f99901" xlink:to="loc_mtg_StatutoryAccountingPracticesStatutoryAmountAvailableForDividendPaymentsWithoutRegulatoryApprovalMeasurementMeasurementPeriod_16888ebd-4226-4a4f-b16c-edc1dc6c2f44" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_StatutoryAccountingPracticesStatutoryAmountAvailableforDividendPaymentswithoutRegulatoryApprovalMeasurementDividendPaymentPeriod_4934870a-7a30-4de2-957e-42f296840a96" xlink:href="mtg-20231231.xsd#mtg_StatutoryAccountingPracticesStatutoryAmountAvailableforDividendPaymentswithoutRegulatoryApprovalMeasurementDividendPaymentPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentLineItems_56989343-252b-4ec0-98d4-e41a48f99901" xlink:to="loc_mtg_StatutoryAccountingPracticesStatutoryAmountAvailableforDividendPaymentswithoutRegulatoryApprovalMeasurementDividendPaymentPeriod_4934870a-7a30-4de2-957e-42f296840a96" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashDividendsPaidToParentCompany_a63f1c84-1f58-4719-acf5-d16624de2c10" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashDividendsPaidToParentCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentLineItems_56989343-252b-4ec0-98d4-e41a48f99901" xlink:to="loc_us-gaap_CashDividendsPaidToParentCompany_a63f1c84-1f58-4719-acf5-d16624de2c10" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ProceedsFromContributionsFromParent_086b300b-e881-4867-a064-0f611a80fc39" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ProceedsFromContributionsFromParent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentLineItems_56989343-252b-4ec0-98d4-e41a48f99901" xlink:to="loc_us-gaap_ProceedsFromContributionsFromParent_086b300b-e881-4867-a064-0f611a80fc39" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_7a752337-24a2-4c66-8923-9b2408d9a2f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SupplementaryInsuranceInformationBySegmentLineItems_56989343-252b-4ec0-98d4-e41a48f99901" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_7a752337-24a2-4c66-8923-9b2408d9a2f4" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="simple" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-roles-2023.xsd#eedm"/>
  <link:definitionLink xlink:role="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfAdoptionMember" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TypeOfAdoptionMember"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountingStandardsUpdate202006Member" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccountingStandardsUpdate202006Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfAdoptionMember" xlink:to="loc_us-gaap_AccountingStandardsUpdate202006Member" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://xbrl.sec.gov/ecd/AwardTypeOnly" xlink:type="simple" xlink:href="https://xbrl.sec.gov/ecd/2023/ecd-2023.xsd#AwardTypeOnly"/>
  <link:definitionLink xlink:role="http://xbrl.sec.gov/ecd/AwardTypeOnly" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_RestrictedStockAndRestrictedStockUnitsMember_4e63697a-a241-4a42-a362-ad42fedf4108" xlink:href="mtg-20231231.xsd#mtg_RestrictedStockAndRestrictedStockUnitsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="loc_mtg_RestrictedStockAndRestrictedStockUnitsMember_4e63697a-a241-4a42-a362-ad42fedf4108" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PerformanceSharesMember" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_PerformanceSharesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="loc_us-gaap_PerformanceSharesMember" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestrictedStockUnitsRSUMember" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RestrictedStockUnitsRSUMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="loc_us-gaap_RestrictedStockUnitsRSUMember" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_mtg_RSUsNonEmployeeDirectorsMember_54e9ae70-524f-4cb1-907e-099427dee650" xlink:href="mtg-20231231.xsd#mtg_RSUsNonEmployeeDirectorsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain" xlink:to="loc_mtg_RSUsNonEmployeeDirectorsMember_54e9ae70-524f-4cb1-907e-099427dee650" xlink:type="arc" order="7"/>
  </link:definitionLink>
</link:linkbase>
